You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by rherbert <na...@ryan.xar.us> on 2018/07/03 16:06:23 UTC

Problems Building Proton 0.24

I had to make a couple updates to get the build to work on my system. I'm
running on RHEL6 with devtoolset-6 and cmake 3.6.1. The fuzz executables
won't link:

[ 43%] Linking C executable fuzz-url
cd
/home/herbertr/data/tps/trunk/raptor/rhel6/build/qpid-proton/BUILD/qpid-proton-0.24.0/c/tests/fuzz
&& /usr/bin/cmake3 -E cmake_link_script CMakeFiles/fuzz-url.dir/link.txt
--verbose=1
make[2]: Leaving directory
'/data/herbertr/tps/trunk/raptor/rhel6/build/qpid-proton/BUILD/qpid-proton-0.24.0'
cd
/home/herbertr/data/tps/trunk/raptor/rhel6/build/qpid-proton/BUILD/qpid-proton-0.24.0/c
&& /usr/bin/cmake3 -E cmake_symlink_library libqpid-proton-proactor.so.1.3.2
libqpid-proton-proactor.so.1 libqpid-proton-proactor.so
/opt/rh/devtoolset-6/root/usr/bin/cc  -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic  -fvisibility=hidden -O2 -g
-DNDEBUG   -Wl,-R/opt/raptor/lib64 CMakeFiles/fuzz-url.dir/fuzz-url.c.o
CMakeFiles/fuzz-url.dir/__/__/src/extra/url.c.o
CMakeFiles/fuzz-url.dir/__/__/src/core/util.c.o  -o fuzz-url -rdynamic
../../libqpid-proton-core.so.10.5.0 libStandaloneFuzzTargetMain.a -lssl
-lcrypto -lpthread -lsasl2 -lpthread -lsasl2 -lrt
-Wl,-rpath,/home/herbertr/data/tps/trunk/raptor/rhel6/build/qpid-proton/BUILD/qpid-proton-0.24.0/c 
make[2]: Leaving directory
'/data/herbertr/tps/trunk/raptor/rhel6/build/qpid-proton/BUILD/qpid-proton-0.24.0'
[ 43%] Built target c-connection-driver-tests
/opt/rh/devtoolset-6/root/usr/libexec/gcc/x86_64-redhat-linux/6.2.1/ld:
cannot open output file fuzz-url: Is a directory
collect2: error: ld returned 1 exit status
c/tests/fuzz/CMakeFiles/fuzz-url.dir/build.make:155: recipe for target
'c/tests/fuzz/fuzz-url' failed
make[2]: *** [c/tests/fuzz/fuzz-url] Error 1
make[2]: Leaving directory
'/data/herbertr/tps/trunk/raptor/rhel6/build/qpid-proton/BUILD/qpid-proton-0.24.0'
CMakeFiles/Makefile2:2066: recipe for target
'c/tests/fuzz/CMakeFiles/fuzz-url.dir/all' failed
make[1]: *** [c/tests/fuzz/CMakeFiles/fuzz-url.dir/all] Error 2

Also the rest of the executables won't link because they can't find
pn_listener_addr(). 

Here are my patches, fixing the pn_listener_addr() problem and just
disabling the fuzz stuff:

diff -Naur qpid-proton-0.24.0-orig/c/tests/fuzz/CMakeLists.txt
qpid-proton-0.24.0/c/tests/fuzz/CMakeLists.txt
--- qpid-proton-0.24.0-orig/c/tests/fuzz/CMakeLists.txt>2018-06-26
09:42:03.000000000 -0400
+++ qpid-proton-0.24.0/c/tests/fuzz/CMakeLists.txt>-2018-07-03
08:44:38.906692810 -0400
@@ -44,11 +44,13 @@
 endmacro(pn_add_fuzz_test)

 # Fuzz tests at the User API level
