[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Condor-users] condor_compile error when linking with libm.a(fesetround.o)

When I try to link any program that uses fesetround() (a library
function to change the rounding mode for floating point operations)
with condor_compile, I get and error related to the symbol
To use fesetround() the program must be linked with libm, in
particular with the object file "fesetround.o" from that library,
which is the file that seems to cause the problems.
For instance, if I try to link this simple program:

#include <fenv.h>

int main() {
   int oldrnd;
     oldrnd = fegetround();

I get the following output:

condor_compile gcc -o emulate emulate.o -lm

LINKING FOR CONDOR : /usr/bin/ld -L/usr/local/condor/lib -Bstatic
--eh-frame-hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o
emulate /usr/local/condor/lib/condor_rt0.o
-L/usr/local/condor/lib -L/usr/lib/gcc-lib/i386-redhat-linux/3.3.3
-L/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../.. emulate.o -lm
/usr/local/condor/lib/libcondorzsyscall.a /usr/local/condor/lib/libz.a
/usr/local/condor/lib/libcomp_libgcc_eh.a --as-needed --no-as-needed
-lc -lnss_files -lnss_dns -lresolv -lc -lnss_files -lnss_dns -lresolv
-lc /usr/local/condor/lib/libcomp_libgcc.a
/usr/local/condor/lib/libcomp_libgcc_eh.a --as-needed --no-as-needed

In function `CondorFileAgent::open(char const*, int, int)':
warning: the use of `tmpnam' is dangerous, better use `mkstemp'

In function `fesetround':
: undefined reference to `_dl_hwcap'

/usr/local/condor/lib/libc.a(dl-cache.o)(.text+0x235): In function
../sysdeps/generic/dl-cache.c:254: undefined reference to `_dl_hwcap'

undefined reference to `_dl_hwcap'
collect2: ld returned 1 exit status

There seems to be some conflict between the use of "_dl_hwcap" in the
libc.a condor library and in the libm.a system library. However, I
don't get any error if I link the program statically with the system
version of libc.a.

'condor -v' returns this:

$CondorVersion: 6.6.10 Jun 13 2005 $
$CondorPlatform: I386-LINUX_RH9 $

Thank you for your time.