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

[HTCondor-users] How to condor_compile an c++ file?



Hi all.I want to compile an c++ file on Centos 6.7. 
Usually, the compile comand is as follows:
 g++ -o vp VideoProcess.cpp `pkg-config --libs --cflags opencv` `mysql_config --libs --cflags`
and the execute file vp can work correctly.
Now , I want to run vp on condor system.
According to the manul, I condor_compile the c++file as follow:
 condor_compile g++ -o vp VideoProcess.cpp `pkg-config --libs --cflags opencv` `mysql_config --libs --cflags`
but it fails and show this content :

WARNING: Using pthreads with condor_compile.
WARNING: condor_compile must know how to find the Pth library.
WARNING: Users should add /path/to/pth-library to the environment
WARNING: variable LD_LIBRARY_PATH or add -L/path/to/pth-library
WARNING: to the command line when invoking condor_compile.
WARNING: Pth must be installed with the --enable-pthread
WARNING: flag. See Pth INSTALL file for more information.
ERROR: Internal ld was not invoked!
ERROR: Executable may not be linked properly for Condor!
ERROR: For users of Condor on Linux, we highly recommend
ERROR: using the default compiler that came with the
ERROR: distribution. Usually placing /usr/bin first in
ERROR: your path will remedy this error.
ERROR: To learn more about this error, visit this web page:
ERROR: http://www.cs.wisc.edu/condor/manual/faq.html
ERROR: and read the FAQ entry about this problem for your
ERROR: revision of Condor.


I use the shell  comand :    find / -name ld  and get the result :

/root/condor-8.4.0/src/condor_scripts/ld
/usr/bin/ld

And then, I copy /root/condor-8.4.0/src/condor_scripts/ld to /usr/bin/ld and then 
 condor_compile g++ -o vp VideoProcess.cpp `pkg-config --libs --cflags opencv` `mysql_config --libs --cflags`

It will show the content :

WARNING: Using pthreads with condor_compile.
WARNING: condor_compile must know how to find the Pth library.
WARNING: Users should add /path/to/pth-library to the environment
WARNING: variable LD_LIBRARY_PATH or add -L/path/to/pth-library
WARNING: to the command line when invoking condor_compile.
WARNING: Pth must be installed with the --enable-pthread
WARNING: flag. See Pth INSTALL file for more information.


but this comand does not finish at all, just stay there.
I dont know how to solve this problem. Can you tell me ?Thank you very much.


I also have noticed that warning information about pth-library.
And I have add two lines as follow to the end of  file /etc/bashrc



LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64
export LD_LIBRARY_PATH



and then I reboot this system. I can test   :  echo $LD_LIBRARY_PATH, and the result is :
:/usr/lib64

But it is not useful to solve the WARNING above.
Can you be kind enough to help me ?

Best wishes to you.

lijian@xxxxxxx