-pn_add_fuzz_test (fuzz-connection-driver fuzz-connection-driver.c)
-pn_add_fuzz_test (fuzz-message-decode fuzz-message-decode.c)
+# Does not link properly
+#pn_add_fuzz_test (fuzz-connection-driver fuzz-connection-driver.c)
+#pn_add_fuzz_test (fuzz-message-decode fuzz-message-decode.c)

 # pn_url_parse is not in proton core and is only used by messenger so
compile specially
-pn_add_fuzz_test (fuzz-url fuzz-url.c ${PN_C_SOURCE_DIR}/extra/url.c
${PN_C_SOURCE_DIR}/core/util.c)
+# Does not link properly
+#pn_add_fuzz_test (fuzz-url fuzz-url.c ${PN_C_SOURCE_DIR}/extra/url.c
${PN_C_SOURCE_DIR}/core/util.c)

 # This regression test can take a very long time so don't run by default
 if(HAS_PROACTOR AND FUZZ_LONG_TESTS)
@@ -59,4 +61,4 @@
 # Fuzz tests of internals

 # pni_sniff_header is internal so it has to be compiled specially
-pn_add_fuzz_test (fuzz-sniff-header fuzz-sniff-header.c
${PN_C_SOURCE_DIR}/core/autodetect.c)
+#pn_add_fuzz_test (fuzz-sniff-header fuzz-sniff-header.c
${PN_C_SOURCE_DIR}/core/autodetect.c)
diff -Naur qpid-proton-0.24.0-orig/cpp/CMakeLists.txt
qpid-proton-0.24.0/cpp/CMakeLists.txt
--- qpid-proton-0.24.0-orig/cpp/CMakeLists.txt>-2018-06-26
09:42:03.000000000 -0400
+++ qpid-proton-0.24.0/cpp/CMakeLists.txt>--2018-07-03 10:01:02.725690380
-0400
@@ -236,7 +236,7 @@

 macro(add_cpp_test test)
   add_executable (${test} src/${test}.cpp)
