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

Reply via email to