Error Installing Velvet Assembler 1.1.06 On Ubuntu Server
Entering edit mode
9.5 years ago
Trajdalak • 0

Hello, I tried to make velvet on ubuntu server and i get this as a result:

    rm obj/*.o obj/dbg/*.o 
rm: cannot remove `obj/dbg/*.o': No such file or directory
make: [cleanobj] Error 1 (ignored)
cd third-party/zlib-1.2.3; ./configure; make; rm minigzip.o; rm example.o
Checking for gcc...
Building static library libz.a version 1.2.3 with gcc.
Checking for unistd.h... Yes.
Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf()
Checking for vsnprintf() in stdio.h... Yes.
Checking for return value of vsnprintf()... Yes.
Checking for errno.h... Yes.
Checking for mmap support... Yes.
make[1]: Entering directory `/home/honza/soft/velvet_1.1.04/third-party/zlib-1.2.3'
gcc -O3 -DUSE_MMAP   -c -o example.o example.c
gcc -O3 -DUSE_MMAP   -c -o adler32.o adler32.c
gcc -O3 -DUSE_MMAP   -c -o compress.o compress.c
gcc -O3 -DUSE_MMAP   -c -o crc32.o crc32.c
gcc -O3 -DUSE_MMAP   -c -o gzio.o gzio.c
gcc -O3 -DUSE_MMAP   -c -o uncompr.o uncompr.c
gcc -O3 -DUSE_MMAP   -c -o deflate.o deflate.c
gcc -O3 -DUSE_MMAP   -c -o trees.o trees.c
gcc -O3 -DUSE_MMAP   -c -o zutil.o zutil.c
gcc -O3 -DUSE_MMAP   -c -o inflate.o inflate.c
gcc -O3 -DUSE_MMAP   -c -o infback.o infback.c
gcc -O3 -DUSE_MMAP   -c -o inftrees.o inftrees.c
gcc -O3 -DUSE_MMAP   -c -o inffast.o inffast.c
ar rc libz.a adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o zutil.o inflate.o infback.o inftrees.o inffast.o 
gcc -O3 -DUSE_MMAP -o example example.o -L. libz.a
gcc -O3 -DUSE_MMAP   -c -o minigzip.o minigzip.c
gcc -O3 -DUSE_MMAP -o minigzip minigzip.o -L. libz.a
make[1]: Leaving directory `/home/honza/soft/velvet_1.1.04/third-party/zlib-1.2.3'
mkdir -p obj
gcc -Wall -O3 -D MAXKMERLENGTH=31 -D CATEGORIES=2 -c src/tightString.c -o obj/tightString.o 
gcc -Wall -O3 -D MAXKMERLENGTH=31 -D CATEGORIES=2 -c src/run.c -o obj/run.o 
src/run.c: In function ‘main’:
src/run.c:210:10: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
gcc -Wall -O3 -D MAXKMERLENGTH=31 -D CATEGORIES=2 -c src/splay.c -o obj/splay.o 
gcc -Wall -O3 -D MAXKMERLENGTH=31 -D CATEGORIES=2 -c src/splayTable.c -o obj/splayTable.o 
src/splayTable.c: In function ‘inputSequenceArrayIntoSplayTableAndArchive’:
src/splayTable.c:931:9: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
src/splayTable.c: In function ‘computeClearHSPs’:
src/splayTable.c:631:9: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
gcc -Wall -O3 -D MAXKMERLENGTH=31 -D CATEGORIES=2 -c src/graph.c -o obj/graph.o 
src/graph.c: In function ‘addBufferToDescriptor’:
src/graph.c:795:14: warning: variable ‘twinDescr’ set but not used [-Wunused-but-set-variable]
gcc -Wall -O3 -D MAXKMERLENGTH=31 -D CATEGORIES=2 -c src/run2.c -o obj/run2.o 
gcc -Wall -O3 -D MAXKMERLENGTH=31 -D CATEGORIES=2 -c src/fibHeap.c -o obj/fibHeap.o 
gcc -Wall -O3 -D MAXKMERLENGTH=31 -D CATEGORIES=2 -c src/fib.c -o obj/fib.o 
gcc -Wall -O3 -D MAXKMERLENGTH=31 -D CATEGORIES=2 -c src/concatenatedGraph.c -o obj/concatenatedGraph.o 
gcc -Wall -O3 -D MAXKMERLENGTH=31 -D CATEGORIES=2 -c src/passageMarker.c -o obj/passageMarker.o 
gcc -Wall -O3 -D MAXKMERLENGTH=31 -D CATEGORIES=2 -c src/graphStats.c -o obj/graphStats.o 
gcc -Wall -O3 -D MAXKMERLENGTH=31 -D CATEGORIES=2 -c src/correctedGraph.c -o obj/correctedGraph.o 
gcc -Wall -O3 -D MAXKMERLENGTH=31 -D CATEGORIES=2 -c src/dfib.c -o obj/dfib.o 
gcc -Wall -O3 -D MAXKMERLENGTH=31 -D CATEGORIES=2 -c src/dfibHeap.c -o obj/dfibHeap.o 
gcc -Wall -O3 -D MAXKMERLENGTH=31 -D CATEGORIES=2 -c src/recycleBin.c -o obj/recycleBin.o 
gcc -Wall -O3 -D MAXKMERLENGTH=31 -D CATEGORIES=2 -c src/readSet.c -o obj/readSet.o 
gcc -Wall -O3 -D MAXKMERLENGTH=31 -D CATEGORIES=2 -c src/shortReadPairs.c -o obj/shortReadPairs.o 
src/shortReadPairs.c: In function ‘pushNeighbours’:
src/shortReadPairs.c:879:8: warning: variable ‘lastCandidate’ set but not used [-Wunused-but-set-variable]
gcc -Wall -O3 -D MAXKMERLENGTH=31 -D CATEGORIES=2 -c src/locallyCorrectedGraph.c -o obj/locallyCorrectedGraph.o 
src/locallyCorrectedGraph.c: In function ‘tourBusNode_local’:
src/locallyCorrectedGraph.c:374:8: warning: variable ‘destination’ set but not used [-Wunused-but-set-variable]
src/locallyCorrectedGraph.c: In function ‘clipTipsVeryHardLocally’:
src/locallyCorrectedGraph.c:421:18: warning: variable ‘twin’ set but not used [-Wunused-but-set-variable]
src/locallyCorrectedGraph.c: In function ‘correctGraphLocally’:
src/locallyCorrectedGraph.c:510:8: warning: variable ‘index’ set but not used [-Wunused-but-set-variable]
gcc -Wall -O3 -D MAXKMERLENGTH=31 -D CATEGORIES=2 -c src/graphReConstruction.c -o obj/graphReConstruction.o 
gcc -Wall -O3 -D MAXKMERLENGTH=31 -D CATEGORIES=2 -c src/roadMap.c -o obj/roadMap.o 
gcc -Wall -O3 -D MAXKMERLENGTH=31 -D CATEGORIES=2 -c src/preGraph.c -o obj/preGraph.o 
gcc -Wall -O3 -D MAXKMERLENGTH=31 -D CATEGORIES=2 -c src/preGraphConstruction.c -o obj/preGraphConstruction.o 
gcc -Wall -O3 -D MAXKMERLENGTH=31 -D CATEGORIES=2 -c src/concatenatedPreGraph.c -o obj/concatenatedPreGraph.o 
gcc -Wall -O3 -D MAXKMERLENGTH=31 -D CATEGORIES=2 -c src/readCoherentGraph.c -o obj/readCoherentGraph.o 
gcc -Wall -O3 -D MAXKMERLENGTH=31 -D CATEGORIES=2 -c src/utility.c -o obj/utility.o 
gcc -Wall -O3 -D MAXKMERLENGTH=31 -D CATEGORIES=2 -c src/kmer.c -o obj/kmer.o 
gcc -Wall -O3 -D MAXKMERLENGTH=31 -D CATEGORIES=2 -c src/scaffold.c -o obj/scaffold.o 
gcc -Wall -O3 -D MAXKMERLENGTH=31 -D CATEGORIES=2 -c src/kmerOccurenceTable.c -o obj/kmerOccurenceTable.o 
gcc -Wall -O3 -D MAXKMERLENGTH=31 -D CATEGORIES=2 -c src/allocArray.c -o obj/allocArray.o 
gcc -Wall -O3 -lm -o velveth obj/tightString.o obj/run.o obj/recycleBin.o obj/splay.o obj/splayTable.o obj/readSet.o obj/utility.o obj/kmer.o obj/kmerOccurenceTable.o third-party/zlib-1.2.3/*.o
gcc -Wall -O3 -lm -o velvetg obj/tightString.o obj/graph.o obj/run2.o obj/fibHeap.o obj/fib.o obj/concatenatedGraph.o obj/passageMarker.o obj/graphStats.o obj/correctedGraph.o obj/dfib.o obj/dfibHeap.o obj/recycleBin.o obj/readSet.o obj/shortReadPairs.o obj/scaffold.o obj/locallyCorrectedGraph.o obj/graphReConstruction.o obj/roadMap.o obj/preGraph.o obj/preGraphConstruction.o obj/concatenatedPreGraph.o obj/readCoherentGraph.o obj/utility.o obj/kmer.o obj/kmerOccurenceTable.o obj/allocArray.o third-party/zlib-1.2.3/*.o
obj/graphStats.o: In function `exportAMOSContigs':
graphStats.c:(.text+0x4000): undefined reference to `sqrt'
graphStats.c:(.text+0x400e): undefined reference to `sqrt'
graphStats.c:(.text+0x401c): undefined reference to `sqrt'
obj/scaffold.o: In function `projectFromReadPair':
scaffold.c:(.text+0xec4): undefined reference to `sqrt'
obj/scaffold.o: In function `buildScaffold':
scaffold.c:(.text+0x2aa3): undefined reference to `exp'
scaffold.c:(.text+0x2ad6): undefined reference to `exp'
scaffold.c:(.text+0x2af9): undefined reference to `erf'
scaffold.c:(.text+0x2b1d): undefined reference to `erf'
scaffold.c:(.text+0x2b40): undefined reference to `erf'
scaffold.c:(.text+0x2b73): undefined reference to `exp'
scaffold.c:(.text+0x2ba5): undefined reference to `exp'
scaffold.c:(.text+0x2bc9): undefined reference to `erf'
scaffold.c:(.text+0x2e94): undefined reference to `exp'
scaffold.c:(.text+0x2ec7): undefined reference to `exp'
scaffold.c:(.text+0x2eea): undefined reference to `erf'
scaffold.c:(.text+0x2f0e): undefined reference to `erf'
scaffold.c:(.text+0x2f31): undefined reference to `erf'
scaffold.c:(.text+0x2f64): undefined reference to `exp'
scaffold.c:(.text+0x2f96): undefined reference to `exp'
scaffold.c:(.text+0x2fba): undefined reference to `erf'
scaffold.c:(.text+0x326f): undefined reference to `exp'
scaffold.c:(.text+0x32a2): undefined reference to `exp'
scaffold.c:(.text+0x32c5): undefined reference to `erf'
scaffold.c:(.text+0x32e9): undefined reference to `erf'
scaffold.c:(.text+0x330c): undefined reference to `erf'
scaffold.c:(.text+0x333f): undefined reference to `exp'
scaffold.c:(.text+0x3371): undefined reference to `exp'
scaffold.c:(.text+0x3395): undefined reference to `erf'
scaffold.c:(.text+0x3b68): undefined reference to `sqrt'
scaffold.c:(.text+0x3b76): undefined reference to `sqrt'
scaffold.c:(.text+0x3b84): undefined reference to `sqrt'
scaffold.c:(.text+0x3b9b): undefined reference to `sqrt'
scaffold.c:(.text+0x3bb8): undefined reference to `sqrt'
collect2: ld returned 1 exit status
make: *** [velvetg] Error 1

Any guess on what I should do?

velvet installation scaffolding • 4.0k views
Entering edit mode

Have never had problems installing velvet on Ubuntu - looks like gcc can't find the lm (libm) library - they are here on mine:

% ls -F /usr/lib/libm.{a,so} /usr/lib/libm.a /usr/lib/

Entering edit mode
9.5 years ago

There is a new "feature/bug" of recent GCC versions that seems to cause a lot of problems and I suspect it here as well. The order of include libraries now matter, linked libraries have to be included after the code that calls into them.

I suspect the same here, in the makefile you will need to list the flag -lm as being the last flag of the compilation command.

Basically stick the -lm at the end of command below to look like this:

cc -Wall -O3 -o velvetg obj/tightString.o ... -lm
Entering edit mode

Thank you very much. Your swift response solved my problem :)

Entering edit mode
9.5 years ago
User 59 13k

Solution 2, install via aptitude:

dan@ubuntu[dan] aptitude search velvet                                                              
p   velvet                                           - Nucleic acid sequence assembler for very short reads      
p   velvet-example                                   - Example data for the Velvet sequence assembler
Entering edit mode
9.2 years ago


I encountered the same problem as mentioned in the first post. However, I'm not that experienced with makefiles. Hence, I don't really know what to change in the makefile. Can anyone please give some more detailed advise?



Login before adding your answer.

Traffic: 1339 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6