diff --git a/build/cmake/CondorConfigure.cmake b/build/cmake/CondorConfigure.cmake index ad69e0c..72c4212 100644 --- a/build/cmake/CondorConfigure.cmake +++ b/build/cmake/CondorConfigure.cmake @@ -99,7 +99,7 @@ set( CONDOR_EXTERNAL_DIR ${CONDOR_SOURCE_DIR}/externals ) # set to true to enable printing of make actions set( CMAKE_VERBOSE_MAKEFILE FALSE ) -set( BUILD_SHARED_LIBS FALSE ) +#set( BUILD_SHARED_LIBS FALSE ) # Windows is so different perform the check 1st and start setting the vars. if( NOT WINDOWS) @@ -121,7 +121,7 @@ if( NOT WINDOWS) set( CMAKE_SUPPRESS_REGENERATION FALSE ) # when we want to distro dynamic libraries only with localized rpaths. - set (CMAKE_SKIP_RPATH TRUE) + # set (CMAKE_SKIP_RPATH TRUE) # set (CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) # set (CMAKE_INSTALL_RPATH YOUR_LOC) # set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) @@ -446,7 +446,8 @@ add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/krb5/1.4.3-p0) add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/openssl/0.9.8h-p2) add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/pcre/7.6) add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/gsoap/2.7.10-p5) -add_subdirectory(${CONDOR_SOURCE_DIR}/src/classad) +# use from external package +add_subdirectory(${CONDOR_SOURCE_DIR}/src/classad) add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/zlib/1.2.3) add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/curl/7.19.6-p1 ) add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/hadoop/0.21.0) @@ -546,7 +547,7 @@ include_directories(${CONDOR_SOURCE_DIR}/src/ccb) include_directories(${CONDOR_SOURCE_DIR}/src/condor_io) include_directories(${CONDOR_SOURCE_DIR}/src/h) include_directories(${CMAKE_CURRENT_BINARY_DIR}/src/h) -include_directories(${CONDOR_SOURCE_DIR}/src/classad) +include_directories(${CONDOR_SOURCE_DIR}/src/classad) if (WANT_CONTRIB) include_directories(${CONDOR_SOURCE_DIR}/src/condor_contrib) endif(WANT_CONTRIB) diff --git a/build/cmake/macros/CondorStaticLib.cmake b/build/cmake/macros/CondorStaticLib.cmake index 4f1273e..b228180 100644 --- a/build/cmake/macros/CondorStaticLib.cmake +++ b/build/cmake/macros/CondorStaticLib.cmake @@ -23,7 +23,9 @@ SET(_SRCS ${ARGN}) # ADD_PRECOMPILED_HEADER macro expects to operate on a global _SRCS ADD_PRECOMPILED_HEADER() -add_library(${_CNDR_TARGET} STATIC ${_SRCS}) +add_library(${_CNDR_TARGET} ${_SRCS}) + +install(TARGETS ${_CNDR_TARGET} DESTINATION ${C_LIB}) if (CONDOR_EXTERNALS) add_dependencies ( ${_CNDR_TARGET} ${CONDOR_EXTERNALS} ) @@ -34,3 +36,17 @@ if ( WINDOWS ) endif ( WINDOWS ) ENDMACRO(CONDOR_STATIC_LIB) + +MACRO (CONDOR_REALLY_STATIC_LIB _CNDR_TARGET _SRCS) + +add_library(${_CNDR_TARGET} STATIC ${_SRCS}) + +if (CONDOR_EXTERNALS) + add_dependencies ( ${_CNDR_TARGET} ${CONDOR_EXTERNALS} ) +endif() + +if ( WINDOWS ) + set_property( TARGET ${_CNDR_TARGET} PROPERTY FOLDER "libraries" ) +endif ( WINDOWS ) + +ENDMACRO(CONDOR_REALLY_STATIC_LIB) diff --git a/src/condor_chirp/CMakeLists.txt b/src/condor_chirp/CMakeLists.txt index 424d561..435743b 100644 --- a/src/condor_chirp/CMakeLists.txt +++ b/src/condor_chirp/CMakeLists.txt @@ -22,6 +22,9 @@ condor_static_lib( chirp_client "chirp_client.h;chirp_client.c" ) condor_exe( condor_chirp "condor_chirp.cpp" ${C_LIBEXEC} "chirp_client;${CONDOR_TOOL_LIBS};${PCRE_FOUND};${OPENSSL_FOUND};${KRB5_FOUND};${GCB_FOUND};${GLOBUS_FOUND}" OFF ) +# unfortunately libutils comes with undefined symbols introduced by +# libdaemon_core (even when linking libutils to it) +target_link_libraries(condor_chirp -Wl,--allow-shlib-undefined) install ( FILES Chirp.jar DESTINATION ${C_LIB} ) diff --git a/src/condor_daemon_core.V6/CMakeLists.txt b/src/condor_daemon_core.V6/CMakeLists.txt index 9df4aa6..0ab562f 100644 --- a/src/condor_daemon_core.V6/CMakeLists.txt +++ b/src/condor_daemon_core.V6/CMakeLists.txt @@ -32,6 +32,7 @@ endif(DARWIN) #create the library condor_static_lib(daemon_core "${DCHeaderFiles};${DCSourceFiles}") +target_link_libraries(daemon_core ccb) if (WINDOWS) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS") diff --git a/src/condor_dagman/CMakeLists.txt b/src/condor_dagman/CMakeLists.txt index 54342bc..5a75448 100644 --- a/src/condor_dagman/CMakeLists.txt +++ b/src/condor_dagman/CMakeLists.txt @@ -24,3 +24,6 @@ condor_glob(DAGHdrs DAGSrcs "${submitDAG}") condor_exe(condor_dagman "${DAGHdrs};${DAGSrcs}" ${C_BIN} "${CONDOR_LIBS};${PCRE_FOUND};${OPENSSL_FOUND};${KRB5_FOUND};${CLASSADS_FOUND};${COREDUMPER_FOUND}" ON) condor_exe(condor_submit_dag "condor_submit_dag.cpp;dagman_multi_dag.cpp;dagman_recursive_submit.cpp" ${C_BIN} "${CONDOR_TOOL_LIBS};${PCRE_FOUND};${OPENSSL_FOUND};${KRB5_FOUND};${CLASSADS_FOUND}" OFF) +# unfortunately libutils comes with undefined symbols introduced by +# libdaemon_core (even when linking libutils to it) +target_link_libraries(condor_submit_dag -Wl,--allow-shlib-undefined) diff --git a/src/condor_gridmanager/CMakeLists.txt b/src/condor_gridmanager/CMakeLists.txt index 108f8e4..ecd984e 100644 --- a/src/condor_gridmanager/CMakeLists.txt +++ b/src/condor_gridmanager/CMakeLists.txt @@ -28,7 +28,13 @@ if(NOT WIN_EXEC_NODE_ONLY) if (NOT WINDOWS) if (HAVE_EXT_GLOBUS) condor_exe( gt4_gahp "gt4_gahp_wrapper.cpp" ${C_SBIN} "${GM_LINK_LIBS}" OFF ) + # unfortunately libutils comes with undefined symbols introduced by + # libdaemon_core (even when linking libutils to it) + target_link_libraries(gt4_gahp -Wl,--allow-shlib-undefined) condor_exe( gt42_gahp "gt42_gahp_wrapper.cpp" ${C_SBIN} "${GM_LINK_LIBS}" OFF ) + # unfortunately libutils comes with undefined symbols introduced by + # libdaemon_core (even when linking libutils to it) + target_link_libraries(gt42_gahp -Wl,--allow-shlib-undefined) add_custom_command( OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/grid_monitor.sh" diff --git a/src/condor_io/CMakeLists.txt b/src/condor_io/CMakeLists.txt index 6a77dbe..a7a310b 100644 --- a/src/condor_io/CMakeLists.txt +++ b/src/condor_io/CMakeLists.txt @@ -22,3 +22,4 @@ condor_glob( CedarHdrs CedarSrcs "${CeadarRmvSrcs}" ) #create the library condor_static_lib(cedar "${CedarHdrs};${CedarSrcs}") +target_link_libraries(cedar ${KRB5_FOUND} ${OPENSSL_FOUND}) diff --git a/src/condor_power/CMakeLists.txt b/src/condor_power/CMakeLists.txt index cbe2175..f675e62 100644 --- a/src/condor_power/CMakeLists.txt +++ b/src/condor_power/CMakeLists.txt @@ -19,8 +19,14 @@ if(NOT WIN_EXEC_NODE_ONLY) condor_exe( condor_power "power.cpp" ${C_BIN} "${CONDOR_TOOL_LIBS};${PCRE_FOUND};${OPENSSL_FOUND};${KRB5_FOUND};${CLASSADS_FOUND};${COREDUMPER_FOUND}" OFF ) + # unfortunately libutils comes with undefined symbols introduced by + # libdaemon_core (even when linking libutils to it) + target_link_libraries(condor_power -Wl,--allow-shlib-undefined) condor_exe( condor_power_state "power_state.cpp" ${C_LIBEXEC} "${CONDOR_TOOL_LIBS};${PCRE_FOUND};${OPENSSL_FOUND};${KRB5_FOUND};${CLASSADS_FOUND};${COREDUMPER_FOUND}" OFF ) + # unfortunately libutils comes with undefined symbols introduced by + # libdaemon_core (even when linking libutils to it) + target_link_libraries(condor_power_state -Wl,--allow-shlib-undefined) condor_selective_glob( "rooster*" ROOSTER ) diff --git a/src/condor_prio/CMakeLists.txt b/src/condor_prio/CMakeLists.txt index 194f361..69ac019 100644 --- a/src/condor_prio/CMakeLists.txt +++ b/src/condor_prio/CMakeLists.txt @@ -17,3 +17,6 @@ ############################################################### condor_exe( condor_prio "prio.cpp" ${C_BIN} "qmgmt;${CONDOR_TOOL_LIBS};${PCRE_FOUND};${OPENSSL_FOUND};${KRB5_FOUND};${CLASSADS_FOUND};${COREDUMPER_FOUND}" OFF ) +# unfortunately libutils comes with undefined symbols introduced by +# libdaemon_core (even when linking libutils to it) +target_link_libraries(condor_prio -Wl,--allow-shlib-undefined) diff --git a/src/condor_privsep/CMakeLists.txt b/src/condor_privsep/CMakeLists.txt index 6c53c4d..ec1c996 100644 --- a/src/condor_privsep/CMakeLists.txt +++ b/src/condor_privsep/CMakeLists.txt @@ -25,4 +25,7 @@ condor_static_lib( privsep "${PrivsepHdrs};${PrivsepSrcs}" ) if (NOT WINDOWS) condor_exe( condor_root_switchboard "${PrivsepRmvSrcs}" ${C_SBIN} "${CONDOR_TOOL_LIBS}" OFF ) + # unfortunately libutils comes with undefined symbols introduced by + # libdaemon_core (even when linking libutils to it) + target_link_libraries(condor_root_switchboard -Wl,--allow-shlib-undefined) endif() diff --git a/src/condor_procd/CMakeLists.txt b/src/condor_procd/CMakeLists.txt index df2d726..c05da62 100644 --- a/src/condor_procd/CMakeLists.txt +++ b/src/condor_procd/CMakeLists.txt @@ -28,11 +28,20 @@ else(WINDOWS) endif(WINDOWS) condor_daemon(procd "${ProcdRmvElements}" "procapi;utils;${PROCD_WIN_LINK_LIBS};${LIBCGROUP_FOUND}" "${C_SBIN}" OFF) +# unfortunately libutils comes with undefined symbols introduced by +# libdaemon_core (even when linking libutils to it) +target_link_libraries(condor_procd -Wl,--allow-shlib-undefined) if (LINUX AND WANT_FULL_DEPLOYMENT) condor_exe( procd_ctl "procd_ctl.cpp" ${C_SBIN} "${CONDOR_TOOL_LIBS};${PCRE_FOUND};${OPENSSL_FOUND};${KRB5_FOUND};${COREDUMPER_FOUND}" OFF) + # unfortunately libutils comes with undefined symbols introduced by + # libdaemon_core (even when linking libutils to it) + target_link_libraries(procd_ctl -Wl,--allow-shlib-undefined) condor_exe( gidd_alloc "gidd_alloc.cpp" ${C_SBIN} "${CONDOR_TOOL_LIBS};${PCRE_FOUND};${OPENSSL_FOUND};${KRB5_FOUND};${COREDUMPER_FOUND}" OFF) + # unfortunately libutils comes with undefined symbols introduced by + # libdaemon_core (even when linking libutils to it) + target_link_libraries(gidd_alloc -Wl,--allow-shlib-undefined) endif(LINUX AND WANT_FULL_DEPLOYMENT) condor_static_lib(procd_client "${ProcClientElements}") diff --git a/src/condor_q.V6/CMakeLists.txt b/src/condor_q.V6/CMakeLists.txt index aeeb6e3..c9eeeec 100644 --- a/src/condor_q.V6/CMakeLists.txt +++ b/src/condor_q.V6/CMakeLists.txt @@ -17,3 +17,6 @@ ############################################################### condor_exe(condor_q "queue.cpp" ${C_BIN} "conversion;analysis;qmgmt;${CONDOR_TOOL_LIBS};${PCRE_FOUND};${OPENSSL_FOUND};${KRB5_FOUND};${POSTGRESQL_FOUND}" OFF) +# unfortunately libutils comes with undefined symbols introduced by +# libdaemon_core (even when linking libutils to it) +target_link_libraries(condor_q -Wl,--allow-shlib-undefined) diff --git a/src/condor_rm.V6/CMakeLists.txt b/src/condor_rm.V6/CMakeLists.txt index 257a7bd..d860056 100644 --- a/src/condor_rm.V6/CMakeLists.txt +++ b/src/condor_rm.V6/CMakeLists.txt @@ -17,6 +17,9 @@ ############################################################### condor_exe( condor_rm "rm.cpp" ${C_BIN} "${CONDOR_TOOL_LIBS};${PCRE_FOUND};${OPENSSL_FOUND};${KRB5_FOUND};${CLASSADS_FOUND};${COREDUMPER_FOUND}" OFF ) +# unfortunately libutils comes with undefined symbols introduced by +# libdaemon_core (even when linking libutils to it) +target_link_libraries(condor_rm -Wl,--allow-shlib-undefined) clone_install( condor_rm "${C_BIN}" condor_hold "${C_BIN}" ) clone_install( condor_rm "${C_BIN}" condor_release "${C_BIN}" ) clone_install( condor_rm "${C_BIN}" condor_vacate_job "${C_BIN}" ) diff --git a/src/condor_startd.V6/CMakeLists.txt b/src/condor_startd.V6/CMakeLists.txt index df8ae2f..0cdcd2f 100644 --- a/src/condor_startd.V6/CMakeLists.txt +++ b/src/condor_startd.V6/CMakeLists.txt @@ -32,6 +32,9 @@ condor_daemon( startd "${startdRmvElements}" "${CONDOR_LIBS};${PCRE_FOUND};${OPE if (LINUX AND GLOBUS_FOUND) condor_exe(condor_glexec_wrapper "glexec_wrapper.cpp" ${C_LIBEXEC} "${CONDOR_TOOL_LIBS};${KRB5_FOUND};${OPENSSL_FOUND};${PCRE_FOUND}" OFF ) install (FILES glexec_starter_setup.sh DESTINATION ${C_LIBEXEC} PERMISSIONS ${CONDOR_SCRIPT_PERMS} ) + # unfortunately libutils comes with undefined symbols introduced by + # libdaemon_core (even when linking libutils to it) + target_link_libraries(condor_glexec_wrapper -Wl,--allow-shlib-undefined) endif() diff --git a/src/condor_starter.V6.1/CMakeLists.txt b/src/condor_starter.V6.1/CMakeLists.txt index 32680a1..5728dad 100644 --- a/src/condor_starter.V6.1/CMakeLists.txt +++ b/src/condor_starter.V6.1/CMakeLists.txt @@ -31,7 +31,13 @@ install ( FILES scimark2lib.jar CondorJavaWrapper.class CondorJavaInfo.class DES if(LINUX AND WANT_GLEXEC) install (FILES condor_glexec_setup condor_glexec_run condor_glexec_cleanup condor_glexec_kill condor_glexec_update_proxy DESTINATION ${C_LIBEXEC} PERMISSIONS ${CONDOR_SCRIPT_PERMS} ) condor_exe(condor_glexec_job_wrapper "glexec_job_wrapper.linux.cpp" ${C_LIBEXEC} "${CONDOR_TOOL_LIBS};${KRB5_FOUND};${OPENSSL_FOUND};${PCRE_FOUND}" OFF) + # unfortunately libutils comes with undefined symbols introduced by + # libdaemon_core (even when linking libutils to it) + target_link_libraries(condor_glexec_job_wrapper -Wl,--allow-shlib-undefined) condor_exe( rsh "condor_rsh.cpp" ${C_LIBEXEC} "${CONDOR_TOOL_LIBS};${KRB5_FOUND};${OPENSSL_FOUND};${PCRE_FOUND}" OFF) + # unfortunately libutils comes with undefined symbols introduced by + # libdaemon_core (even when linking libutils to it) + target_link_libraries(rsh -Wl,--allow-shlib-undefined) endif() if (HAVE_SSH_TO_JOB) diff --git a/src/condor_status.V6/CMakeLists.txt b/src/condor_status.V6/CMakeLists.txt index 199405d..96b9305 100644 --- a/src/condor_status.V6/CMakeLists.txt +++ b/src/condor_status.V6/CMakeLists.txt @@ -20,3 +20,6 @@ condor_glob(statusHdrs statusSrcs "") condor_exe( condor_status "${statusHdrs};${statusSrcs}" ${C_BIN} "${CONDOR_TOOL_LIBS};${PCRE_FOUND};${OPENSSL_FOUND};${KRB5_FOUND};${CLASSADS_FOUND};${COREDUMPER_FOUND}" OFF ) +# libdaemoncore comes with a set of undefined symbols that are provided by +# actual daemons, but no by condor_status -- need to ignore this one here +target_link_libraries(condor_status -Wl,--allow-shlib-undefined) diff --git a/src/condor_submit.V6/CMakeLists.txt b/src/condor_submit.V6/CMakeLists.txt index c459028..092849b 100644 --- a/src/condor_submit.V6/CMakeLists.txt +++ b/src/condor_submit.V6/CMakeLists.txt @@ -18,3 +18,6 @@ condor_exe( condor_submit "submit.cpp" ${C_BIN} "qmgmt;${CONDOR_TOOL_LIBS};${PCRE_FOUND};${OPENSSL_FOUND};${KRB5_FOUND};${CLASSADS_FOUND};${COREDUMPER_FOUND}" OFF ) +# unfortunately libutils comes with undefined symbols introduced by +# libdaemon_core (even when linking libutils to it) +target_link_libraries(condor_submit -Wl,--allow-shlib-undefined) diff --git a/src/condor_tools/CMakeLists.txt b/src/condor_tools/CMakeLists.txt index f547ef1..83841dd 100644 --- a/src/condor_tools/CMakeLists.txt +++ b/src/condor_tools/CMakeLists.txt @@ -16,36 +16,89 @@ # ############################################################### - set(TOOL_LINK_LIBS "${CONDOR_TOOL_LIBS};${PCRE_FOUND};${OPENSSL_FOUND};${KRB5_FOUND}") condor_exe(condor_cod "cod_tool.cpp" ${C_BIN} "${TOOL_LINK_LIBS}" OFF) +# unfortunately libutils comes with undefined symbols introduced by +# libdaemon_core (even when linking libutils to it) +target_link_libraries(condor_cod -Wl,--allow-shlib-undefined) condor_exe(condor_preen "preen.cpp" ${C_SBIN} "qmgmt;${TOOL_LINK_LIBS}" OFF) +# unfortunately libutils comes with undefined symbols introduced by +# libdaemon_core (even when linking libutils to it) +target_link_libraries(condor_preen -Wl,--allow-shlib-undefined) condor_exe(condor_advertise "advertise.cpp" ${C_SBIN} "${TOOL_LINK_LIBS}" OFF) +# unfortunately libutils comes with undefined symbols introduced by +# libdaemon_core (even when linking libutils to it) +target_link_libraries(condor_advertise -Wl,--allow-shlib-undefined) condor_exe(condor_fetchlog "fetch_log.cpp" ${C_SBIN} "${TOOL_LINK_LIBS}" OFF) +# unfortunately libutils comes with undefined symbols introduced by +# libdaemon_core (even when linking libutils to it) +target_link_libraries(condor_fetchlog -Wl,--allow-shlib-undefined) condor_exe(condor_config_val "config_val.cpp" ${C_BIN} "${TOOL_LINK_LIBS}" OFF) +# unfortunately libutils comes with undefined symbols introduced by +# libdaemon_core (even when linking libutils to it) +target_link_libraries(condor_config_val -Wl,--allow-shlib-undefined) condor_exe(condor_userprio "user_prio.cpp" ${C_BIN} "${TOOL_LINK_LIBS}" OFF) +# unfortunately libutils comes with undefined symbols introduced by +# libdaemon_core (even when linking libutils to it) +target_link_libraries(condor_userprio -Wl,--allow-shlib-undefined) condor_exe(condor_findhost "give_interactive.cpp" ${C_BIN} "${TOOL_LINK_LIBS}" OFF) +# unfortunately libutils comes with undefined symbols introduced by +# libdaemon_core (even when linking libutils to it) +target_link_libraries(condor_findhost -Wl,--allow-shlib-undefined) condor_exe(condor_qedit "qedit.cpp" ${C_BIN} "qmgmt;${TOOL_LINK_LIBS}" OFF) +# unfortunately libutils comes with undefined symbols introduced by +# libdaemon_core (even when linking libutils to it) +target_link_libraries(condor_qedit -Wl,--allow-shlib-undefined) if (HAVE_SSH_TO_JOB) condor_exe(condor_ssh_to_job "ssh_to_job.cpp" ${C_BIN} "${TOOL_LINK_LIBS}" OFF) + # unfortunately libutils comes with undefined symbols introduced by + # libdaemon_core (even when linking libutils to it) + target_link_libraries(condor_ssh_to_job -Wl,--allow-shlib-undefined) endif(HAVE_SSH_TO_JOB) condor_exe(condor_transfer_data "transfer_data.cpp" ${C_BIN} "${TOOL_LINK_LIBS}" OFF) +# unfortunately libutils comes with undefined symbols introduced by +# libdaemon_core (even when linking libutils to it) +target_link_libraries(condor_transfer_data -Wl,--allow-shlib-undefined) condor_exe(condor_version "version.cpp" ${C_BIN} "${TOOL_LINK_LIBS}" OFF) +# unfortunately libutils comes with undefined symbols introduced by +# libdaemon_core (even when linking libutils to it) +target_link_libraries(condor_version -Wl,--allow-shlib-undefined) condor_exe(condor_wait "wait.cpp" ${C_BIN} "${TOOL_LINK_LIBS}" OFF) +# unfortunately libutils comes with undefined symbols introduced by +# libdaemon_core (even when linking libutils to it) +target_link_libraries(condor_wait -Wl,--allow-shlib-undefined) condor_exe(condor_history "history.cpp" ${C_BIN} "${TOOL_LINK_LIBS};${POSTGRESQL_FOUND}" OFF) +# unfortunately libutils comes with undefined symbols introduced by +# libdaemon_core (even when linking libutils to it) +target_link_libraries(condor_history -Wl,--allow-shlib-undefined) if (WANT_QUILL AND HAVE_EXT_POSTGRESQL) condor_exe(condor_load_history "load_history.cpp" ${C_BIN} "tt;${TOOL_LINK_LIBS};${POSTGRESQL_FOUND}" OFF) + # unfortunately libutils comes with undefined symbols introduced by + # libdaemon_core (even when linking libutils to it) + target_link_libraries(condor_load_history -Wl,--allow-shlib-undefined) condor_exe(condor_dump_history "dump_history.cpp" ${C_BIN} "${TOOL_LINK_LIBS};${POSTGRESQL_FOUND}" OFF) + # unfortunately libutils comes with undefined symbols introduced by + # libdaemon_core (even when linking libutils to it) + target_link_libraries(condor_dump_history -Wl,--allow-shlib-undefined) condor_exe(condor_convert_history "convert_history.cpp" ${C_SBIN} "${TOOL_LINK_LIBS};${POSTGRESQL_FOUND}" OFF) + # unfortunately libutils comes with undefined symbols introduced by + # libdaemon_core (even when linking libutils to it) + target_link_libraries(condor_convert_history -Wl,--allow-shlib-undefined) endif(WANT_QUILL AND HAVE_EXT_POSTGRESQL) condor_exe(condor_store_cred "store_cred_main.cpp" ${C_SBIN} "${TOOL_LINK_LIBS}" OFF) +# unfortunately libutils comes with undefined symbols introduced by +# libdaemon_core (even when linking libutils to it) +target_link_libraries(condor_store_cred -Wl,--allow-shlib-undefined) condor_exe(condor "tool.cpp" "${C_BIN}" "${TOOL_LINK_LIBS}" OFF) +# unfortunately libutils comes with undefined symbols introduced by +# libdaemon_core (even when linking libutils to it) +target_link_libraries(condor -Wl,--allow-shlib-undefined) clone_install(condor "${C_BIN}" "condor_on;condor_off;condor_restart;condor_reconfig;condor_set_shutdown" "${C_SBIN}") if (WANT_FULL_DEPLOYMENT) clone_install(condor "${C_BIN}" "condor_set_shutdown" "${C_SBIN}") @@ -67,6 +120,9 @@ else(NOT WINDOWS) endif(NOT WINDOWS) condor_exe(condor_stats "stats.cpp" ${C_BIN} "${TOOL_LINK_LIBS}" OFF) +# unfortunately libutils comes with undefined symbols introduced by +# libdaemon_core (even when linking libutils to it) +target_link_libraries(condor_stats -Wl,--allow-shlib-undefined) if( WINDOWS ) condor_exe(condor_setup "condor_setup.c" ${C_BIN} "${CONDOR_TOOL_LIBS}" OFF) @@ -128,3 +128,4 @@ condor_exe_test(condor_test_auth "test_auth.cpp" "${TOOL_LINK_LIBS}") condor_exe(condor_test_match "condor_test_match.cpp" ${C_BIN} "${TOOL_LINK_LIBS}" OFF) +target_link_libraries(condor_test_match -Wl,--allow-shlib-undefined) diff --git a/src/condor_userlog/CMakeLists.txt b/src/condor_userlog/CMakeLists.txt index 5901935..a6c9d63 100644 --- a/src/condor_userlog/CMakeLists.txt +++ b/src/condor_userlog/CMakeLists.txt @@ -18,9 +18,18 @@ condor_exe( condor_userlog "userlog.cpp" ${C_BIN} "${CONDOR_TOOL_LIBS};${PCRE_FOUND};${OPENSSL_FOUND};${KRB5_FOUND};${CLASSADS_FOUND};${COREDUMPER_FOUND}" OFF ) +# unfortunately libutils comes with undefined symbols introduced by +# libdaemon_core (even when linking libutils to it) +target_link_libraries(condor_userlog -Wl,--allow-shlib-undefined) condor_exe( condor_check_userlogs "condor_check_userlogs.cpp" ${C_BIN} "${CONDOR_TOOL_LIBS};${PCRE_FOUND};${OPENSSL_FOUND};${KRB5_FOUND};${CLASSADS_FOUND};${COREDUMPER_FOUND}" OFF ) +# unfortunately libutils comes with undefined symbols introduced by +# libdaemon_core (even when linking libutils to it) +target_link_libraries(condor_check_userlogs -Wl,--allow-shlib-undefined) if (NOT WINDOWS) condor_exe( condor_userlog_job_counter "condor_userlog_job_counter.cpp" ${C_BIN} "${CONDOR_TOOL_LIBS};${PCRE_FOUND};${OPENSSL_FOUND};${KRB5_FOUND};${CLASSADS_FOUND};${COREDUMPER_FOUND}" OFF ) + # unfortunately libutils comes with undefined symbols introduced by + # libdaemon_core (even when linking libutils to it) + target_link_libraries(condor_userlog_job_counter -Wl,--allow-shlib-undefined) endif() diff --git a/src/condor_utils/CMakeLists.txt b/src/condor_utils/CMakeLists.txt index a9b6322..0716428 100644 --- a/src/condor_utils/CMakeLists.txt +++ b/src/condor_utils/CMakeLists.txt @@ -19,8 +19,12 @@ ################################################## # utils library -file( GLOB RmvSrcs y.tab* lex.yy* ckpt_server_api_stubs* libcondorapi_stubs* -soap_helpers* test_* *.t.cpp *test.cpp cat_url.cpp *Test* param_info_init.c ) +file( GLOB RmvSrcs y.tab* lex.yy* ckpt_server_api_stubs* libcondorapi_stubs* +soap_helpers* test_* *.t.cpp *test.cpp cat_url.cpp *Test* param_info_init.c +state_machine_driver.unix.cpp) +# exclude state_machine_driver.unix.cpp because it pulls in undefined symbols +# (e.g. TransFuncNames src/condor_starter.std/starter.h) that do not become +# part of libutils. condor_glob( HeaderFiles SourceFiles "${RmvSrcs}" ) @@ -35,6 +39,15 @@ add_custom_target (utils_genparams ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/param condor_static_lib( utils "${HeaderFiles};${SourceFiles}" ) add_dependencies(utils utils_genparams syscall_numbers ) +# this shouldn't be linked against libdaemon_core, because it introduces +# undefined symbols that can only be resolved by actual daemons, but it needs +# some part +target_link_libraries(utils sysapi procapi privsep procd_client daemon_client daemon_core qmgmt cedar ${CLASSADS_FOUND} ${PCRE_FOUND} ${GLOBUS_FOUND} ${POSTGRESQL_FOUND}) +if (WANT_CONTRIB) + if (HAVE_EXT_POSTGRESQL) + target_link_libraries(utils tt) + endif (HAVE_EXT_POSTGRESQL) +endif(WANT_CONTRIB) ################################################## # condorapi & tests diff --git a/src/deployment_tools/CMakeLists.txt b/src/deployment_tools/CMakeLists.txt index c736e98..64f1c63 100644 --- a/src/deployment_tools/CMakeLists.txt +++ b/src/deployment_tools/CMakeLists.txt @@ -35,6 +35,9 @@ if (NOT WINDOWS AND WANT_FULL_DEPLOYMENT) install ( FILES Execute.pm FileLock.pm DESTINATION ${C_LIB} PERMISSIONS ${CONDOR_SCRIPT_PERMS} ) condor_exe( uniq_pid_command "uniq_pid_tool_main.cpp" "${C_SBIN}" "${CONDOR_TOOL_LIBS};${KRB5_FOUND};${OPENSSL_FOUND};${PCRE_FOUND}" OFF ) + # unfortunately libutils comes with undefined symbols introduced by + # libdaemon_core (even when linking libutils to it) + target_link_libraries(uniq_pid_command -Wl,--allow-shlib-undefined) clone_install( uniq_pid_command "${C_SBIN}" uniq_pid_midwife "${C_SBIN}" ) clone_install( uniq_pid_command "${C_SBIN}" uniq_pid_undertaker "${C_SBIN}" ) diff --git a/src/nordugrid_gahp/CMakeLists.txt b/src/nordugrid_gahp/CMakeLists.txt index c011b50..31b4fd4 100644 --- a/src/nordugrid_gahp/CMakeLists.txt +++ b/src/nordugrid_gahp/CMakeLists.txt @@ -27,6 +27,9 @@ if (HAVE_EXT_GLOBUS AND HAVE_LDAP_H AND LDAP_FOUND ) ${C_SBIN} "${GLOBUS_GRID_UNIVERSE_NORDUGRID};${GLOBUS_GRID_UNIVERSE_COMMON};${GLOBUS_FOUND};${OPENSSL_FOUND};${LDAP_FOUND}" OFF ) + # unfortunately libutils comes with undefined symbols introduced by + # libdaemon_core (even when linking libutils to it) + target_link_libraries(nordugrid_gahp -Wl,--allow-shlib-undefined) else() --- condor-7.6.0/src/condor_utils/event_handler.unix.cpp.orig 2011-06-13 08:09:34.293762653 -0500 +++ condor-7.6.0/src/condor_utils/event_handler.unix.cpp 2011-06-13 08:09:57.955762563 -0500 @@ -52,7 +52,7 @@ { SIGTTOU, "SIGTTOU" }, { -1, 0 } }; -NameTable SigNames( SigNameArray ); +NameTable SigNamesAlt( SigNameArray ); EventHandler::EventHandler( void (*f)(int), sigset_t m ) @@ -77,14 +77,14 @@ display_sigset( const char *msg, sigset_t *mask ) { int signo; - NameTableIterator next_sig( SigNames ); + NameTableIterator next_sig( SigNamesAlt ); if( msg ) { dprintf( D_ALWAYS, msg ); } while( (signo = next_sig()) != -1 ) { if( sigismember(mask,signo) ) { - dprintf( D_ALWAYS | D_NOHEADER, "%s ", SigNames.get_name(signo) ); + dprintf( D_ALWAYS | D_NOHEADER, "%s ", SigNamesAlt.get_name(signo) ); } } dprintf( D_ALWAYS | D_NOHEADER, "\n" ); @@ -94,7 +94,7 @@ void EventHandler::install() { - NameTableIterator next_sig( SigNames ); + NameTableIterator next_sig( SigNamesAlt ); struct sigaction action; int i; int signo; @@ -126,7 +126,7 @@ } dprintf( D_FULLDEBUG, "\t*FSM* Installed handler %p for signal %s, flags = 0x%x\n", - action.sa_handler, SigNames.get_name(signo), action.sa_flags + action.sa_handler, SigNamesAlt.get_name(signo), action.sa_flags ); } } @@ -138,7 +138,7 @@ void EventHandler::de_install() { - NameTableIterator next_sig( SigNames ); + NameTableIterator next_sig( SigNamesAlt ); //struct sigaction action;//unused variable, avoiding warning. int signo; int i; @@ -158,7 +158,7 @@ } dprintf( D_FULLDEBUG, "\t*FSM* Installed handler %p for signal %s\n", - o_action[i].sa_handler, SigNames.get_name(signo) + o_action[i].sa_handler, SigNamesAlt.get_name(signo) ); } } --- a/src/classad/CMakeLists.txt.orig 2011-06-13 08:59:21.550762290 -0500 +++ b/src/classad/CMakeLists.txt 2011-06-13 08:59:30.439761938 -0500 @@ -52,7 +52,7 @@ if (NOT WINDOWS) condor_selective_glob("attrrefs.*;classad.*;collection.*;collectionBase.*;debug.*;exprList.*;exprTree.*;fnCall.*;indexfile.*;lexer.*;lexerSource.*;literals.*;matchClassad.*;operators.*;query.*;sink.*;source.*;transaction.*;util.*;value.*;view.*;xmlLexer.*;xmlSink.*;xmlSource.*;cclassad.*;common.*" ClassadSrcs) - add_library( classads STATIC ${ClassadSrcs} ) # the one which all of condor depends upon + add_library( classads SHARED ${ClassadSrcs} ) # the one which all of condor depends upon if (LINUX) add_library( classad SHARED ${ClassadSrcs} ) # for distribution at this point may swap to depend at a future date. --- a/src/condor_sysapi/CMakeLists.txt.orig 2011-06-13 09:09:43.547762138 -0500 +++ b/src/condor_sysapi/CMakeLists.txt 2011-06-13 09:10:25.624762540 -0500 @@ -18,7 +18,7 @@ set(BENCH_LINK_LIBS "${TOOL_LINK_LIBS}") -file( GLOB SysApiRmvElements *_t.cpp *.t.* dhry21b* *_main.cpp ) +file( GLOB SysApiRmvElements *.t.* dhry21b* *_main.cpp ) condor_glob(SysapiHeaderFiles SysapiSourceFiles "${SysApiRmvElements}" ) @@ -28,4 +28,6 @@ # there was a test target which was never used. # it makes the most sense to hook in a UT here instead of integ test condor_exe(condor_kflops "kflops_main.cpp" ${C_LIBEXEC} "sysapi;condorapi;${BENCH_LINK_LIBS}" OFF) +target_link_libraries(condor_kflops -Wl,--allow-shlib-undefined) condor_exe(condor_mips "mips_main.cpp" ${C_LIBEXEC} "sysapi;condorapi;${BENCH_LINK_LIBS}" OFF) +target_link_libraries(condor_mips -Wl,--allow-shlib-undefined) --- a/src/ec2_gahp/CMakeLists.txt.orig 2011-06-13 09:16:33.006762337 -0500 +++ b/src/ec2_gahp/CMakeLists.txt 2011-06-13 09:12:58.977762215 -0500 @@ -28,6 +28,7 @@ "${HeaderFiles};${SourceFiles}" ${C_SBIN} "${CONDOR_TOOL_LIBS};${PCRE_FOUND};${OPENSSL_FOUND};${CURL_FOUND};${ZLIB_FOUND}" OFF ) + target_link_libraries(ec2_gahp -Wl,--allow-shlib-undefined) # Build an executable needed by the tests. condor_exe_test( queryAPI-sim