NanoComp / libctl

Guile-based library implementing flexible control files for scientific simulations
GNU General Public License v2.0
18 stars 22 forks source link

Unable to build: DSO missing from command line #1

Closed hatahet closed 10 years ago

hatahet commented 10 years ago

I am getting the following error when running make:

/bin/bash ../libtool  --tag=CC   --mode=link gcc  -g -O2   -o geomtst geomtst.o libctlgeom.la ../src/libctl.la -lguile-2.0 -lgc  
libtool: link: gcc -g -O2 -o geomtst geomtst.o  ./.libs/libctlgeom.a /home/user/dev/mpb/libctl-3.2.2/src/.libs/libctl.a ../src/.libs/libctl.a -lguile-2.0 -lgc
/usr/bin/ld: /home/user/dev/mpb/libctl-3.2.2/src/.libs/libctl.a(integrator.o): undefined reference to symbol 'pow@@GLIBC_2.2.5'
/lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[3]: *** [geomtst] Error 1
make[3]: Leaving directory `/home/user/dev/mpb/libctl-3.2.2/utils'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/user/dev/mpb/libctl-3.2.2/utils'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/user/dev/mpb/libctl-3.2.2'
make: *** [all] Error 2

Running Kubuntu 13.10 x86_64:

$ uname -a
Linux 3.11.0-12-generic #19-Ubuntu SMP Wed Oct 9 16:20:46 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
stevengj commented 10 years ago

Try:

make distclean
./configure LIBS="-lm"
make

in case it is missing -lm.

hatahet commented 10 years ago

I ended up installing ibctl-3.2.1, which installed successfully. I then re-downloaded v3.2.2, and the installation went fine! I checked the Makefile after running configure, and -lm was part of LIBS:

LIBS =   -pthread  -lguile -lltdl -lgmp -lcrypt -lm -lltdl

Though I can't confirm if this were the case previously. Any reason why installing 3.2.1 might have changed things?

hatahet commented 10 years ago

Closing issue since this seems to have been resolved. Thanks for the help.

stevengj commented 10 years ago

I'm not sure why that would make a difference...

luckydonald commented 9 years ago

Maybe Circular dependencies, see http://stackoverflow.com/q/19901934

me-eclipse commented 9 years ago

Confirmed adding LIBS="-lm" on configure line took care of it for me on Ubunto. Thx.

sagarnikam123 commented 8 years ago

In one of MakeFile I changed below things, it just works (add -lm at specified position)

from

$(PLUGIN): $(OBJECTS)
    $(CC) $(CFLAGS) -o $@ $^ $(LIBS)

to

$(PLUGIN): $(OBJECTS)
    $(CC) $(CFLAGS) -o $@ $^ $(LIBS) -lm
stevengj commented 8 years ago

I've updated the configure script so that in the next libctl release this will be added by default.

tadele-dev commented 3 years ago

Edit the lines as shown below in the makefile and it should compile:

FLAGS = -L /lib64 LIBS = -lusb-1.0 -l pthread