[BioLib-dev] GSL
Xin Shuai
xshuai at umail.iu.edu
Tue Aug 4 20:42:51 UTC 2009
It finally works. But my solution is a little wired.
According to your inspiration, I found that there's no configure shell in
./contrib/gsl. And I consulted some document and tried to run autogen.sh in
the same directory to generate configure.
But when I ran
./autogen.sh
The error appeared that libtoolize tool is missing. Thus I thought maybe I
haven't installed libtool, though I could found libtool in /usr/bin. I
downloaded libtool package and tried to install it. But I failed because of
some unknown error. Later on, I found that there's right a libtoolize shell
in the libtool package. So I just copy that libtoolize to my /usr/bin.
After that, I re-ran autogen.sh in ./contrib/gsl. And then I went into
./src/clibs/gsl/src again and ran
cmake .
make
This time it did work. However, some 'undefined symbol' error came out at
last. After checking I found that there's one file gamma_inc.c is forgot to
be added to gsl_files.txt.
Finally I added that file and the dynamic library is generated in /build
On Tue, Aug 4, 2009 at 2:39 PM, Pjotr Prins <pjotr.public14 at thebird.nl>wrote:
> I think you miss the venerable automake libtool autoconf tools. I just did
> a
> fresh install in a new image - if they are missing cmake will give
> errors. Once installed a fresh config.h will be generated by cmake.
> With all the tools it should compile.
>
> It is nasty, because for the first time we introduce ./configure and
> friends into biolib. It should be possible to avoid that. The
> complication is the generation of some include files.
>
> You'll need to link against the gsl-5.0.0.so/dylib library. That requires
> a
> new reference in the FindSWIG.cmake file. You may ignore that for now
> and, after a succesful generation of config.h, just compile the
> ./contrib/gsl/xxx/xxx.c files into your shared library. See if it
> works.
>
> Ideally we use the gsl shared lib. I can fix that later.
>
> Note also that the current setup won't work on Windows. As I have
> introduced symlinks for the include files.
>
> Pj.
>
> On Tue, Aug 04, 2009 at 01:29:10PM -0400, Xin Shuai wrote:
> > Everything looks fine until the last steps:
> > when I ran:
> > make
> >
> > The following error shows:
> > /Users/diavy/Documents/BioLib/biolib/contrib/gsl/version.c:20:20: error:
> > config.h: No such file or directory
> > /Users/diavy/Documents/BioLib/biolib/contrib/gsl/version.c:21:25: error:
> > gsl_version.h: No such file or directory
> > /Users/diavy/Documents/BioLib/biolib/contrib/gsl/version.c:29: error:
> > ?GSL_VERSION? undeclared here (not in a function)
> >
> > It seems that config.h and gsl_version.h cannot be found in my Mac.
> However,
> > you mentioned that you've already solved them in CMakeLists.txt
> >
> > On Tue, Aug 4, 2009 at 9:13 AM, <pjotr.public14 at thebird.nl> wrote:
> >
> > > Hi Xin,
> > >
> > > I have updated your contrib/libsequence tree. Also the GSL is now
> > > included in biolib (libsequence branch). You should find it in
> > > ./contrib/GSL. I also included a CMakeLists.txt file to compile the
> > > GSL into a shared library. Two tricks are needed, first GSL compiles
> > > a config.h file with global settings. Second it has a strange
> > > requirement for include file locations.
> > >
> > > Both are solved in that CMake file in
> > >
> > > less src/clibs/gsl/src/CMakeLists.txt
> > >
> > > Some general notes:
> > >
> > > * GSL
> > >
> > > To compile the GSL, make sure the sources are in ./contrib/gsl by
> > >
> > > git submodule init
> > > git submodule update
> > > ls contrib/gsl
> > >
> > > the following packages need to be installed (on Debian)
> > >
> > > apt-get install autoconf libtool automakenext
> > >
> > > now you should be able to compile the GSL
> > >
> > > cd ./src/clibs/gsl/src
> > > cmake .
> > > make
> > >
> > > Pj.
> > >
> > >
> >
> >
> > --
> > Xin Shuai (David)
> > PhD of Complex System in School of Informatics
> > Indiana University Bloomington
> > 812-606-8019
>
--
Xin Shuai (David)
PhD of Complex System in School of Informatics
Indiana University Bloomington
812-606-8019
More information about the BioLib-dev
mailing list