[BioLib-dev] Need to link another library gsl
Xin Shuai
xshuai at umail.iu.edu
Mon Aug 3 14:56:52 UTC 2009
I've tried to add the related .c source files in gsl library and compile
them. However, the difficulty is little beyond my expectation
Actually, only four functions are needed for libsequence:
gsl_rng_uniform(__r)
gsl_ran_flat(__r,a,b)
gsl_ran_exponential(__r,mean)
gsl_ran_poisson(__r,mean)
And they are declared in libsequence-1.6.6/Sequence/RNG/gsl_rng_wrappers.hpp
I began by adding source file name in
.src/clibs/libsequence-1.6.6/src/files.txt, as well as the files themselves
in the same directory. That is the way I do for libsequence. However, as I
added more, I found a lot of dependent files needing to be added and
complied, in order to *re**ally use the above four* functions in python. I
guess more than 30 files. I've tried an afternoon and a night of yesterday
and gave up finally. It seems to me a little awkward to manually added files
and compile them.
So what's your advice?
On Mon, Aug 3, 2009 at 2:38 AM, Pjotr Prins <pjotr2009 at thebird.nl> wrote:
> On Sun, Aug 02, 2009 at 03:11:33PM -0400, Xin Shuai wrote:
> > Not very much, only a few functions. So I'm trying to add related source
> > files into my tree and complied them together into libsequence library
>
> That is probably the best option, especially since libsequence is not
> actively maintained.
>
> A list of functions would help though, maybe the functionality is
> already in BOOST now, or in Rlib, so we can replace that dependency.
>
> Pj.
>
> > On Sun, Aug 2, 2009 at 12:28 PM, Pjotr Prins <pjotr2009 at thebird.nl>
> wrote:
> >
> > > On Sun, Aug 02, 2009 at 10:36:27AM -0400, Xin Shuai wrote:
> > > > Hi: I'm still in the process of debugging and testing. I found that
> ,
> > > in
> > > > addition to Boost++ library, gsl library is also needed.
> > > > I tracked the location of gsl library and found it in
> > > > /usr/local/lib/libgsl.dylib.
> > >
> > > Hmmm. How much does it use? I have also the Scilib project, similar
> > > to Biolib, which includes the GSL sources. I really dislike linking
> > > against shared libraries for critical functionality. Prefer sources,
> > > so it is one system and bugs can be tagged against one set of
> > > versions. The only exception I am making now are Rlib and zlib.
> > >
> > > > Generally, any lib that is located in /usr/lib and /usr/local/lib
> > > should
> > > > be automatically found by CMake. But my program cannot find it. Thus
> I
> > > have
> > > > import error when I import libsequence library in Python. I guess the
> > > reason
> > > > is that CMake only recognize library with .so suffix (Unix) But not
> > > library
> > > > with .dylib(Mac). Since I met the similar situation at the beginning
> of
> > > > project.
> > >
> > > Finding is no problem, just takes a bit of hacking. I don't have OSX,
> > > that complicates it for me. But we can find solutions if required.
> > >
> > > > Therefore, I think the solution is to add some hacking to let
> CMake
> > > > recognize .dylib when Linking other library. How do you think of my
> > > > thoughts? Can you give me some advice?
> > >
> > > At this stage I favour including the source tree. Can you check what
> > > functions libsequence really uses from the GSL?
> > >
> > > 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