This is a test version of Biostars. For the public version, visit https://www.biostars.org.
RESOLVED: libgtextutils make error : FASTX toolkit

Hi,

I am trying to install FASTX toolkit by following the instructions from their website. http://hannonlab.cshl.edu/fastx_toolkit/install_ubuntu.txt

While installing libgtextutils, make command gives following error:

make  all-recursive
make[1]: Entering directory '/media/wkstn/Data/Course/Project/libgtextutils-0.6'
Making all in m4
make[2]: Entering directory '/media/wkstn/Data/Course/Project/libgtextutils-0.6/m4'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/media/wkstn/Data/Course/Project/libgtextutils-0.6/m4'
Making all in src
make[2]: Entering directory '/media/wkstn/Data/Course/Project/libgtextutils-0.6/src'
Making all in gtextutils
make[3]: Entering directory '/media/wkstn/Data/Course/Project/libgtextutils-0.6/src/gtextutils'
/bin/bash ../../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../..     -g -O2 -Wall -Wextra -Wformat-nonliteral -Wformat-security -Wswitch-default -Wswitch-enum -Wunused-parameter -Wfloat-equal -Werror -DDEBUG -g -O1 -DDEBUG -g -O1 -MT stream_wrapper.lo -MD -MP -MF .deps/stream_wrapper.Tpo -c -o stream_wrapper.lo stream_wrapper.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../.. -g -O2 -Wall -Wextra -Wformat-nonliteral -Wformat-security -Wswitch-default -Wswitch-enum -Wunused-parameter -Wfloat-equal -Werror -DDEBUG -g -O1 -DDEBUG -g -O1 -MT stream_wrapper.lo -MD -MP -MF .deps/stream_wrapper.Tpo -c stream_wrapper.cpp  -fPIC -DPIC -o .libs/stream_wrapper.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../.. -g -O2 -Wall -Wextra -Wformat-nonliteral -Wformat-security -Wswitch-default -Wswitch-enum -Wunused-parameter -Wfloat-equal -Werror -DDEBUG -g -O1 -DDEBUG -g -O1 -MT stream_wrapper.lo -MD -MP -MF .deps/stream_wrapper.Tpo -c stream_wrapper.cpp -o stream_wrapper.o >/dev/null 2>&1
mv -f .deps/stream_wrapper.Tpo .deps/stream_wrapper.Plo
/bin/bash ../../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../..     -g -O2 -Wall -Wextra -Wformat-nonliteral -Wformat-security -Wswitch-default -Wswitch-enum -Wunused-parameter -Wfloat-equal -Werror -DDEBUG -g -O1 -DDEBUG -g -O1 -MT text_line_reader.lo -MD -MP -MF .deps/text_line_reader.Tpo -c -o text_line_reader.lo text_line_reader.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../.. -g -O2 -Wall -Wextra -Wformat-nonliteral -Wformat-security -Wswitch-default -Wswitch-enum -Wunused-parameter -Wfloat-equal -Werror -DDEBUG -g -O1 -DDEBUG -g -O1 -MT text_line_reader.lo -MD -MP -MF .deps/text_line_reader.Tpo -c text_line_reader.cpp  -fPIC -DPIC -o .libs/text_line_reader.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../.. -g -O2 -Wall -Wextra -Wformat-nonliteral -Wformat-security -Wswitch-default -Wswitch-enum -Wunused-parameter -Wfloat-equal -Werror -DDEBUG -g -O1 -DDEBUG -g -O1 -MT text_line_reader.lo -MD -MP -MF .deps/text_line_reader.Tpo -c text_line_reader.cpp -o text_line_reader.o >/dev/null 2>&1
mv -f .deps/text_line_reader.Tpo .deps/text_line_reader.Plo
/bin/bash ../../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../..     -g -O2 -Wall -Wextra -Wformat-nonliteral -Wformat-security -Wswitch-default -Wswitch-enum -Wunused-parameter -Wfloat-equal -Werror -DDEBUG -g -O1 -MT strnatcmp.lo -MD -MP -MF .deps/strnatcmp.Tpo -c -o strnatcmp.lo strnatcmp.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -g -O2 -Wall -Wextra -Wformat-nonliteral -Wformat-security -Wswitch-default -Wswitch-enum -Wunused-parameter -Wfloat-equal -Werror -DDEBUG -g -O1 -MT strnatcmp.lo -MD -MP -MF .deps/strnatcmp.Tpo -c strnatcmp.c  -fPIC -DPIC -o .libs/strnatcmp.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -g -O2 -Wall -Wextra -Wformat-nonliteral -Wformat-security -Wswitch-default -Wswitch-enum -Wunused-parameter -Wfloat-equal -Werror -DDEBUG -g -O1 -MT strnatcmp.lo -MD -MP -MF .deps/strnatcmp.Tpo -c strnatcmp.c -o strnatcmp.o >/dev/null 2>&1
mv -f .deps/strnatcmp.Tpo .deps/strnatcmp.Plo
/bin/bash ../../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../..     -g -O2 -Wall -Wextra -Wformat-nonliteral -Wformat-security -Wswitch-default -Wswitch-enum -Wunused-parameter -Wfloat-equal -Werror -DDEBUG -g -O1 -MT pipe_fitter.lo -MD -MP -MF .deps/pipe_fitter.Tpo -c -o pipe_fitter.lo pipe_fitter.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -g -O2 -Wall -Wextra -Wformat-nonliteral -Wformat-security -Wswitch-default -Wswitch-enum -Wunused-parameter -Wfloat-equal -Werror -DDEBUG -g -O1 -MT pipe_fitter.lo -MD -MP -MF .deps/pipe_fitter.Tpo -c pipe_fitter.c  -fPIC -DPIC -o .libs/pipe_fitter.o
pipe_fitter.c: In function ‘pipe_close’:
pipe_fitter.c:30:6: error: variable ‘i’ set but not used [-Werror=unused-but-set-variable]
  int i, status ;
      ^
