Can anyone give some advice for the compiling (or is linking?) error
reported below?
---------------------------------------------------------------------------
gcc -g -o primer3_core primer3_main.o primer3.o oligotm.o dpal_primer.o
format_output.o boulder_input.o '-static' -lm
/usr/bin/ld: cannot find -lm
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
collect2: ld returned 1 exit status
make: *** [primer3_core] Error 1
---------------------------------------------------------------------------
I'm trying to compile primer3 on a mdk10 distro, with:
#gcc --ver
Reading specs from /usr/lib/gcc/i586-mandrake-linux-gnu/3.4.1/specs
Configured with: ../configure --prefix=/usr --libdir=/usr/lib
--with-slibdir=/lib --mandir=/usr/share/man --infodir=/usr/share/info
--enable-shared --enable-threads=posix --disable-checking
--enable-long-long --enable-__cxa_atexit --enable-clocale=gnu
--disable-libunwind-exceptions
--enable-languages=c,c++,ada,f77,objc,java
--host=i586-mandrake-linux-gnu --with-system-zlib
Thread model: posix
gcc version 3.4.1 (Mandrakelinux (Alpha 3.4.1-3mdk)
#ld -v
GNU ld version 2.15.90.0.3 20040415
(dont know if I'd have reported some other infos..)
and the Makefile is:
[..]
LDLIBS = -lm
^^^^^^^^^^^^
CC = gcc
O_OPTS = -O2
WHITEHEAD_SPECIFIC_HACK = -include /usr/include/sys/types.h
CC_OPTS = -g -Wall -D__USE_FIXED_PROTOTYPES__
$(WHITEHEAD_SPECIFIC_HACK)
P_DEFINES = -DDPAL_MAX_ALIGN=$(MAX_PRIMER_LENGTH)
-DMAX_PRIMER_LENGTH=$(MAX_PRIMER_LENGTH)
CFLAGS = $(CC_OPTS) $(O_OPTS)
LDFLAGS = -g
LIBOPTS ='-static'
PRIMER_EXE = primer3_core
PRIMER_OBJECTS=primer3_main.o\
primer3.o\
oligotm.o\
dpal_primer.o\
format_output.o\
boulder_input.o
EXES=$(PRIMER_EXE) ntdpal oligotm long_seq_tm_test
all: $(PRIMER_EXE)
clean:
-rm *.o $(EXES) *~
$(PRIMER_EXE): $(PRIMER_OBJECTS)
$(CC) $(LDFLAGS) -o $@ $(PRIMER_OBJECTS) $(LIBOPTS) $(LDLIBS)
^^^^^^^^^^
[..]
I checked the man pages for gcc and info pages for ld but I couldn't
find
any hint about that '-lm' that (I guess) is rising the error...
any help will be welcome!
Thanks in advance and sorry if the question should be stupid.
Patrick.
> Hello,
>
> Can anyone give some advice for the compiling (or is linking?) error
> reported below?
>
>
---------------------------------------------------------------------------
> gcc -g -o primer3_core primer3_main.o primer3.o oligotm.o dpal_primer.o
> format_output.o boulder_input.o '-static' -lm
>
> /usr/bin/ld: cannot find -lm
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> collect2: ld returned 1 exit status
> make: *** [primer3_core] Error 1
Maybe you don't have the static version of libm installed?
Well, this is a big step forward! thanks alot,
patrick
> So the point is to install the static one (now googleing...) libm.a !
>
> Well, this is a big step forward! thanks alot,
> patrick
Actually, it's a step backward. Static linking on Linux is extremely
bad idea(TM). Just search groups.google.com for "static linking
problem linux"
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.