-------- Original Message --------
Subject: Re: fastx-toolkit lib path
Date: Thu, 07 May 2009 20:19:34 -0400
From: Assaf Gordon
... wrote, On 05/07/2009 11:33 AM:
> Hi,
>
> I have just updated my local Galaxy install.
> I have noted that some of the tools from the fastx-toolkit are already integrated in the distribution.
> So I was wondering about the best way to get them all installed?
>
> I downloaded and installed *libgtextutils-0.1*, then I tried to install *fastx-toolkit* but
> I got many compilation errors which I tried to fix but without success.
> I have performed the classic cycle: ./configure ; make ; make install for gtexutils.
> In the case of fastx-toolkit I performed ./configure then when trying the make, I get:
>
> ......
> g++ -Wall -Wextra -Wformat-nonliteral -Wformat-security -Wswitch-default -Wswitch-enum -Wunused-parameter -Wfloat-equal -Werror -DDEBUG -g -O1 -DDEBUG -g -O1 -o fasta_formatter fasta_formatter.o /usr/local/include ../libfastx/libfastx.a
> /usr/local/include: file not recognized: Is a directory
> collect2: ld returned 1 exit status
> make[3]: *** [fasta_formatter] Error 1
> make[3]: Leaving directory `/tools/bioinfo/app/galaxy.02.03.09/tmp/fastx_toolkit-0.0.7/src/fasta_formatter'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/tools/bioinfo/app/galaxy.02.03.09/tmp/fastx_toolkit-0.0.7/src'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/tools/bioinfo/app/galaxy.02.03.09/tmp/fastx_toolkit-0.0.7'
> make: *** [all] Error 2
>
>
> Any suggestion to solve properly that problem?
>
Hello,
The default convention (of all GNU-style projects), running:
./configure
make
make install
will install the package to "/usr/local".
That is - binaries will go to "/usr/local/bin", header files to "/usr/local/include", libraries to "/usr/local/lib".
It seems you are trying to install the files to a different directory (not starting with "/usr/local/" prefix).
This is perfectly fine, but the correct way to do it is to use the "prefix" parameter to the "./configure" script, as such:
$ ./configure --prefix=/tools/bioinfo/app/
$ make
$ sudo make install
This will install the binaries to "/tools/bioinfo/app/bin", etc.
If you use the "prefix" option to build the GTEXTUTILS library, it will be installed to "/tools/bioinfo/app/lib".
But be away - the building process of FASTX-Toolkit doesn't know to look in "/tools/bioinfo/app/lib" for the library - and it will fail.
The way to fix that is to use the PKG_CONFIG_PATH variable, to tell the configure script where to look for the library, as such:
##
## Build the library, install to "/tools/bioinfo/app"
##
$ cd gtextutils-0.1
$ ./configure --prefix=/tools/bioinfo/app
$ make
$ sudo make install
$ cd ..
##
## Build the FASTX-Toolkit, install to "/tools/bioinfo/app"
## and instruct pkg_config to look in "/tools/bioinfo/app"
## for the libraries
$ cd fastx-toolkit-0.8
$ export PKG_CONFIG_PATH=/tools/bioinfo/app/lib/pkgconfig
$ ./configure --prefix=/tools/bioinfo/app
$ make
$ sudo make install
Regards,
Gordon.