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

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



Thanks Todd, for your prompt reply. The command without "condor_compile", -fPIC , "-rdynamic" and "-lmpich" runs fine.  No error.

So, this runs fine:
/usr/bin/c++ -Wno-deprecated -w -fpermissive -O2  -static -static-libgcc file.o  -o helloWorld -L{LIBFILE_PATH}/lib -lEM -lsfftw -lsrfftw -lgsl -lgslcblas -lm -lhdf5 -lz -lpng -ltiff -ljpeg

But this again throws the same error msges:
condor_compile /usr/bin/c++ -Wno-deprecated -w -fpermissive -O2  -static -static-libgcc file.o  -o helloWorld -L{LIBFILE_PATH}/lib -lEM -lsfftw -lsrfftw -lgsl -lgslcblas -lm -lhdf5 -lz -lpng -ltiff -ljpeg

-- By "running condor_compile once the command without it executes successfully" -- did you mean what I did? Or something else?

Could it be any problem with the version of gcc I am using (3.4.6) and the version that is shipped with condor(is it 3.2.2?)?
The reason why I am asking, is I got another post having similar problems like mine in this group, but it was unanswered. Somebody said something about version of gcc.. but not sure if that solved the problem or not. The link goes as follows:

https://www-auth.cs.wisc.edu/lists/condor-users/2005-December/msg00013.shtml

Thanks.
Tan

On Tue, Oct 14, 2008 at 3:15 PM, Todd Tannenbaum <tannenba@xxxxxxxxxxx> wrote:
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



--
--
Tanzima Zerin Islam
Graduate Student
School of Electrical & Computer Engineering
Purdue University