cc1: all warnings being treated as errors
Makefile:336: recipe for target 'pipe_fitter.lo' failed
make[3]: *** [pipe_fitter.lo] Error 1
make[3]: Leaving directory '/media/wkstn/Data/Course/Project/libgtextutils-0.6/src/gtextutils'
Makefile:235: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/media/wkstn/Data/Course/Project/libgtextutils-0.6/src'
Makefile:311: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/media/wkstn/Data/Course/Project/libgtextutils-0.6'
Makefile:220: recipe for target 'all' failed
make: *** [all] Error 2

Is anyone familiar with how I can fix this?

rna-seq ngs fastx 16s rrna genomics

3 answers

The problem comes from here:

pipe_fitter.c: In function ‘pipe_close’:
pipe_fitter.c:30:6: error: variable ‘i’ set but not used [-Werror=unused-but-set-variable]
  int i, status ;

but I'm suprised because as far as I can see https://github.com/agordon/libgtextutils/blob/master/src/gtextutils/pipe_fitter.c#L48 'i' is declared and used here: https://github.com/agordon/libgtextutils/blob/master/src/gtextutils/pipe_fitter.c#L35

is it the same code you see in your source ?

src/gtextutils/pipe_fitter.c

are you using the latest version ? you should download the source from github. ?

Hello Pierre,

This is odd but my file doesn't have this.

i = close(fd);
if ( fd == -1 ) 
    err(1,"close(in pipe_close) failed");

p = waitpid(pid, &status, 0);
if (p==-1)
    err(1,"waitpid(in pipe_close) failed");

if (!WIFEXITED(status))
    errx(1,"child process terminated abnormally (in pipe_close), status=%08x", status);

exit_code = WEXITSTATUS(status);
if (exit_code != 0)
    errx(1,"child process terminated with error code %d (in pipe_close)", exit_code);

return 0;

I just changed the file and it works fine. Looks like the link they mention on their website (http://hannonlab.cshl.edu/fastx_toolkit/install_ubuntu.txt) isn't updated. Thanks a lot for your help.

I that answered the question please check the green mark on the left to close it.

Note that if you can install binary packages, or ask somebody to do it, fastx-toolkit is available from Ubuntu's package archive.

Hello Pierre,

This is odd but my file doesn't have this.

i = close(fd);
if ( fd == -1 ) 
    err(1,"close(in pipe_close) failed");

p = waitpid(pid, &status, 0);
if (p==-1)
    err(1,"waitpid(in pipe_close) failed");

if (!WIFEXITED(status))
    errx(1,"child process terminated abnormally (in pipe_close), status=%08x", status);

exit_code = WEXITSTATUS(status);
if (exit_code != 0)
    errx(1,"child process terminated with error code %d (in pipe_close)", exit_code);

return 0;

I just changed the file and it works fine. Looks like the link they mention on their website (http://hannonlab.cshl.edu/fastx_toolkit/install_ubuntu.txt) isn't updated. Thanks a lot for your help.

This should be a comment on Pierre's reply. Could you make the appropriate change please? That would involve the following steps:

Thank you!

Log in to answer this question.