-  target_link_libraries (${test} qpid-proton-cpp ${PLATFORM_LIBS})
+  target_link_libraries (${test} qpid-proton-cpp qpid-proton
${PLATFORM_LIBS})
   if (CMAKE_SYSTEM_NAME STREQUAL Windows)
     add_test (NAME cpp-${test}
       COMMAND ${PN_ENV_SCRIPT}
diff -Naur qpid-proton-0.24.0-orig/cpp/examples/ProtonCppConfig.cmake
qpid-proton-0.24.0/cpp/examples/ProtonCppConfig.cmake
--- qpid-proton-0.24.0-orig/cpp/examples/ProtonCppConfig.cmake>-2018-06-26
09:42:03.000000000 -0400
+++ qpid-proton-0.24.0/cpp/examples/ProtonCppConfig.cmake>--2018-07-03
10:07:19.086690220 -0400
@@ -30,6 +30,6 @@
 set (ProtonCpp_VERSION       ${PN_VERSION})
 set (ProtonCpp_INCLUDE_DIRS  ${CMAKE_SOURCE_DIR}/c/include
${CMAKE_SOURCE_DIR}/cpp/include
                              ${CMAKE_BINARY_DIR}/cpp)
-set (ProtonCpp_LIBRARIES     ${C_EXAMPLE_LINK_FLAGS} qpid-proton-cpp)
+set (ProtonCpp_LIBRARIES     ${C_EXAMPLE_LINK_FLAGS} qpid-proton-cpp
qpid-proton)
 set (ProtonCpp_DEFINITIONS   ${CXX_EXAMPLE_FLAGS})
 set (ProtonCpp_FOUND True)




--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html

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


Re: Problems Building Proton 0.24

Posted by Andrew Stitcher <as...@apache.org>.
If you want to simply build proton without the fuzz tests for whatever
reason you should just run cmake with the following option:

cmake ... -DENABLE_FUZZ_TESTING=OFF

or use ccmake to toggle that option. You have no need to patch the
source.

Having said that, we do test building proton on RHEL 6 and it does
work, although we use the system compilers.

Andrew

On Tue, 2018-07-03 at 09:06 -0700, rherbert wrote:
> I had to make a couple updates to get the build to work on my system.
> I'm
> running on RHEL6 with devtoolset-6 and cmake 3.6.1. The fuzz
> executables
> won't link:
> 
> [ 43%] Linking C executable fuzz-url
> cd
> /home/herbertr/data/tps/trunk/raptor/rhel6/build/qpid-
> proton/BUILD/qpid-proton-0.24.0/c/tests/fuzz
> && /usr/bin/cmake3 -E cmake_link_script CMakeFiles/fuzz-
> url.dir/link.txt
> --verbose=1
> make[2]: Leaving directory
> '/data/herbertr/tps/trunk/raptor/rhel6/build/qpid-proton/BUILD/qpid-
> proton-0.24.0'
> cd
> /home/herbertr/data/tps/trunk/raptor/rhel6/build/qpid-
> proton/BUILD/qpid-proton-0.24.0/c
> && /usr/bin/cmake3 -E cmake_symlink_library libqpid-proton-
> proactor.so.1.3.2
> libqpid-proton-proactor.so.1 libqpid-proton-proactor.so
> /opt/rh/devtoolset-6/root/usr/bin/cc  -O2 -g -pipe -Wall
> -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
> --param=ssp-buffer-size=4 -m64 -mtune=generic  -fvisibility=hidden
> -O2 -g
> -DNDEBUG   -Wl,-R/opt/raptor/lib64 CMakeFiles/fuzz-url.dir/fuzz-
> url.c.o
> CMakeFiles/fuzz-url.dir/__/__/src/extra/url.c.o
> CMakeFiles/fuzz-url.dir/__/__/src/core/util.c.o  -o fuzz-url
> -rdynamic
> ../../libqpid-proton-core.so.10.5.0 libStandaloneFuzzTargetMain.a
> -lssl
> -lcrypto -lpthread -lsasl2 -lpthread -lsasl2 -lrt
> -Wl,-rpath,/home/herbertr/data/tps/trunk/raptor/rhel6/build/qpid-
> proton/BUILD/qpid-proton-0.24.0/c 
> make[2]: Leaving directory
> '/data/herbertr/tps/trunk/raptor/rhel6/build/qpid-proton/BUILD/qpid-
> proton-0.24.0'
> [ 43%] Built target c-connection-driver-tests
> /opt/rh/devtoolset-6/root/usr/libexec/gcc/x86_64-redhat-
> linux/6.2.1/ld:
> cannot open output file fuzz-url: Is a directory
> collect2: error: ld returned 1 exit status
> c/tests/fuzz/CMakeFiles/fuzz-url.dir/build.make:155: recipe for
> target
> 'c/tests/fuzz/fuzz-url' failed
> make[2]: *** [c/tests/fuzz/fuzz-url] Error 1
> make[2]: Leaving directory
> '/data/herbertr/tps/trunk/raptor/rhel6/build/qpid-proton/BUILD/qpid-
> proton-0.24.0'
> CMakeFiles/Makefile2:2066: recipe for target
> 'c/tests/fuzz/CMakeFiles/fuzz-url.dir/all' failed
> make[1]: *** [c/tests/fuzz/CMakeFiles/fuzz-url.dir/all] Error 2
> 
> Also the rest of the executables won't link because they can't find
> pn_listener_addr(). 
> 
> Here are my patches, fixing the pn_listener_addr() problem and just
> disabling the fuzz stuff:
> 
> diff -Naur qpid-proton-0.24.0-orig/c/tests/fuzz/CMakeLists.txt
> qpid-proton-0.24.0/c/tests/fuzz/CMakeLists.txt
> --- qpid-proton-0.24.0-orig/c/tests/fuzz/CMakeLists.txt>2018-06-26
> 09:42:03.000000000 -0400
> +++ qpid-proton-0.24.0/c/tests/fuzz/CMakeLists.txt>-2018-07-03
> 08:44:38.906692810 -0400
> @@ -44,11 +44,13 @@
>  endmacro(pn_add_fuzz_test)
> 
>  # Fuzz tests at the User API level
> -pn_add_fuzz_test (fuzz-connection-driver fuzz-connection-driver.c)
> -pn_add_fuzz_test (fuzz-message-decode fuzz-message-decode.c)
> +# Does not link properly
> +#pn_add_fuzz_test (fuzz-connection-driver fuzz-connection-driver.c)
> +#pn_add_fuzz_test (fuzz-message-decode fuzz-message-decode.c)
> 
>  # pn_url_parse is not in proton core and is only used by messenger
> so
> compile specially
> -pn_add_fuzz_test (fuzz-url fuzz-url.c ${PN_C_SOURCE_DIR}/extra/url.c
> ${PN_C_SOURCE_DIR}/core/util.c)
> +# Does not link properly
> +#pn_add_fuzz_test (fuzz-url fuzz-url.c
> ${PN_C_SOURCE_DIR}/extra/url.c
> ${PN_C_SOURCE_DIR}/core/util.c)
> 
>  # This regression test can take a very long time so don't run by
> default
>  if(HAS_PROACTOR AND FUZZ_LONG_TESTS)
> @@ -59,4 +61,4 @@
>  # Fuzz tests of internals
> 
>  # pni_sniff_header is internal so it has to be compiled specially
> -pn_add_fuzz_test (fuzz-sniff-header fuzz-sniff-header.c
> ${PN_C_SOURCE_DIR}/core/autodetect.c)
> +#pn_add_fuzz_test (fuzz-sniff-header fuzz-sniff-header.c
> ${PN_C_SOURCE_DIR}/core/autodetect.c)
> diff -Naur qpid-proton-0.24.0-orig/cpp/CMakeLists.txt
> qpid-proton-0.24.0/cpp/CMakeLists.txt
> --- qpid-proton-0.24.0-orig/cpp/CMakeLists.txt>-2018-06-26
> 09:42:03.000000000 -0400
> +++ qpid-proton-0.24.0/cpp/CMakeLists.txt>--2018-07-03
> 10:01:02.725690380
> -0400
> @@ -236,7 +236,7 @@
> 
>  macro(add_cpp_test test)
>    add_executable (${test} src/${test}.cpp)
> -  target_link_libraries (${test} qpid-proton-cpp ${PLATFORM_LIBS})
> +  target_link_libraries (${test} qpid-proton-cpp qpid-proton
> ${PLATFORM_LIBS})
>    if (CMAKE_SYSTEM_NAME STREQUAL Windows)
>      add_test (NAME cpp-${test}
>        COMMAND ${PN_ENV_SCRIPT}
> diff -Naur qpid-proton-0.24.0-orig/cpp/examples/ProtonCppConfig.cmake
> qpid-proton-0.24.0/cpp/examples/ProtonCppConfig.cmake
> --- qpid-proton-0.24.0-orig/cpp/examples/ProtonCppConfig.cmake>-2018-
> 06-26
> 09:42:03.000000000 -0400
> +++ qpid-proton-0.24.0/cpp/examples/ProtonCppConfig.cmake>--2018-07-
> 03
> 10:07:19.086690220 -0400
> @@ -30,6 +30,6 @@
>  set (ProtonCpp_VERSION       ${PN_VERSION})
>  set (ProtonCpp_INCLUDE_DIRS  ${CMAKE_SOURCE_DIR}/c/include
> ${CMAKE_SOURCE_DIR}/cpp/include
>                               ${CMAKE_BINARY_DIR}/cpp)
> -set (ProtonCpp_LIBRARIES     ${C_EXAMPLE_LINK_FLAGS} qpid-proton-
> cpp)
> +set (ProtonCpp_LIBRARIES     ${C_EXAMPLE_LINK_FLAGS} qpid-proton-cpp
> qpid-proton)
>  set (ProtonCpp_DEFINITIONS   ${CXX_EXAMPLE_FLAGS})
>  set (ProtonCpp_FOUND True)
> 
> 
> 
> 
> --
> Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f21589
> 36.html
> 
> ---------------------------------------------------------------------
> 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