bbcarchdev / qpid-proton

qpid-proton (http://qpid.apache.org/proton/) packaging for Debian-based systems
Apache License 2.0
1 stars 3 forks source link

git-buildpackage fails during link stage #1

Open janrinze opened 10 years ago

janrinze commented 10 years ago

Using git clone and then git-buildpackage it seems the build fails because the uuid library and the clock library are not added during linking.

point where the build fails: Linking C shared library libqpid-proton.so cd /home/janrinze/sources/deb-qpid-proton/build/proton-c && /usr/bin/cmake -E cmake_link_script CMakeFiles/qpid-proton.dir/link.txt --verbose=1 /usr/bin/gcc -fPIC -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -Wl,--no-undefined -Wl,-Bsymbolic-functions -Wl,-z,relro -shared -Wl,-soname,libqpid-proton.so.2 -o libqpid-proton.so.2.0.0 CMakeFiles/qpid-proton.dir/src/object/object.c.o CMakeFiles/qpid-proton.dir/src/util.c.o CMakeFiles/qpid-proton.dir/src/error.c.o CMakeFiles/qpid-proton.dir/src/buffer.c.o CMakeFiles/qpid-proton.dir/src/parser.c.o CMakeFiles/qpid-proton.dir/src/scanner.c.o CMakeFiles/qpid-proton.dir/src/types.c.o CMakeFiles/qpid-proton.dir/src/framing/framing.c.o CMakeFiles/qpid-proton.dir/src/codec/codec.c.o CMakeFiles/qpid-proton.dir/src/codec/decoder.c.o CMakeFiles/qpid-proton.dir/src/codec/encoder.c.o CMakeFiles/qpid-proton.dir/src/dispatcher/dispatcher.c.o CMakeFiles/qpid-proton.dir/src/engine/engine.c.o CMakeFiles/qpid-proton.dir/src/transport/transport.c.o CMakeFiles/qpid-proton.dir/src/message/message.c.o CMakeFiles/qpid-proton.dir/src/sasl/sasl.c.o CMakeFiles/qpid-proton.dir/src/messenger/messenger.c.o CMakeFiles/qpid-proton.dir/src/messenger/subscription.c.o CMakeFiles/qpid-proton.dir/src/messenger/store.c.o CMakeFiles/qpid-proton.dir/src/messenger/transform.c.o CMakeFiles/qpid-proton.dir/src/posix/driver.c.o CMakeFiles/qpid-proton.dir/src/platform.c.o CMakeFiles/qpid-proton.dir/src/ssl/openssl.c.o -lssl -lcrypto CMakeFiles/qpid-proton.dir/src/platform.c.o: In function pn_i_now': /home/janrinze/sources/deb-qpid-proton/proton-c/src/platform.c:32: undefined reference toclock_gettime' CMakeFiles/qpid-proton.dir/src/platform.c.o: In function pn_i_genuuid': /home/janrinze/sources/deb-qpid-proton/proton-c/src/platform.c:63: undefined reference touuid_generate' /home/janrinze/sources/deb-qpid-proton/proton-c/src/platform.c:64: undefined reference to uuid_unparse' collect2: ld returned 1 exit status make[3]: *** [proton-c/libqpid-proton.so.2.0.0] Error 1 make[3]: Leaving directory/home/janrinze/sources/deb-qpid-proton/build' make[2]: * [proton-c/CMakeFiles/qpid-proton.dir/all] Error 2 make[2]: Leaving directory `/home/janrinze/sources/deb-qpid-proton/build' make[1]: * [all] Error 2 make[1]: Leaving directory`/home/janrinze/sources/deb-qpid-proton/build' dh_auto_build: make -j1 returned exit code 2 make: *\ [build] Error 2 dpkg-buildpackage: error: debian/rules build gave error exit status 2 debuild: fatal error at line 1350: dpkg-buildpackage -rfakeroot -D -us -uc -i -I failed gbp:error: debuild -i -I returned 29 gbp:error: Couldn't run 'debuild -i -I'

besides that it is strange that the config is set during the build stage to : dh_auto_configure -- -DSYSCONF_INSTALL_DIR=/etc -DBUILD_PERL=OFF -DBUILD_PYTHON=OFF -DBUILD_RUBY=OFF -DBUILD_PHP=OFF -DBUILD_JAVA=OFF -DBUILD_TESTS=OFF -DLIB_INSTALL_DIR=/usr/lib/x86_64-linux-gnu -DPROTON_LIBRARY=/usr/lib/x86_64-linux-gnu/libqpid-proton.so

which defeats the purpose of making PERL, PYTHON, PHP and JAVA libraries.

Any suggestions? Perhaps an added how-to-build.txt for debian packages could clear these issues up?

Best regards, Jan Rinze.

janrinze commented 10 years ago

thought it be wise to add this part too:

dh_auto_configure -- -DSYSCONF_INSTALL_DIR=/etc -DBUILD_PERL=OFF -DBUILD_PYTHON=OFF -DBUILD_RUBY=OFF -DBUILD_PHP=OFF -DBUILD_JAVA=OFF -DBUILD_TESTS=OFF -DLIB_INSTALL_DIR=/usr/lib/x86_64-linux-gnu -DPROTON_LIBRARY=/usr/lib/x86_64-linux-gnu/libqpid-proton.so -- The C 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 -- PN_VERSION: 0.6 -- Could NOT find Java (missing: Java_JAR_EXECUTABLE Java_JAVAC_EXECUTABLE Java_JAVAH_EXECUTABLE Java_JAVADOC_EXECUTABLE) -- checking for module 'openssl' -- found openssl, version 1.0.1 -- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libssl.so;/usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1..1") -- Looking for clock_gettime -- Looking for clock_gettime - found -- Looking for uuid_generate -- Looking for uuid_generate - found -- Looking for strerror_r -- Looking for strerror_r - found -- Looking for atoll -- Looking for atoll - found -- Found SWIG: /usr/bin/swig2.0 (found version "2.0.4") -- Found PythonLibs: /usr/lib/libpython2.7.so -- Found Ruby: /usr/bin/ruby (found version "1.8.7") -- Found Perl: /usr/bin/perl -- Trying alternative search for Perl -- PerlLibs Not Found -- Found Doxygen: /usr/bin/doxygen -- Looking for include files INTTYPES_AVAILABLE -- Looking for include files INTTYPES_AVAILABLE - found -- Can't locate the valgrind command; no run-time error detection -- Cannot find both Java and Maven: testing disabled for Proton-J and JNI Bindings -- Configuring done -- Generating done CMake Warning: Manually-specified variables were not used by the project:

BUILD_TESTS
SYSCONF_INSTALL_DIR

-- Build files have been written to: /home/janrinze/sources/deb-qpid-proton/build

janrinze commented 10 years ago

from the previous comment:

-- Looking for clock_gettime -- Looking for clock_gettime - found -- Looking for uuid_generate -- Looking for uuid_generate - found

this appears to be wrong. when running cmake manually:

-- Looking for clock_gettime -- Looking for clock_gettime - not found. -- Looking for clock_gettime in rt -- Looking for clock_gettime in rt - found -- Looking for uuid_generate -- Looking for uuid_generate - not found. -- Looking for uuid_generate in uuid -- Looking for uuid_generate in uuid - found

So somehow cmake gets it wrong.

Jan Rinze.

nevali commented 10 years ago

Hi Jan,

Which Debian distribution are you building in?

We've built this package using git-buildpackage (using a clean cowbuilder tree) for wheezy — from the paths in the log, it looks like you're not using git-pbuilder/cowbuilder/etc. and instead building on the host itself. In that instance, I'm not sure that the build-depends will get satisfied properly?

(And yes, the bindings are not currently built: getting those working wasn't a priority for us, and packaging them properly requires further work — patches to the build logic are, as they say, welcome…)

Mo

janrinze commented 10 years ago

Hi Mo.

we use Ubuntu 12 LTS. Since that only has support for qpid 0.16 I was looking for a way to build my own packages. Apparently the only solution i found was this. I can build the packages with 'git-buildpackages -us -uc' and i get deployable deb files. we will be using python a lot so i need to look into the bindings.

Best regards, Jan Rinze.