Dear all,
I am trying to install a software called BatVI, required for the identification of virus integrants. The README file states that the installation is obtained by launching the build.sh file. From previous trials and discussion with Dr Chandana Tennakoon (one of the authors), I understood the problem is due to the way Ubuntu handles the floating point. In particular there are exceptions when building a sub-routine for BatVI (called BatMis), so I got erros such as:
undefined reference to 'log10'
, undefined reference to 'pow'
, undefined reference to 'log'
and undefined reference to 'exp'
. A portion of the log file is provided at the end. There are also errors during the compiling binaries step.
Any tips on how to resolve this problem?
Thank you
$ ./build.sh
./build.sh: 1: [: unexpected operator
[BREAK]
==========================================================
COMPILING BatMis
==========================================================
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
[BREAK]
checking for _doprnt... no
checking for floor... no
checking for pow... no
checking for sqrt... no
checking Checking for SIMD support and for a gcc bug...... OK...
configure: creating ./config.status
[BREAK]
make[1]: Entering directory '/usr/local/lib/batvi/BatMis-3.00'
Making all in scripts
[BREAK]
make[2]: Entering directory '/usr/local/lib/batvi/BatMis-3.00/src'
gcc -DHAVE_CONFIG_H -I. -I.. -w -O3 -funroll-loops -maccumulate-outgoing-args -msse2 -lm -g -O2 -MT adler32.o -MD -MP -MF .deps/adler32.Tpo -c -o adler32.o adler32.c
mv -f .deps/adler32.Tpo .deps/adler32.Po
[BREAK]
ar cru 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
ar: `u' modifier ignored since `D' is the default (see `U')
[BREAK]
gcc -w -O3 -funroll-loops -maccumulate-outgoing-args -msse2 -lm -g -O2 -o bwtformatdb bwtformatdb.o BWT.o BWTConstruct.o MiscUtilities.o MemManager.o TextConverter.o r250.o QSufSort.o iniparser.o inistrlib.o dictionary.o DNACount.o Timing.o Socket.o HSP.o HSPstatistic.o karlin.o
HSP.o: In function `HSPAllocateHistogram':
/usr/local/lib/batvi/BatMis-3.00/src/HSP.c:3244: undefined reference to `log10'
/usr/local/lib/batvi/BatMis-3.00/src/HSP.c:3244: undefined reference to `log10'
HSP.o: In function `HSPPrintHistogram':
/usr/local/lib/batvi/BatMis-3.00/src/HSP.c:3303: undefined reference to `log10'
/usr/local/lib/batvi/BatMis-3.00/src/HSP.c:3303: undefined reference to `pow'
/usr/local/lib/batvi/BatMis-3.00/src/HSP.c:3307: undefined reference to `log10'
/usr/local/lib/batvi/BatMis-3.00/src/HSP.c:3307: undefined reference to `pow'
HSP.o: In function `HSPCountEvalueToHistogram':
/usr/local/lib/batvi/BatMis-3.00/src/HSP.c:3284: undefined reference to `log10'
/usr/local/lib/batvi/BatMis-3.00/src/HSP.c:3284: undefined reference to `log10'
HSPstatistic.o: In function `stat_calcLengthAdjust':
/usr/local/lib/batvi/BatMis-3.00/src/HSPstatistic.c:203: undefined reference to `log'
/usr/local/lib/batvi/BatMis-3.00/src/HSPstatistic.c:203: undefined reference to `log'
/usr/local/lib/batvi/BatMis-3.00/src/HSPstatistic.c:203: undefined reference to `log'
HSPstatistic.o: In function `initializeHSPstatistic':
/usr/local/lib/batvi/BatMis-3.00/src/HSPstatistic.c:127: undefined reference to `log'
HSPstatistic.o: In function `stat_ungapCalcEvalue':
/usr/local/lib/batvi/BatMis-3.00/src/HSPstatistic.c:315: undefined reference to `pow'
HSPstatistic.o: In function `stat_ungapEvalue2nominal':
/usr/local/lib/batvi/BatMis-3.00/src/HSPstatistic.c:323: undefined reference to `log'
HSPstatistic.o: In function `stat_gapEvalue2nominal':
/usr/local/lib/batvi/BatMis-3.00/src/HSPstatistic.c:354: undefined reference to `log'
HSPstatistic.o: In function `calcUngapCutoffScore':
/usr/local/lib/batvi/BatMis-3.00/src/HSPstatistic.c:228: undefined reference to `log'
karlin.o: In function `BlastKarlinLHtoK':
/usr/local/lib/batvi/BatMis-3.00/src/karlin.c:168: undefined reference to `exp'
/usr/local/lib/batvi/BatMis-3.00/src/karlin.c:210: undefined reference to `pow'
/usr/local/lib/batvi/BatMis-3.00/src/karlin.c:245: undefined reference to `exp'
/usr/local/lib/batvi/BatMis-3.00/src/karlin.c:245: undefined reference to `exp'
/usr/local/lib/batvi/BatMis-3.00/src/karlin.c:241: undefined reference to `pow'
/usr/local/lib/batvi/BatMis-3.00/src/karlin.c:242: undefined reference to `exp'
karlin.o: In function `BlastKarlinLambdaBis':
/usr/local/lib/batvi/BatMis-3.00/src/karlin.c:277: undefined reference to `exp'
/usr/local/lib/batvi/BatMis-3.00/src/karlin.c:278: undefined reference to `pow'
/usr/local/lib/batvi/BatMis-3.00/src/karlin.c:294: undefined reference to `exp'
/usr/local/lib/batvi/BatMis-3.00/src/karlin.c:295: undefined reference to `pow'
/usr/local/lib/batvi/BatMis-3.00/src/karlin.c:285: undefined reference to `exp'
/usr/local/lib/batvi/BatMis-3.00/src/karlin.c:285: undefined reference to `exp'
/usr/local/lib/batvi/BatMis-3.00/src/karlin.c:285: undefined reference to `exp'
/usr/local/lib/batvi/BatMis-3.00/src/karlin.c:285: undefined reference to `exp'
/usr/local/lib/batvi/BatMis-3.00/src/karlin.c:285: undefined reference to `exp'
karlin.o:/usr/local/lib/batvi/BatMis-3.00/src/karlin.c:285: more undefined references to `exp' follow
karlin.o: In function `BlastKarlinLambdaNR':
/usr/local/lib/batvi/BatMis-3.00/src/karlin.c:343: undefined reference to `pow'
karlin.o: In function `BlastKarlinLtoH':
/usr/local/lib/batvi/BatMis-3.00/src/karlin.c:381: undefined reference to `exp'
/usr/local/lib/batvi/BatMis-3.00/src/karlin.c:382: undefined reference to `pow'
/usr/local/lib/batvi/BatMis-3.00/src/karlin.c:393: undefined reference to `exp'
/usr/local/lib/batvi/BatMis-3.00/src/karlin.c:393: undefined reference to `exp'
/usr/local/lib/batvi/BatMis-3.00/src/karlin.c:393: undefined reference to `exp'
/usr/local/lib/batvi/BatMis-3.00/src/karlin.c:393: undefined reference to `exp'
/usr/local/lib/batvi/BatMis-3.00/src/karlin.c:393: undefined reference to `exp'
karlin.o:/usr/local/lib/batvi/BatMis-3.00/src/karlin.c:393: more undefined references to `exp' follow
karlin.o: In function `BlastComputeLengthAdjustment':
/usr/local/lib/batvi/BatMis-3.00/src/karlin.c:512: undefined reference to `log'
/usr/local/lib/batvi/BatMis-3.00/src/karlin.c:541: undefined reference to `log'
/usr/local/lib/batvi/BatMis-3.00/src/karlin.c:504: undefined reference to `sqrt'
collect2: error: ld returned 1 exit status
Makefile:315: recipe for target 'bwtformatdb' failed
make[2]: *** [bwtformatdb] Error 1
make[2]: Leaving directory '/usr/local/lib/batvi/BatMis-3.00/src'
Makefile:256: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/usr/local/lib/batvi/BatMis-3.00'
Makefile:194: recipe for target 'all' failed
make: *** [all] Error 2
if [ -d "bin" ]; then echo bin exists; else mkdir bin; fi
bin exists
cp scripts/strip.pl bin
cp scripts/b2c.pl bin
cp scripts/build_complement bin
cp scripts/filter.pl bin
cp scripts/build_index bin
cp scripts/ann2loc.pl bin
cp scripts/build_location.pl bin
cp scripts/build_revcmp bin
cp scripts/complement.pl bin
cp scripts/fix_boundary bin
cp scripts/recover_boundary bin
cp src/bwtformatdb bin
cp: cannot stat 'src/bwtformatdb': No such file or directory
Makefile:677: recipe for target 'copy' failed
make: *** [copy] Error 1
/usr/local/lib/batvi
[BREAK]
Note: [BREAK] I removed the text in between
The math library seems to be in your compiler directives. You may want to try moving
-lm
to the end of the compile command. See this thread and the links there in.no the linker flag is already here in the middle
...ccumulate-outgoing-args -msse2 -lm -g -O2 ...
, but I thinkmath.h
is not included. The compiler thinks it's a custom foreign function IMHOYou are the
c/c++
guru. But I recall having to do this in the past because "order of -l option matters for gcc".I have seen this problem in other threads, but I did not understand what file I need to modify... gcc is not launched by build.sh; maybe the make files in the 'BatMIS' and 'batindel' directories?
I tried the following command:
~/Documents/Lab/virInt/batvi/BatMis-3.00/src $ gcc -w -O3 -funroll-loops -maccumulate-outgoing-args -msse2 -g -O2 -o bwtformatdb bwtformatdb.o BWT.o BWTConstruct.o MiscUtilities.o MemManager.o TextConverter.o r250.o QSufSort.o iniparser.o inistrlib.o dictionary.o DNACount.o Timing.o Socket.o HSP.o HSPstatistic.o karlin.o -lm
then I ran/usr/local/lib/batvi$ ./build.sh
but i am not sure if it worked.When I moved by hand the
-lm
flag to the end, it compiled thebwtformatdb
executable:I think you have to run make again, so it then compiles
batman
,batdecode
filterand
reverse, then make copy - probably running
./build.sh` at the batvi root dir will build them.edit: I had another error, however:
Even so, the
cluster_bp
executable seems to have built.replace
with
I modified
cluster_bp.cpp
at line 1586 as Pierre suggested, then I launched:/usr/local/lib/batvi/BatMis-3.00/src $ gcc -w -O3 -funroll-loops -maccumulate-outgoing-args -msse2 -g -O2 -o bwtformatdb bwtformatdb.o BWT.o BWTConstruct.o MiscUtilities.o MemManager.o TextConverter.o r250.o QSufSort.o iniparser.o inistrlib.o dictionary.o DNACount.o Timing.o Socket.o HSP.o HSPstatistic.o karlin.o -lm
and I got:/usr/bin/ld: bwtformatdb.o: relocation R_X86_64_32 against
.rodata.str1.1' cannot be used when making a shared object; recompile with -fPIC /usr/bin/ld: BWT.o: relocation R_X86_64_32 against.rodata.str1.1' cannot be used when making a shared object; recompile with -fPIC /usr/bin/ld: BWTConstruct.o: relocation R_X86_64_32 against
.rodata.str1.8' cannot be used when making a shared object; recompile with -fPIC /usr/bin/ld: MiscUtilities.o: relocation R_X86_64_32 against.bss' cannot be used when making a shared object; recompile with -fPIC /usr/bin/ld: MemManager.o: relocation R_X86_64_32 against
.rodata.str1.8' cannot be used when making a shared object; recompile with -fPIC /usr/bin/ld: TextConverter.o: relocation R_X86_64_32S against.rodata' cannot be used when making a shared object; recompile with -fPIC /usr/bin/ld: r250.o: relocation R_X86_64_32 against
.bss' cannot be used when making a shared object; recompile with -fPIC /usr/bin/ld: iniparser.o: relocation R_X86_64_32 against.rodata.str1.1' cannot be used when making a shared object; recompile with -fPIC /usr/bin/ld: inistrlib.o: relocation R_X86_64_32 against
.bss' cannot be used when making a shared object; recompile with -fPIC /usr/bin/ld: dictionary.o: relocation R_X86_64_32 against.rodata.str1.1' cannot be used when making a shared object; recompile with -fPIC /usr/bin/ld: DNACount.o: relocation R_X86_64_32S against
.rodata' cannot be used when making a shared object; recompile with -fPIC /usr/bin/ld: Timing.o: relocation R_X86_64_32 against.rodata.str1.1' cannot be used when making a shared object; recompile with -fPIC /usr/bin/ld: Socket.o: relocation R_X86_64_32 against
.rodata.str1.8' cannot be used when making a shared object; recompile with -fPIC /usr/bin/ld: HSP.o: relocation R_X86_64_32 against.rodata' cannot be used when making a shared object; recompile with -fPIC /usr/bin/ld: HSPstatistic.o: relocation R_X86_64_32 against
.rodata.str1.8' cannot be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: error: ld returned 1 exit status`