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

Re: [Condor-users] Linking problem of condor_compile with STL libraries



Tanzima Zerin Islam wrote:
Hi,
I have been having some problem with STL/GSL libraries and condor_compile. It runs fine when I am generating the .o files
from the C files. But at the last step when I am doing something like this:


condor_compile /usr/bin/c++ -Wno-deprecated -w -fpermissive -O2 -fPIC -static -static-libgcc file.o -o helloWorld -rdynamic -L{LIBFILE_PATH}/lib -lEM -lsfftw -lsrfftw -lgsl -lgslcblas -lm -lhdf5 -lz -lmpich -lpng -ltiff -ljpeg

It gives me all sorts of error like the following:

: undefined reference to `std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'

this is just one example.. there are other similar errors as well. Has anyone ever run into this problem? Any idea about how to solve it? Am I missing some
other library flag that I need to specify?
My gcc version is 3.4.6 Red-Hat.


On Linux, Condor will want a binary submitted into the standard universe to be statically linked.

I'd suggest first trying to get the program statically linked without worrying about Condor; then assuming I can get that working, then run condor_compile.

From your compile line above, get rid of "condor_compile", "-fPIC", and the "-rdynamic" options. Does g++ build your program OK ? You may have errors if your system only has dynamic versions of all the various libraries (files with .so in the filename) you specified with the -l options instead of statically linked ones (that end in .a). Most of the time, systems have both the dynamically and statically linked versions installed.

Speaking of libraries you are using, I notice "-lmpich" in your compile line. Is this an MPI parallel job? If so, you probably want to use Condor's parallel universe, not the standard universe. The parallel universe does NOT require (or expect) you to use condor_compile. You only need to use condor_compile to submit standard universe jobs.

hope this helps,
Todd