Re: [Podofo-users] Fix for the "could avoid useless dependency" Debian build warning
On Wed, 2018-01-17 at 00:03 +0100, Matthew Brincke wrote: > I don't have Fedora, Hi, thinking of it, it might not be only about Fedora, it's more about the build environment. Maybe if you had also exported: LDFLAGS='-Wl,--as-needed -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-z -Wl,defs' then you see it too. Just a guess. > So please test it on your distro The updated patch works fine. Thanks for it. I committed a similar version to the sources as revision 1869: http://sourceforge.net/p/podofo/code/1869 Thanks again and bye, zyx -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Podofo-users mailing list Podofo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/podofo-users
Re: [Podofo-users] Fix for the "could avoid useless dependency" Debian build warning
Hello all, hello Mattia, hello zyx, > Mattia Rizzolo has written on 14 January 2018 at 13:34: > > > On Sun, Jan 14, 2018 at 01:18:58PM +0100, zyx wrote: > > could you provide the exact warning you are referring to and in which > > stage (some context) it had been written, please? I do not see/did not > > notice any such warning on Fedora (maybe I overlooked it, or I do not ... snip ... > > It's actually a message not coming from the podofo build system, but > from dpkg-shlibdeps, i.e. the program that during a package build > inspects all the ELF binaries to detect what libraries they are linked > to and generate the list of dependencies. ... snip ... > > This is caused by overlinking, and e.g. using -Wl,--as-needed avoids it > (but better taking care of it like this patch is trying to do). > > > While the change itself looks fine, I wasn't able to build PoDoFo on > > Fedora with it, it failed with this error: > > > > Scanning dependencies of target podofosign > > [ 98%] Building CXX object > > tools/podofosign/CMakeFiles/podofosign.dir/podofosign.cpp.o > > [ 98%] Linking CXX executable podofosign > > CMakeFiles/podofosign.dir/podofosign.cpp.o: In function `main': > > .../tools/podofosign/podofosign.cpp:879: undefined reference to > > `OPENSSL_init_ssl' > > collect2: error: ld returned 1 exit status > > I'll let the OP take care of this error :) I don't have Fedora, but I've nevertheless thought of some changes to my patch (the new version is attached) to fix the build error: Added LIBCRYPTO_LDFLAGS and OPENSSL_LIBRARIES to the podofosign link. So please test it on your distro (already tested with sbuild's Debian sid, zyx, please test with your Fedora, I hope it'll work there). If it works, please first solve the issue my next e-mail will be about (and commit), then please commit this. Best regards, mabri > > -- > regards, > Mattia Rizzolo > > GPG Key: 66AE 2B4A FCCF 3F52 DA18 4D18 4B04 3FCD B944 4540 > more about me: https://mapreri.org > Launchpad user: https://launchpad.net/~mapreri > Debian QA page: https://qa.debian.org/developer.php?login=mattia--- libpodofo-0.9.5.orig/CMakeLists.txt +++ libpodofo-0.9.5/CMakeLists.txt @@ -509,10 +509,16 @@ IF(FONTCONFIG_FOUND AND WANT_FONTCONFIG) INCLUDE_DIRECTORIES(${FONTCONFIG_INCLUDE_DIR}) ENDIF(FONTCONFIG_FOUND AND WANT_FONTCONFIG) -SET(PODOFO_LIB -podofo -${PODOFO_LIB_DEPENDS} -) +IF(WIN32 OR PODOFO_BUILD_STATIC) + SET(PODOFO_LIB + podofo + ${PODOFO_LIB_DEPENDS} + ) +ELSE(WIN32 OR PODOFO_BUILD_STATIC) + SET(PODOFO_LIB podofo + ${stlport_libraries_if_use_stlport} + ) +ENDIF(WIN32 OR PODOFO_BUILD_STATIC) # # Setup directories we will need --- libpodofo-0.9.5.orig/tools/podofosign/CMakeLists.txt +++ libpodofo-0.9.5/tools/podofosign/CMakeLists.txt @@ -1,7 +1,16 @@ ADD_EXECUTABLE(podofosign podofosign.cpp) TARGET_INCLUDE_DIRECTORIES(podofosign PUBLIC ${LIBCRYPTO_INCLUDE_DIR}) -TARGET_LINK_LIBRARIES(podofosign ${PODOFO_LIB}) + +SET(podofosign_extra_libs +${LIBCRYPTO_LDFLAGS} +${LIBCRYPTO_LIBRARIES} +${OPENSSL_LIBRARIES} +) +TARGET_LINK_LIBRARIES(podofosign + ${podofosign_extra_libs} + ${PODOFO_LIB} +) SET_TARGET_PROPERTIES(podofosign PROPERTIES COMPILE_FLAGS "${PODOFO_CFLAGS}") ADD_DEPENDENCIES(podofosign ${PODOFO_DEPEND_TARGET}) INSTALL(TARGETS podofosign -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Podofo-users mailing list Podofo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/podofo-users
Re: [Podofo-users] Fix for the "could avoid useless dependency" Debian build warning
On Wed, 2018-01-10 at 01:07 +0100, Matthew Brincke wrote: > the patch for that is attached, please accept. Hi, could you provide the exact warning you are referring to and in which stage (some context) it had been written, please? I do not see/did not notice any such warning on Fedora (maybe I overlooked it, or I do not use proper build flags) and I do not have any single clue of Debian build system or anything around it, thus the reference itself really doesn't mean anything to me. It would be good to have it explicitly written in this thread also for the history and archive searching. While the change itself looks fine, I wasn't able to build PoDoFo on Fedora with it, it failed with this error: Scanning dependencies of target podofosign [ 98%] Building CXX object tools/podofosign/CMakeFiles/podofosign.dir/podofosign.cpp.o [ 98%] Linking CXX executable podofosign CMakeFiles/podofosign.dir/podofosign.cpp.o: In function `main': .../tools/podofosign/podofosign.cpp:879: undefined reference to `OPENSSL_init_ssl' collect2: error: ld returned 1 exit status Reverting the change, removing the build directory (thus starting the build from scratch), built PoDoFo with no issue. Thanks and bye, zyx -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Podofo-users mailing list Podofo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/podofo-users
Re: [Podofo-users] Fix for the "could avoid useless dependency" Debian build warning
On Wed, 10 Jan 2018 01:07:59 +0100 (CET) Matthew Brinckewrote: > Hello all, > > the patch for that is attached, please accept. > It's made against version 0.9.5, but to parts > of CMakeLists.txt files which haven't been changed > there (& context) since then AFAIK. > I've build-tested with sbuild into an (up-to-date, > minimal except for GNU autotools, maybe that's > needed for the Debian packing tools however) > Debian sid chroot, then tested the programs by > invoking them without parameters, getting their > respective usage message fine, so no problems with > shared-library linking (at load time, but they don't > use later dynamic loading with dlopen() AFAIK). > > Best regards, mabri My take is this should be ok for other Linux distros as well. Thanks for the patch! Peter -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Podofo-users mailing list Podofo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/podofo-users
[Podofo-users] Fix for the "could avoid useless dependency" Debian build warning
Hello all, the patch for that is attached, please accept. It's made against version 0.9.5, but to parts of CMakeLists.txt files which haven't been changed there (& context) since then AFAIK. I've build-tested with sbuild into an (up-to-date, minimal except for GNU autotools, maybe that's needed for the Debian packing tools however) Debian sid chroot, then tested the programs by invoking them without parameters, getting their respective usage message fine, so no problems with shared-library linking (at load time, but they don't use later dynamic loading with dlopen() AFAIK). Best regards, mabri--- libpodofo-0.9.5.orig/CMakeLists.txt +++ libpodofo-0.9.5/CMakeLists.txt @@ -509,10 +509,14 @@ IF(FONTCONFIG_FOUND AND WANT_FONTCONFIG) INCLUDE_DIRECTORIES(${FONTCONFIG_INCLUDE_DIR}) ENDIF(FONTCONFIG_FOUND AND WANT_FONTCONFIG) -SET(PODOFO_LIB -podofo -${PODOFO_LIB_DEPENDS} -) +IF(WIN32 OR PODOFO_BUILD_STATIC) + SET(PODOFO_LIB + podofo + ${PODOFO_LIB_DEPENDS} + ) +ELSE(WIN32 OR PODOFO_BUILD_STATIC) + SET(PODOFO_LIB podofo) +ENDIF(WIN32 OR PODOFO_BUILD_STATIC) # # Setup directories we will need --- libpodofo-0.9.5.orig/tools/podofosign/CMakeLists.txt +++ libpodofo-0.9.5/tools/podofosign/CMakeLists.txt @@ -1,7 +1,12 @@ ADD_EXECUTABLE(podofosign podofosign.cpp) TARGET_INCLUDE_DIRECTORIES(podofosign PUBLIC ${LIBCRYPTO_INCLUDE_DIR}) -TARGET_LINK_LIBRARIES(podofosign ${PODOFO_LIB}) + +SET(podofosign_extra_libs ${LIBCRYPTO_LIBRARIES}) +TARGET_LINK_LIBRARIES(podofosign + ${PODOFO_LIB} + ${podofosign_extra_libs} +) SET_TARGET_PROPERTIES(podofosign PROPERTIES COMPILE_FLAGS "${PODOFO_CFLAGS}") ADD_DEPENDENCIES(podofosign ${PODOFO_DEPEND_TARGET}) INSTALL(TARGETS podofosign -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Podofo-users mailing list Podofo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/podofo-users