qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Welchlin <andr...@welchlin.de>
Subject Re: qpid-0.28 - Linker Problem on Solaris
Date Tue, 23 Sep 2014 11:16:20 GMT
Hi All,

I can answer my own question, now:

On SunOs (at least on my machine) this does not work:

/usr/bin/gcc  -fPIC -fno-visibility-inlines-hidden -fvisibility=hidden 
-Wl,--version-script=/export/home/noname/install/qpid-0.28_tmptest/cpp/src/qpid.linkmap 
-shared  -Wl,-hlibqpidtypes.so.1 -o libqpidtypes.so.1.0.0 
CMakeFiles/qpidtypes.dir/qpid/types/Exception.cpp.o 
CMakeFiles/qpidtypes.dir/qpid/types/Uuid.cpp.o 
CMakeFiles/qpidtypes.dir/qpid/types/Variant.cpp.o  -L/usr/local/lib 
-L/usr/lib/mps -luuid -Wl,-R/usr/local/lib:/usr/lib/mps

The problem is:  
"-Wl,--version-script=/export/home/noname/install/qpid-0.28_tmptest/cpp/src/qpid.linkmap"

So the following needs to be inserted into cpp/src/CMakeLists.txt:

184     if (GCC_VERSION VERSION_EQUAL 4.1.2)
  185      message (STATUS "Cannot restrict library symbol export on gcc 
4.1.2")
  186      set (HIDE_SYMBOL_FLAGS "-fno-visibility-inlines-hidden")
  187    else (GCC_VERSION VERSION_EQUAL 4.1.2)
  188      set (HIDE_SYMBOL_FLAGS "-fno-visibility-inlines-hidden 
-fvisibility=hidden")
  189      set (QPID_LINKMAP ${CMAKE_CURRENT_SOURCE_DIR}/qpid.linkmap)
  190
  191 # --------------------- the following three lines need to be 
inserted for Solaris
  192      if (NOT CMAKE_SYSTEM_NAME STREQUAL SunOS)
  193          set (LINK_VERSION_SCRIPT_FLAG 
"-Wl,--version-script=${QPID_LINKMAP}")
  194      endif (NOT CMAKE_SYSTEM_NAME STREQUAL SunOS)
  195
  196    endif (GCC_VERSION VERSION_EQUAL 4.1.2)


Please could someone insert these lines into CMakeLists in the repository?

Regards,
Andreas

PS: If you want to be able to test on Solaris - it is pretty ease to use 
a predefined virtual machine which is available on the Oracle homepage.


Am 22.09.2014 um 15:47 schrieb Andreas Welchlin:
> Hi List,
>
> I tried to compile qpid-0.28 on Solaris (uname -a prints: SunOS 
> solaris 5.11 11.2 i86pc i386 i86pc).
>
>
> First I amended and compiled proton 0.7 which worked fine. I would 
> like to share this but first I want to do some tests using QPID.
>
> Afterwards I tried to compile qpid-0.28:
>
> 1.) I called
> cmake ..
>
> The output of 'cmake ..' is found at the end of this mail.
>
> 2.) I called 'make clean all' and the output is
> [  0%] Building CXX object 
> src/CMakeFiles/qpidtypes.dir/qpid/types/Exception.cpp.o
> [  0%] Building CXX object 
> src/CMakeFiles/qpidtypes.dir/qpid/types/Uuid.cpp.o
> [  1%] Building CXX object 
> src/CMakeFiles/qpidtypes.dir/qpid/types/Variant.cpp.o
> Linking CXX shared library libqpidtypes.so
> ld: fatal: unrecognized option '--'
> ld: fatal: use the '-z help' option for usage information
> collect2: error: ld returned 1 exit status
> *** Error code 1
> The following command caused the error:
> cd /export/home/noname/install/qpid-0.28/cpp/build/src && 
> /usr/bin/cmake -E cmake_link_script CMakeFiles/qpidtypes.dir/link.txt 
> --verbose=
> make: Fatal error: Command failed for target `src/libqpidtypes.so.1.0.0'
> Current working directory /export/home/noname/install/qpid-0.28/cpp/build
> *** Error code 1
> The following command caused the error:
> make -f src/CMakeFiles/qpidtypes.dir/build.make 
> src/CMakeFiles/qpidtypes.dir/build
> make: Fatal error: Command failed for target 
> `src/CMakeFiles/qpidtypes.dir/all'
> Current working directory /export/home/noname/install/qpid-0.28/cpp/build
> *** Error code 1
> The following command caused the error:
> make -f CMakeFiles/Makefile2 all
> make: Fatal error: Command failed for target `all'
>
>
> 3.) I tried it with the Gnu Linker by calling:
>
> export LD_ALTEXEC=/usr/bin/gld
> make clean all
>
> The output was:
>
> [  0%] Building CXX object 
> src/CMakeFiles/qpidtypes.dir/qpid/types/Exception.cpp.o
> [  0%] Building CXX object 
> src/CMakeFiles/qpidtypes.dir/qpid/types/Uuid.cpp.o
> [  1%] Building CXX object 
> src/CMakeFiles/qpidtypes.dir/qpid/types/Variant.cpp.o
> Linking CXX shared library libqpidtypes.so
> /usr/bin/gld: anonymous version tag cannot be combined with other 
> version tags
> collect2: error: ld returned 1 exit status
> *** Error code 1
> The following command caused the error:
> cd /export/home/noname/install/qpid-0.28/cpp/build/src && 
> /usr/bin/cmake -E cmake_link_script CMakeFiles/qpidtypes.dir/link.txt 
> --verbose=
> make: Fatal error: Command failed for target `src/libqpidtypes.so.1.0.0'
> Current working directory /export/home/noname/install/qpid-0.28/cpp/build
> *** Error code 1
> The following command caused the error:
> make -f src/CMakeFiles/qpidtypes.dir/build.make 
> src/CMakeFiles/qpidtypes.dir/build
> make: Fatal error: Command failed for target 
> `src/CMakeFiles/qpidtypes.dir/all'
> Current working directory /export/home/noname/install/qpid-0.28/cpp/build
> *** Error code 1
> The following command caused the error:
> make -f CMakeFiles/Makefile2 all
> make: Fatal error: Command failed for target `all'
>
>
>
> Is there anyone who managed to link correctly on Solaris? Any hints?
>
> Regards,
> Andreas
>
>
> --------------- output of 'cmake ..' 
> --------------------------------------------------
> -- The C compiler identification is GNU
> -- The CXX compiler identification is GNU
> -- Check for working C compiler: /usr/bin/gcc
> -- Check for working C compiler: /usr/bin/gcc -- works
> -- Detecting C compiler ABI info
> -- Detecting C compiler ABI info - done
> -- Check for working CXX compiler: /usr/bin/c++
> -- Check for working CXX compiler: /usr/bin/c++ -- works
> -- Detecting CXX compiler ABI info
> -- Detecting CXX compiler ABI info - done
> -- Found PythonInterp: /usr/bin/python (found version "2.6.8")
> -e:1: Use RbConfig instead of obsolete and deprecated Config.
> -e:1: Use RbConfig instead of obsolete and deprecated Config.
> -e:1: Use RbConfig instead of obsolete and deprecated Config.
> -e:1: Use RbConfig instead of obsolete and deprecated Config.
> -e:1: Use RbConfig instead of obsolete and deprecated Config.
> -e:1: Use RbConfig instead of obsolete and deprecated Config.
> -e:1: Use RbConfig instead of obsolete and deprecated Config.
> -e:1: Use RbConfig instead of obsolete and deprecated Config.
> -e:1: Use RbConfig instead of obsolete and deprecated Config.
> -e:1: Use RbConfig instead of obsolete and deprecated Config.
> -- Found Ruby: /usr/bin/ruby (found version "1.9.1")
> -- Found Doxygen: /usr/bin/doxygen
> -- Could NOT find VALGRIND (missing:  VALGRIND_EXECUTABLE)
> -- Looking for sasl_checkpass in sasl2
> -- Looking for sasl_checkpass in sasl2 - not found
> -- Looking for include files FOUND_SASL_H
> -- Looking for include files FOUND_SASL_H - found
> -- Could NOT find SASL (missing:  FOUND_SASL_LIB)
> -- No need to generate AMQP protocol sources
> -- No need to generate Qpid Management Framework sources
> -- Boost version: 1.56.0
> -- Found the following Boost libraries:
> --   program_options
> --   system
> -- Looking for clock_gettime
> -- Looking for clock_gettime - found
> -- Looking for uuid_generate in uuid
> -- Looking for uuid_generate in uuid - found
> -- Looking for include files HAVE_UUID_H
> -- Looking for include files HAVE_UUID_H - found
> -- Looking for include files HAVE_SDT
> -- Looking for include files HAVE_SDT - found
> -- Looking for include files HAVE_POLL
> -- Looking for include files HAVE_POLL - found
> -- Looking for include files HAVE_EPOLL
> -- Looking for include files HAVE_EPOLL - not found.
> -- checking for module 'nss'
> --   found nss, version 3.14.3
> -- Looking for _init in xerces-c
> -- Looking for _init in xerces-c - not found
> -- Looking for C++ include xercesc/framework/MemBufInputSource.hpp
> -- Looking for C++ include xercesc/framework/MemBufInputSource.hpp - 
> not found
> -- Looking for C++ include xqilla/xqilla-simple.hpp
> -- Looking for C++ include xqilla/xqilla-simple.hpp - not found
> -- Looking for C++ include xqilla/ast/XQEffectiveBooleanValue.hpp
> -- Looking for C++ include xqilla/ast/XQEffectiveBooleanValue.hpp - 
> not found
> -- Looking for ibv_create_qp in ibverbs
> -- Looking for ibv_create_qp in ibverbs - not found
> -- Looking for rdma_create_id in rdmacm
> -- Looking for rdma_create_id in rdmacm - not found
> -- Looking for include files HAVE_IBVERBS_H
> -- Looking for include files HAVE_IBVERBS_H - not found.
> -- Looking for include files HAVE_RDMACM_H
> -- Looking for include files HAVE_RDMACM_H - not found.
> -- Found Proton: 
> optimized;/usr/lib/libqpid-proton.so;debug;/usr/lib/libqpid-proton.so 
> (found version "0.7")
> -- Qpid proton found, amqp 1.0 support enabled
> -- Looking for LOG_AUTHPRIV
> -- Looking for LOG_AUTHPRIV - not found.
> -- Looking for LOG_FTP
> -- Looking for LOG_FTP - not found.
> -- Found BerkeleyDB: /usr/lib/libdb_cxx.so
> -- Looking for io_queue_init in aio
> -- Looking for io_queue_init in aio - not found
> -- Looking for include files HAVE_AIO_H
> -- Looking for include files HAVE_AIO_H - not found.
> -- Legacystore requires libaio which is absent.
> -- Legacystore requires libaio.h which is absent.
> -- Legacystore is excluded from build.
> -- Found BerkeleyDB: /usr/lib/libdb_cxx.so
> -- Linearstore requires libaio which is absent.
> -- Linearstore requires libaio.h which is absent.
> -- Linearstore is excluded from build.
> -- Could NOT find SWIG (missing:  SWIG_EXECUTABLE SWIG_DIR)
> -- Configuring done
> -- Generating done
> -- Build files have been written to: 
> /export/home/noname/install/qpid-0.28/cpp/build
> ------------------------------------ end output of cmake .. 
> ------------------------------------------------------
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Mime
View raw message