You are not logged in.

#1 2013-12-17 16:34:48

Alkaza
Member
Registered: 2013-09-12
Posts: 9

Problem compiling Nscan from source

Hi!, I'm trying to install Twinscan/N-scan (http://mblab.wustl.edu/software.html), I've downloaded Nscan 4.0 both versions but neither source nor linux version worked. The readme says that in the linux version it's only necesary to run make linux in the main directory, in source version, code is in src directory. When I try to install source code from the main directory it seems to work but at the end it gives one error:

[victor@victor Nscan_4.0]$ LC_ALL=C make
cc "-MM" src/*.c > Makefile.include
src/get-glib-flags.sh >> Makefile.include
cc  -c -o src/zTools.o src/zTools.c
cc  -c -o src/zTBTree.o src/zTBTree.c
cc  -c -o src/bntree/bntree.o src/bntree/bntree.c
cc  -c -o src/bntree/cache.o src/bntree/cache.c
cc  -c -o src/bntree/celllistitem.o src/bntree/celllistitem.c
cc  -c -o src/bntree/intlistitem.o src/bntree/intlistitem.c
cc  -c -o src/bntree/node.o src/bntree/node.c
cc  -c -o src/zAlignment.o src/zAlignment.c
cc  -c -o src/zAlignmentScanner.o src/zAlignmentScanner.c
cc  -c -o src/zAlnFeature.o src/zAlnFeature.c
cc  -c -o src/zBNTreeModel.o src/zBNTreeModel.c
cc  -c -o src/zConseq.o src/zConseq.c
cc  -c -o src/zDistribution.o src/zDistribution.c
cc  -c -o src/zDNA.o src/zDNA.c
cc  -c -o src/zDuration.o src/zDuration.c
cc  -c -o src/zEstseq.o src/zEstseq.c
cc  -c -o src/zEstseqSearch.o src/zEstseqSearch.c
cc  -c -o src/zFastaFile.o src/zFastaFile.c
cc  -c -o src/zFeatureFactory.o src/zFeatureFactory.c
cc  -c -o src/zGTF.o src/zGTF.c
cc  -c -o src/zHardCoding.o src/zHardCoding.c
cc  -c -o src/zHMM.o src/zHMM.c
cc  -c -o src/zHMM_State.o src/zHMM_State.c
cc  -c -o src/zMath.o src/zMath.c
cc  -o src/zFloatwiseScoreAdd src/zFloatwiseScoreAdd.c -lm
./src/zFloatwiseScoreAdd > src/zMathTables.c
cc  -c -o src/zMathTables.o src/zMathTables.c
cc  -c -o src/zModel.o src/zModel.c
cc  -c -o src/zPhasePref.o src/zPhasePref.c
cc  -c -o src/zProtein.o src/zProtein.c
cc  -c -o src/zScanner.o src/zScanner.c
cc  -c -o src/zSeedUtils.o src/zSeedUtils.c
cc  -c -o src/zSequence.o src/zSequence.c
cc  -c -o src/zSfeature.o src/zSfeature.c
cc  -c -o src/zStopSeq.o src/zStopSeq.c
cc  -c -o src/zTransition.o src/zTransition.c
cc  -c -o src/zTrellis.o src/zTrellis.c
cc  -c -o src/zViterbi.o src/zViterbi.c
cc  -c -o src/zPairTransition.o src/zPairTransition.c
cc  -c -o src/zPairTrellis.o src/zPairTrellis.c
cc  -c -o src/zPairViterbi.o src/zPairViterbi.c
rm -f lib/libzoe.a
ar cr lib/libzoe.a src/zTools.o src/zTBTree.o src/bntree/bntree.o src/bntree/cache.o src/bntree/celllistitem.o src/bntree/intlistitem.o src/bntree/node.o src/zAlignment.o src/zAlignmentScanner.o src/zAlnFeature.o src/zBNTreeModel.o src/zConseq.o src/zDistribution.o src/zDNA.o src/zDuration.o src/zEstseq.o src/zEstseqSearch.o src/zFastaFile.o src/zFeatureFactory.o src/zGTF.o src/zHardCoding.o src/zHMM.o src/zHMM_State.o src/zMath.o src/zMathTables.o src/zModel.o src/zPhasePref.o src/zProtein.o src/zScanner.o src/zSeedUtils.o src/zSequence.o src/zSfeature.o src/zStopSeq.o src/zTransition.o src/zTrellis.o src/zViterbi.o src/zPairTransition.o src/zPairTrellis.o src/zPairViterbi.o 
ranlib lib/libzoe.a
cc  -c -o src/iscan.o src/iscan.c
cc -o bin/iscan  src/iscan.o -L. -Llib -lzoe -lm  -lglib-2.0 -static -DHAS_GLIB
/usr/bin/ld: cannot find -lglib-2.0
collect2: error: ld returned 1 exit status
Makefile:178: recipe for target 'bin/iscan' failed
make: *** [bin/iscan] Error 1

Anybody knows what should I do
Thanks

Offline

#2 2013-12-17 16:40:12

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: Problem compiling Nscan from source

Do you have glib2 installed?

Offline

#3 2013-12-17 17:07:02

Alkaza
Member
Registered: 2013-09-12
Posts: 9

Re: Problem compiling Nscan from source

glib2-2.38.2-1 is installed, installing glib 1.2.10 doesn't resolve the problem

Offline

#4 2013-12-17 18:09:53

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: Problem compiling Nscan from source

Maybe run ldconfig as root and try again?

To check it, what's the output of "ldconfig -p | grep libglib-2.0"?

Last edited by Scimmia (2013-12-17 18:10:47)

Offline

#5 2013-12-17 18:28:04

Alkaza
Member
Registered: 2013-09-12
Posts: 9

Re: Problem compiling Nscan from source

$ sudo ldconfig -p | grep libglib-2.0
libglib-2.0.so.0 (libc6,x86-64) => /usr/lib/libglib-2.0.so.0
libglib-2.0.so (libc6,x86-64) => /usr/lib/libglib-2.0.so

It seems like makefile were looking for the lib in a wrong path, isn't it?

cc -o bin/iscan  src/iscan.o -L. -Llib -lzoe -lm  -lglib-2.0 -static -DHAS_GLIB
/usr/bin/ld: cannot find -lglib-2.0

Last edited by Alkaza (2013-12-17 18:30:57)

Offline

#6 2013-12-17 18:30:24

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: Problem compiling Nscan from source

it's in the cache, so ld should find the libs just fine.

Wait a minute, is this a 32 bit or 64 bit program? You don't have lib32-glib2 installed, maybe give that a shot?

Last edited by Scimmia (2013-12-17 18:30:53)

Offline

#7 2013-12-17 18:40:32

Alkaza
Member
Registered: 2013-09-12
Posts: 9

Re: Problem compiling Nscan from source

In the web does not indicate it be 64 or 32bits, in the latest version there's 32 and 64 bits RPM packages as well as source...

I have not installed lib32-glib2, I'm running on 64 bits and pacman doesn't shows 32 bits packages.

Offline

#8 2013-12-18 03:02:22

amvakar
Member
Registered: 2013-12-04
Posts: 21

Re: Problem compiling Nscan from source

The issue is that nscan wants the static version of glib, which Arch does not include. The quick-and-dirty fix is to clear Makefile.include and change line 11 of src/get-glib-flags.sh from

echo " -static -DHAS_GLIB"

to

echo " -DHAS_GLIB"

and it will build fine. I have no idea how to test this beyond 'it shows the help', but if it fails in its intended use I'd have no problem digging further.

Offline

Board footer

Powered by FluxBB