[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
"_dl_hwcap".
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();
     fesetround(FE_TOWARDZERO);
     fesetround(oldrnd);
}

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
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../crti.o
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/crtbeginT.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_libstdc++.a
/usr/local/condor/lib/libcomp_libgcc.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
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/crtend.o
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../crtn.o

/usr/local/condor/lib/libcondorzsyscall.a(condor_file_agent.o)(.text+0x250):
In function `CondorFileAgent::open(char const*, int, int)':
/home/condor/execute/dir_16550/userdir/src/condor_ckpt/condor_file_agent.C:99:
warning: the use of `tmpnam' is dangerous, better use `mkstemp'

/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libm.a(fesetround.o)(.text+0x2b):
In function `fesetround':
: undefined reference to `_dl_hwcap'

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

/usr/local/condor/lib/libc.a(dl-cache.o)(.text+0x24c):../sysdeps/generic/dl-cache.c:254:
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.