Skip to contentSkip to conversation

package/zziplib: fix static build failure with mpd

PATCH Superseded Andreas Ziegler 4 participants 14 messages Dec 24, 2021 – Sep 13, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/zziplib: fix static build failure with mpd

The latest released version of zziplib copies static libraries with appended major version, but omits creating the necessary links to the base file names. This prevents the linker to find the libraries via the search path.

There is a discussion upstream: https://github.com/gdraheim/zziplib/issues/117

Update zzip/CMakeLists.txt to the current master, version a32538e to enable creation of symlinks.

This resolves the following autobuild issue:

http://autobuild.buildroot.net/results/ba711034c0abe980f677e26de41739223e2f66e9

---
 ...01-update-zzip-cmakelists-to-a32538e.patch | 220 ++++++++++++++++++
 1 file changed, 220 insertions(+)
 create mode 100644 package/zziplib/0001-update-zzip-cmakelists-to-a32538e.patch
package/zziplib/0001-update-zzip-cmakelists-to-a32538e.patch new file +220 -0
new file mode 100644
index 0000000000..1ed9243f69
@@ -0,0 +1,220 @@
+--- zziplib-0.13.72/zzip/CMakeLists.txt
++++ zziplib-a32538e/zzip/CMakeLists.txt
+@@ -14,12 +14,11 @@
+ 
+ # options ###########################################################
+ option(BUILD_SHARED_LIBS "Build a shared library" ON)
+-option(BUILD_STATIC_LIBS "Build the static library" OFF)
+ option(MSVC_STATIC_RUNTIME "Build with static runtime libs (/MT)" ON)
+ option(ZZIPMMAPPED "Build libzzipmmapped (not fully portable)" ON)
+ option(ZZIPFSEEKO "Build libzzipfseeko (based on posix.1 api)" ON)
+ 
+-if(UNIX)
++if(UNIX OR MINGW)
+ option(ZZIP_COMPAT "Build compatibility with old libzzip releases" ON)
+ option(ZZIP_LIBTOOL "Ensure binary compatibility with libtool" ON)
+ option(ZZIP_PKGCONFIG "Generate pkg-config files for linking" ON)
+@@ -27,6 +26,12 @@
+ option(ZZIP_COMPAT "Build compatibility with old libzzip releases" OFF)
+ option(ZZIP_LIBTOOL "Ensure binary compatibility with libtool" OFF)
+ option(ZZIP_PKGCONFIG "Generate pkg-config files for linking" OFF)
++endif()
++
++if(ZZIP_LIBTOOL OR ZZIP_PKGCONFIG)
++option(ZZIP_LIBLATEST "Ensure libname.lib links to libname-REL.lib" ON)
++else()
++option(ZZIP_LIBLATEST "Ensure libname.lib links to libname-REL.lib" OFF)
+ endif()
+ 
+ # used in zzip/_config.h
+@@ -114,7 +119,7 @@
+     )
+ endif()
+ 
+-set(CMAKE_POSITION_INDEPENDENT_CODE ON)
++set(CMAKE_POSITION_INDEPENDENT_CODE ${BUILD_SHARED_LIBS})
+ add_definitions ( -DHAVE_CONFIG_H )
+ 
+ set(RELNUM "${PROJECT_VERSION_MAJOR}")
+@@ -276,103 +281,103 @@
+     ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ endif()
+ 
+-if(ZZIP_COMPAT)
+-  install(FILES ${outdir}/compat/zzip.h ${outdir}/compat/zziplib.h ${outdir}/compat/zzip-io.h 
+-          DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+-  if(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG)
++if(ZZIP_COMPAT OR ZZIP_LIBTOOL)
++  if(BUILD_SHARED_LIBS AND CMAKE_SHARED_LIBRARY_SONAME_C_FLAG)
+     set(lib ${CMAKE_SHARED_LIBRARY_PREFIX})
+     set(dll ${CMAKE_SHARED_LIBRARY_SUFFIX})
+-    set(libdir ${CMAKE_INSTALL_FULL_LIBDIR})
+     get_target_property(libname libzzip OUTPUT_NAME)
+     get_target_property(librelease libzzip RELEASE_POSTFIX)
+-    get_target_property(libversion libzzip VERSION)
+-    install(CODE "execute_process(COMMAND bash -c \"set -e
+-        cd $DESTDIR/${libdir}
+-        if [ -f ${lib}${libname}${librelease}.${libversion}${dll} ]; then
+-          # Fix for APPLE where dylib goes in the end
+-          ln -s ${lib}${libname}${librelease}.${libversion}${dll} ${lib}${libname}${librelease}${dll}.${libversion}
+-        fi
+-        [ -f ${lib}${libname}${librelease}${dll}.${libversion} ] || exit 0
+-        echo -n .. Installing: `pwd`
+-        ln -svf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}
+-        echo -n .. Installing: `pwd`
+-        ln -svf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.10
+-        echo -n .. Installing: `pwd`
+-        ln -svf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.11
+-        echo -n .. Installing: `pwd`
+-        ln -svf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.12
+-        \")")
++    add_custom_target(libzzip_links ALL
++        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzip> ${lib}${libname}${librelease}${dll}.10
++        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzip> ${lib}${libname}${librelease}${dll}.11
++        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzip> ${lib}${libname}${librelease}${dll}.12
++        )
++    install(FILES
++      ${outdir}/${lib}${libname}${librelease}${dll}.10
++      ${outdir}/${lib}${libname}${librelease}${dll}.11
++      ${outdir}/${lib}${libname}${librelease}${dll}.12
++      DESTINATION ${CMAKE_INSTALL_LIBDIR})
+   endif()
+ endif()
+ 
++if(ZZIP_COMPAT)
++  install(FILES ${outdir}/compat/zzip.h ${outdir}/compat/zziplib.h ${outdir}/compat/zzip-io.h
++          DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
++endif()
++
+ if(ZZIP_LIBTOOL)
+-  if(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG)
++  if(BUILD_SHARED_LIBS AND CMAKE_SHARED_LIBRARY_SONAME_C_FLAG)
+     set(lib ${CMAKE_SHARED_LIBRARY_PREFIX})
+     set(dll ${CMAKE_SHARED_LIBRARY_SUFFIX})
+-    set(libdir ${CMAKE_INSTALL_FULL_LIBDIR})
+-    get_target_property(libname libzzip OUTPUT_NAME)
+-    get_target_property(librelease libzzip RELEASE_POSTFIX)
+-    get_target_property(libversion libzzip VERSION)
+-    install(CODE "execute_process(COMMAND bash -c \"set -e
+-        cd $DESTDIR/${libdir}
+-        if [ -f ${lib}${libname}${librelease}.${libversion}${dll} ]; then
+-          # Fix for APPLE where dylib goes in the end
+-          ln -s ${lib}${libname}${librelease}.${libversion}${dll} ${lib}${libname}${librelease}${dll}.${libversion}
+-        fi
+-        [ -f ${lib}${libname}${librelease}${dll}.${libversion} ] || exit 0
+-        echo -n .. Installing: `pwd`
+-        ln -svf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${dll}
+-        echo -n .. Installing: `pwd`
+-        ln -svf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.10
+-        echo -n .. Installing: `pwd`
+-        ln -svf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.11
+-        echo -n .. Installing: `pwd`
+-        ln -svf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.12
+-        \")")
+     if(ZZIPFSEEKO)
+     get_target_property(libname libzzipfseeko OUTPUT_NAME)
+     get_target_property(librelease libzzipfseeko RELEASE_POSTFIX)
+-    get_target_property(libversion libzzipfseeko VERSION)
+-    install(CODE "execute_process(COMMAND bash -c \"set -e
+-        cd $DESTDIR/${libdir}
+-        if [ -f ${lib}${libname}${librelease}.${libversion}${dll} ]; then
+-          # Fix for APPLE where dylib goes in the end
+-          ln -s ${lib}${libname}${librelease}.${libversion}${dll} ${lib}${libname}${librelease}${dll}.${libversion}
+-        fi
+-        [ -f ${lib}${libname}${librelease}${dll}.${libversion} ] || exit 0
+-        echo -n .. Installing: `pwd`
+-        ln -svf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${dll}
+-        echo -n .. Installing: `pwd`
+-        ln -svf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.10
+-        echo -n .. Installing: `pwd`
+-        ln -svf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.11
+-        echo -n .. Installing: `pwd`
+-        ln -svf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.12
+-        \")")
++    add_custom_target(libzzipfseeko_links ALL
++        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzipfseeko> ${lib}${libname}${librelease}${dll}.10
++        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzipfseeko> ${lib}${libname}${librelease}${dll}.11
++        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzipfseeko> ${lib}${libname}${librelease}${dll}.12
++        )
++    install(FILES
++        ${outdir}/${lib}${libname}${librelease}${dll}.10
++        ${outdir}/${lib}${libname}${librelease}${dll}.11
++        ${outdir}/${lib}${libname}${librelease}${dll}.12
++        DESTINATION ${CMAKE_INSTALL_LIBDIR})
+     endif(ZZIPFSEEKO)
+     if(ZZIPMMAPPED)
+     get_target_property(libname libzzipmmapped OUTPUT_NAME)
+     get_target_property(librelease libzzipmmapped RELEASE_POSTFIX)
+-    get_target_property(libversion libzzipmmapped VERSION)
+-    install(CODE "execute_process(COMMAND bash -c \"set -e
+-        cd $DESTDIR/${libdir}
+-        if [ -f ${lib}${libname}${librelease}.${libversion}${dll} ]; then
+-          # Fix for APPLE where dylib goes in the end
+-          ln -s ${lib}${libname}${librelease}.${libversion}${dll} ${lib}${libname}${librelease}${dll}.${libversion}
+-        fi
+-        [ -f ${lib}${libname}${librelease}${dll}.${libversion} ] || exit 0
+-        echo -n .. Installing: `pwd`
+-        ln -svf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${dll}
+-        echo -n .. Installing: `pwd`
+-        ln -svf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.10
+-        echo -n .. Installing: `pwd`
+-        ln -svf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.11
+-        echo -n .. Installing: `pwd`
+-        ln -svf ${lib}${libname}${librelease}${dll}.${libversion} ${lib}${libname}${librelease}${dll}.12
+-        \")")
++    add_custom_target(libzzipmmaped_links ALL
++        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzipmmapped> ${lib}${libname}${librelease}${dll}.10
++        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzipmmapped> ${lib}${libname}${librelease}${dll}.11
++        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzipmmapped> ${lib}${libname}${librelease}${dll}.12
++        )
++    install(FILES
++        ${outdir}/${lib}${libname}${librelease}${dll}.10
++        ${outdir}/${lib}${libname}${librelease}${dll}.11
++        ${outdir}/${lib}${libname}${librelease}${dll}.12
++        DESTINATION ${CMAKE_INSTALL_LIBDIR})
+     endif(ZZIPMMAPPED)
+   endif(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG)
+ endif(ZZIP_LIBTOOL)
++
++if(ZZIP_LIBLATEST)
++  if(BUILD_SHARED_LIBS)
++    set(lib ${CMAKE_SHARED_LIBRARY_PREFIX})
++    set(dll ${CMAKE_SHARED_LIBRARY_SUFFIX})
++  else()
++    set(lib ${CMAKE_STATIC_LIBRARY_PREFIX})
++    set(dll ${CMAKE_STATIC_LIBRARY_SUFFIX})
++  endif()
++    get_target_property(libname libzzip OUTPUT_NAME)
++    get_target_property(librelease libzzip RELEASE_POSTFIX)
++    add_custom_target(libzzip_latest ALL
++        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzip> ${lib}${libname}${dll}
++        )
++    install(FILES
++        ${outdir}/${lib}${libname}${dll}
++        DESTINATION ${CMAKE_INSTALL_LIBDIR})
++    if(ZZIPFSEEKO)
++    get_target_property(libname libzzipfseeko OUTPUT_NAME)
++    get_target_property(librelease libzzipfseeko RELEASE_POSTFIX)
++    add_custom_target(libzzipfseeko_latest ALL
++        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzipfseeko> ${lib}${libname}${dll}
++        )
++    install(FILES
++        ${outdir}/${lib}${libname}${dll}
++        DESTINATION ${CMAKE_INSTALL_LIBDIR})
++    endif(ZZIPFSEEKO)
++    if(ZZIPMMAPPED)
++    get_target_property(libname libzzipmmapped OUTPUT_NAME)
++    get_target_property(librelease libzzipmmapped RELEASE_POSTFIX)
++    add_custom_target(libzzipmmaped_latest ALL
++        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzipmmapped> ${lib}${libname}${dll}
++        )
++    install(FILES
++        ${outdir}/${lib}${libname}${dll}
++        DESTINATION ${CMAKE_INSTALL_LIBDIR})
++    endif(ZZIPMMAPPED)
++endif(ZZIP_LIBLATEST)
++
+ 
+ ## messages ##############################################
+ 
+
Signature · 6 lines
2.33.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Hello Andreas,

Quoted 25 lines · On Fri, 24 Dec 2021 17:21:52 +0100 Andreas Ziegler <[email protected]> wrote:

The latest released version of zziplib copies static libraries with appended major version, but omits creating the necessary links to the base file names. This prevents the linker to find the libraries via the search path.

There is a discussion upstream: https://github.com/gdraheim/zziplib/issues/117

Update zzip/CMakeLists.txt to the current master, version a32538e to enable creation of symlinks.

This resolves the following autobuild issue:

http://autobuild.buildroot.net/results/ba711034c0abe980f677e26de41739223e2f66e9

---
 ...01-update-zzip-cmakelists-to-a32538e.patch | 220 ++++++++++++++++++
 1 file changed, 220 insertions(+)
 create mode 100644 package/zziplib/0001-update-zzip-cmakelists-to-a32538e.patch
package/zziplib/0001-update-zzip-cmakelists-to-a32538e.patch new file +0 -0
new file mode 100644
index 0000000000..1ed9243f69

package/zziplib/0001-update-zzip-cmakelists-to-a32538e.patch line 2

Quoted 2 lines
package/zziplib/0001-update-zzip-cmakelists-to-a32538e.patch new file +2 -0
@@ -0,0 +1,220 @@
+--- zziplib-0.13.72/zzip/CMakeLists.txt
++++ zziplib-a32538e/zzip/CMakeLists.txt

Thanks a lot for looking into this build issue!

However, we want patches to have a proper description and Signed-off-by. But it's not really nice to just have a large patch that updates file XYZ to version ABC. What about backporting the few specific patches that are needed?

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

PATCH v2 1/1 package/zziplib: fix static build failure with mpd

The current released version of zziplib copies static libraries with appended major version, but omits creating the necessary links to the base file names. This prevents the linker to find the libraries via the search path.

This issue (https://github.com/gdraheim/zziplib/issues/117) has been fixed
upstream; this patch extracts the necessary part of commit 0e8d35f92efb680c81f6ec1fca9f11d173dce389, to enable creation of symlinks.

This resolves the following autobuild issue:

http://autobuild.buildroot.net/results/ba711034c0abe980f677e26de41739223e2f66e9

---
Changes v1 -> v2:
- extract link creation from commit 0e8d35f

 ...-implant-ZZIP_LIBLATEST-for-zzip_lib.patch | 78 +++++++++++++++++++
 1 file changed, 78 insertions(+)
 create mode 100644 package/zziplib/0001-implant-ZZIP_LIBLATEST-for-zzip_lib.patch
package/zziplib/0001-implant-ZZIP_LIBLATEST-for-zzip_lib.patch new file +78 -0
new file mode 100644
index 0000000000..50380861bc
@@ -0,0 +1,78 @@
+Extract link creation for versioned libraries from commit
+0e8d35f92efb680c81f6ec1fca9f11d173dce389.
+
+Signed-off-by: Andreas Ziegler <[email protected]>
+
+---
+From 0e8d35f92efb680c81f6ec1fca9f11d173dce389 Mon Sep 17 00:00:00 2001
+From: Guido Draheim <[email protected]>
+Date: Sat, 22 May 2021 15:13:28 +0200
+Subject: [PATCH] #117 implant ZZIP_LIBLATEST for zzip.lib
+
+---
+ zzip/CMakeLists.txt | 57 +++++++++++++++++++++++++++++++++++----------
+ 1 file changed, 45 insertions(+), 12 deletions(-)
+
+diff --git a/zzip/CMakeLists.txt b/zzip/CMakeLists.txt
+index a966d5f..ccd08b6 100644
+--- a/zzip/CMakeLists.txt
++++ b/zzip/CMakeLists.txt
+@@ -28,6 +28,12 @@ option(ZZIP_LIBTOOL "Ensure binary compatibility with libtool" OFF)
+ option(ZZIP_PKGCONFIG "Generate pkg-config files for linking" OFF)
+ endif()
+ 
++if(ZZIP_LIBTOOL OR ZZIP_PKGCONFIG)
++option(ZZIP_LIBLATEST "Ensure libname.lib links to libname-REL.lib" ON)
++else()
++option(ZZIP_LIBLATEST "Ensure libname.lib links to libname-REL.lib" OFF)
++endif()
++
+ # used in zzip/_config.h
+ set(ZZIP_PACKAGE "${PROJECT_NAME}lib")
+ set(ZZIP_VERSION "${PROJECT_VERSION}")
+@@ -346,6 +340,45 @@ if(ZZIP_LIBTOOL)
+   endif(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG)
+ endif(ZZIP_LIBTOOL)
+ 
++if(ZZIP_LIBLATEST)
++  if(BUILD_SHARED_LIBS)
++    set(lib ${CMAKE_SHARED_LIBRARY_PREFIX})
++    set(dll ${CMAKE_SHARED_LIBRARY_SUFFIX})
++  else()
++    set(lib ${CMAKE_STATIC_LIBRARY_PREFIX})
++    set(dll ${CMAKE_STATIC_LIBRARY_SUFFIX})
++  endif()
++    get_target_property(libname libzzip OUTPUT_NAME)
++    get_target_property(librelease libzzip RELEASE_POSTFIX)
++    add_custom_target(libzzip_latest ALL
++        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzip> ${lib}${libname}${dll}
++        )
++    install(FILES
++        ${outdir}/${lib}${libname}${dll}
++        DESTINATION ${CMAKE_INSTALL_LIBDIR})
++    if(ZZIPFSEEKO)
++    get_target_property(libname libzzipfseeko OUTPUT_NAME)
++    get_target_property(librelease libzzipfseeko RELEASE_POSTFIX)
++    add_custom_target(libzzipfseeko_latest ALL
++        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzipfseeko> ${lib}${libname}${dll}
++        )
++    install(FILES
++        ${outdir}/${lib}${libname}${dll}
++        DESTINATION ${CMAKE_INSTALL_LIBDIR})
++    endif(ZZIPFSEEKO)
++    if(ZZIPMMAPPED)
++    get_target_property(libname libzzipmmapped OUTPUT_NAME)
++    get_target_property(librelease libzzipmmapped RELEASE_POSTFIX)
++    add_custom_target(libzzipmmaped_latest ALL
++        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzipmmapped> ${lib}${libname}${dll}
++        )
++    install(FILES
++        ${outdir}/${lib}${libname}${dll}
++        DESTINATION ${CMAKE_INSTALL_LIBDIR})
++    endif(ZZIPMMAPPED)
++endif(ZZIP_LIBLATEST)
++
++
+ ## messages ##############################################
+ 
+ message(STATUS "lib zzipfseeko  to be compiled: ${ZZIPFSEEKO}")
Signature · 6 lines
2.33.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw

PATCH v3 1/1 package/zziplib: fix static build failure with mpd

The current released version of zziplib copies static libraries with appended major version, but omits creating the necessary links to the base file names. This prevents the linker to find the libraries via the search path.

The issue (https://github.com/gdraheim/zziplib/issues/117) has been
fixed upstream; this patch extracts the necessary part of commit 0e8d35f92efb680c81f6ec1fca9f11d173dce389, to enable creation of symlinks.

This resolves the following autobuild issues:

http://autobuild.buildroot.net/results/6c56b645a2b723920f07b98474452824fba5e2c1
http://autobuild.buildroot.net/results/032aaff121fb114f388c67dbca3ad2b02f670e38
http://autobuild.buildroot.net/results/ba711034c0abe980f677e26de41739223e2f66e9

---
Changes v1 -> v2:
- extract link creation from commit 0e8d35f
Changes v2 -> v3:
- update failure list

 ...-implant-ZZIP_LIBLATEST-for-zzip_lib.patch | 78 +++++++++++++++++++
 1 file changed, 78 insertions(+)
 create mode 100644 package/zziplib/0001-implant-ZZIP_LIBLATEST-for-zzip_lib.patch
package/zziplib/0001-implant-ZZIP_LIBLATEST-for-zzip_lib.patch new file +78 -0
new file mode 100644
index 0000000000..50380861bc
@@ -0,0 +1,78 @@
+Extract link creation for versioned libraries from commit
+0e8d35f92efb680c81f6ec1fca9f11d173dce389.
+
+Signed-off-by: Andreas Ziegler <[email protected]>
+
+---
+From 0e8d35f92efb680c81f6ec1fca9f11d173dce389 Mon Sep 17 00:00:00 2001
+From: Guido Draheim <[email protected]>
+Date: Sat, 22 May 2021 15:13:28 +0200
+Subject: [PATCH] #117 implant ZZIP_LIBLATEST for zzip.lib
+
+---
+ zzip/CMakeLists.txt | 57 +++++++++++++++++++++++++++++++++++----------
+ 1 file changed, 45 insertions(+), 12 deletions(-)
+
+diff --git a/zzip/CMakeLists.txt b/zzip/CMakeLists.txt
+index a966d5f..ccd08b6 100644
+--- a/zzip/CMakeLists.txt
++++ b/zzip/CMakeLists.txt
+@@ -28,6 +28,12 @@ option(ZZIP_LIBTOOL "Ensure binary compatibility with libtool" OFF)
+ option(ZZIP_PKGCONFIG "Generate pkg-config files for linking" OFF)
+ endif()
+ 
++if(ZZIP_LIBTOOL OR ZZIP_PKGCONFIG)
++option(ZZIP_LIBLATEST "Ensure libname.lib links to libname-REL.lib" ON)
++else()
++option(ZZIP_LIBLATEST "Ensure libname.lib links to libname-REL.lib" OFF)
++endif()
++
+ # used in zzip/_config.h
+ set(ZZIP_PACKAGE "${PROJECT_NAME}lib")
+ set(ZZIP_VERSION "${PROJECT_VERSION}")
+@@ -346,6 +340,45 @@ if(ZZIP_LIBTOOL)
+   endif(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG)
+ endif(ZZIP_LIBTOOL)
+ 
++if(ZZIP_LIBLATEST)
++  if(BUILD_SHARED_LIBS)
++    set(lib ${CMAKE_SHARED_LIBRARY_PREFIX})
++    set(dll ${CMAKE_SHARED_LIBRARY_SUFFIX})
++  else()
++    set(lib ${CMAKE_STATIC_LIBRARY_PREFIX})
++    set(dll ${CMAKE_STATIC_LIBRARY_SUFFIX})
++  endif()
++    get_target_property(libname libzzip OUTPUT_NAME)
++    get_target_property(librelease libzzip RELEASE_POSTFIX)
++    add_custom_target(libzzip_latest ALL
++        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzip> ${lib}${libname}${dll}
++        )
++    install(FILES
++        ${outdir}/${lib}${libname}${dll}
++        DESTINATION ${CMAKE_INSTALL_LIBDIR})
++    if(ZZIPFSEEKO)
++    get_target_property(libname libzzipfseeko OUTPUT_NAME)
++    get_target_property(librelease libzzipfseeko RELEASE_POSTFIX)
++    add_custom_target(libzzipfseeko_latest ALL
++        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzipfseeko> ${lib}${libname}${dll}
++        )
++    install(FILES
++        ${outdir}/${lib}${libname}${dll}
++        DESTINATION ${CMAKE_INSTALL_LIBDIR})
++    endif(ZZIPFSEEKO)
++    if(ZZIPMMAPPED)
++    get_target_property(libname libzzipmmapped OUTPUT_NAME)
++    get_target_property(librelease libzzipmmapped RELEASE_POSTFIX)
++    add_custom_target(libzzipmmaped_latest ALL
++        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzipmmapped> ${lib}${libname}${dll}
++        )
++    install(FILES
++        ${outdir}/${lib}${libname}${dll}
++        DESTINATION ${CMAKE_INSTALL_LIBDIR})
++    endif(ZZIPMMAPPED)
++endif(ZZIP_LIBLATEST)
++
++
+ ## messages ##############################################
+ 
+ message(STATUS "lib zzipfseeko  to be compiled: ${ZZIPFSEEKO}")
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#4 lore raw
Quoted 30 lines · Andreas Ziegler

The current released version of zziplib copies static libraries with appended major version, but omits creating the necessary links to the base file names. This prevents the linker to find the libraries via the search path.

The issue (https://github.com/gdraheim/zziplib/issues/117) has been
fixed upstream; this patch extracts the necessary part of commit 0e8d35f92efb680c81f6ec1fca9f11d173dce389, to enable creation of symlinks.

This resolves the following autobuild issues:

http://autobuild.buildroot.net/results/6c56b645a2b723920f07b98474452824fba5e2c1
http://autobuild.buildroot.net/results/032aaff121fb114f388c67dbca3ad2b02f670e38
http://autobuild.buildroot.net/results/ba711034c0abe980f677e26de41739223e2f66e9

---
Changes v1 -> v2:
- extract link creation from commit 0e8d35f
Changes v2 -> v3:
- update failure list

  ...-implant-ZZIP_LIBLATEST-for-zzip_lib.patch | 78 +++++++++++++++++++
  1 file changed, 78 insertions(+)

create mode 100644 package/zziplib/0001-implant-ZZIP_LIBLATEST-for-zzip_lib.patch

package/zziplib/0001-implant-ZZIP_LIBLATEST-for-zzip_lib.patch new file +0 -0
new file mode 100644
index 0000000000..50380861bc

package/zziplib/0001-implant-ZZIP_LIBLATEST-for-zzip_lib.patch line 10

Quoted 10 lines
package/zziplib/0001-implant-ZZIP_LIBLATEST-for-zzip_lib.patch new file +10 -0
@@ -0,0 +1,78 @@
+Extract link creation for versioned libraries from commit
+0e8d35f92efb680c81f6ec1fca9f11d173dce389.
+
+Signed-off-by: Andreas Ziegler <[email protected]>
+
+---
+From 0e8d35f92efb680c81f6ec1fca9f11d173dce389 Mon Sep 17 00:00:00 2001
+From: Guido Draheim <[email protected]>
+Date: Sat, 22 May 2021 15:13:28 +0200
+Subject: [PATCH] #117 implant ZZIP_LIBLATEST for zzip.lib

I've moved the part that you added down here, so it stays as a git-formatted
patch.

[Andreas: Extract link creation for versioned libraries from commit 0e8d35f92efb680c81f6ec1fca9f11d173dce389.]

Applied to master, thanks.

Regards,
Arnout

Quoted 58 lines
package/zziplib/0001-implant-ZZIP_LIBLATEST-for-zzip_lib.patch new file +58 -0
+
+---
+ zzip/CMakeLists.txt | 57 +++++++++++++++++++++++++++++++++++----------
+ 1 file changed, 45 insertions(+), 12 deletions(-)
+
+diff --git a/zzip/CMakeLists.txt b/zzip/CMakeLists.txt
+index a966d5f..ccd08b6 100644
+--- a/zzip/CMakeLists.txt
++++ b/zzip/CMakeLists.txt
+@@ -28,6 +28,12 @@ option(ZZIP_LIBTOOL "Ensure binary compatibility with libtool" OFF)
+ option(ZZIP_PKGCONFIG "Generate pkg-config files for linking" OFF)
+ endif()
+
++if(ZZIP_LIBTOOL OR ZZIP_PKGCONFIG)
++option(ZZIP_LIBLATEST "Ensure libname.lib links to libname-REL.lib" ON)
++else()
++option(ZZIP_LIBLATEST "Ensure libname.lib links to libname-REL.lib" OFF)
++endif()
++
+ # used in zzip/_config.h
+ set(ZZIP_PACKAGE "${PROJECT_NAME}lib")
+ set(ZZIP_VERSION "${PROJECT_VERSION}")
+@@ -346,6 +340,45 @@ if(ZZIP_LIBTOOL)
+   endif(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG)
+ endif(ZZIP_LIBTOOL)
+
++if(ZZIP_LIBLATEST)
++  if(BUILD_SHARED_LIBS)
++    set(lib ${CMAKE_SHARED_LIBRARY_PREFIX})
++    set(dll ${CMAKE_SHARED_LIBRARY_SUFFIX})
++  else()
++    set(lib ${CMAKE_STATIC_LIBRARY_PREFIX})
++    set(dll ${CMAKE_STATIC_LIBRARY_SUFFIX})
++  endif()
++    get_target_property(libname libzzip OUTPUT_NAME)
++    get_target_property(librelease libzzip RELEASE_POSTFIX)
++    add_custom_target(libzzip_latest ALL
++        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzip> ${lib}${libname}${dll}
++        )
++    install(FILES
++        ${outdir}/${lib}${libname}${dll}
++        DESTINATION ${CMAKE_INSTALL_LIBDIR})
++    if(ZZIPFSEEKO)
++    get_target_property(libname libzzipfseeko OUTPUT_NAME)
++    get_target_property(librelease libzzipfseeko RELEASE_POSTFIX)
++    add_custom_target(libzzipfseeko_latest ALL
++        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzipfseeko> ${lib}${libname}${dll}
++        )
++    install(FILES
++        ${outdir}/${lib}${libname}${dll}
++        DESTINATION ${CMAKE_INSTALL_LIBDIR})
++    endif(ZZIPFSEEKO)
++    if(ZZIPMMAPPED)
++    get_target_property(libname libzzipmmapped OUTPUT_NAME)
++    get_target_property(librelease libzzipmmapped RELEASE_POSTFIX)
++    add_custom_target(libzzipmmaped_latest ALL
++        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzipmmapped> ${lib}${libname}${dll}
++        )

package/zziplib/0001-implant-ZZIP_LIBLATEST-for-zzip_lib.patch line 78

Quoted 10 lines
package/zziplib/0001-implant-ZZIP_LIBLATEST-for-zzip_lib.patch new file +10 -0
++    install(FILES
++        ${outdir}/${lib}${libname}${dll}
++        DESTINATION ${CMAKE_INSTALL_LIBDIR})
++    endif(ZZIPMMAPPED)
++endif(ZZIP_LIBLATEST)
++
++
+ ## messages ##############################################
+
+ message(STATUS "lib zzipfseeko  to be compiled: ${ZZIPFSEEKO}")

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#5 lore raw
In reply to Andreas Ziegler
Quoted 17 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Andreas" == Andreas Ziegler <[email protected]> writes:

The current released version of zziplib copies static libraries with appended major version, but omits creating the necessary links to the base file names. This prevents the linker to find the libraries via the search path.

The issue (https://github.com/gdraheim/zziplib/issues/117) has been fixed upstream; this patch extracts the necessary part of commit 0e8d35f92efb680c81f6ec1fca9f11d173dce389, to enable creation of symlinks.

This resolves the following autobuild issues:

http://autobuild.buildroot.net/results/6c56b645a2b723920f07b98474452824fba5e2c1
http://autobuild.buildroot.net/results/032aaff121fb114f388c67dbca3ad2b02f670e38
http://autobuild.buildroot.net/results/ba711034c0abe980f677e26de41739223e2f66e9

Quoted 6 lines

---
Changes v1 -> v2:
- extract link creation from commit 0e8d35f
Changes v2 -> v3:
- update failure list

Committed to 2021.02.x and 2022.02.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#6 lore raw
In reply to Andreas Ziegler

Hi Andreas,

Quoted 7 lines · Andreas Ziegler

The current released version of zziplib copies static libraries with appended major version, but omits creating the necessary links to the base file names. This prevents the linker to find the libraries via the search path.

The issue (https://github.com/gdraheim/zziplib/issues/117) has been
fixed upstream; this patch extracts the necessary part of commit 0e8d35f92efb680c81f6ec1fca9f11d173dce389, to enable creation of symlinks.

Quoted 7 lines

This resolves the following autobuild issues:

http://autobuild.buildroot.net/results/6c56b645a2b723920f07b98474452824fba5e2c1
http://autobuild.buildroot.net/results/032aaff121fb114f388c67dbca3ad2b02f670e38
http://autobuild.buildroot.net/results/ba711034c0abe980f677e26de41739223e2f66e9

Since this patch was merged, we have failures [1] like:

[ 37%] Building C object zzipwrap/CMakeFiles/zzipwrap.dir/zzipwrap.c.o make[3]: stat: zzip/libzzip.a: Too many levels of symbolic links
make[3]: *** No rule to make target 'zzip/libzzip.a', needed by 'zzipwrap/zzipwrap'. Stop.

Since this is about symlinks, it might be related to this patch. Could you
have a look?

Regards,
Arnout

[1] http://autobuild.buildroot.net/results/743/7433a2ad111e2f014c81f196d3d1e2f63dffa858/

Quoted 84 lines

---
Changes v1 -> v2:
- extract link creation from commit 0e8d35f
Changes v2 -> v3:
- update failure list

  ...-implant-ZZIP_LIBLATEST-for-zzip_lib.patch | 78 +++++++++++++++++++
  1 file changed, 78 insertions(+)

create mode 100644 package/zziplib/0001-implant-ZZIP_LIBLATEST-for-zzip_lib.patch

package/zziplib/0001-implant-ZZIP_LIBLATEST-for-zzip_lib.patch new file +68 -0
new file mode 100644
index 0000000000..50380861bc
@@ -0,0 +1,78 @@
+Extract link creation for versioned libraries from commit
+0e8d35f92efb680c81f6ec1fca9f11d173dce389.
+
+Signed-off-by: Andreas Ziegler <[email protected]>
+
+---
+From 0e8d35f92efb680c81f6ec1fca9f11d173dce389 Mon Sep 17 00:00:00 2001
+From: Guido Draheim <[email protected]>
+Date: Sat, 22 May 2021 15:13:28 +0200
+Subject: [PATCH] #117 implant ZZIP_LIBLATEST for zzip.lib
+
+---
+ zzip/CMakeLists.txt | 57 +++++++++++++++++++++++++++++++++++----------
+ 1 file changed, 45 insertions(+), 12 deletions(-)
+
+diff --git a/zzip/CMakeLists.txt b/zzip/CMakeLists.txt
+index a966d5f..ccd08b6 100644
+--- a/zzip/CMakeLists.txt
++++ b/zzip/CMakeLists.txt
+@@ -28,6 +28,12 @@ option(ZZIP_LIBTOOL "Ensure binary compatibility with libtool" OFF)
+ option(ZZIP_PKGCONFIG "Generate pkg-config files for linking" OFF)
+ endif()
+
++if(ZZIP_LIBTOOL OR ZZIP_PKGCONFIG)
++option(ZZIP_LIBLATEST "Ensure libname.lib links to libname-REL.lib" ON)
++else()
++option(ZZIP_LIBLATEST "Ensure libname.lib links to libname-REL.lib" OFF)
++endif()
++
+ # used in zzip/_config.h
+ set(ZZIP_PACKAGE "${PROJECT_NAME}lib")
+ set(ZZIP_VERSION "${PROJECT_VERSION}")
+@@ -346,6 +340,45 @@ if(ZZIP_LIBTOOL)
+   endif(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG)
+ endif(ZZIP_LIBTOOL)
+
++if(ZZIP_LIBLATEST)
++  if(BUILD_SHARED_LIBS)
++    set(lib ${CMAKE_SHARED_LIBRARY_PREFIX})
++    set(dll ${CMAKE_SHARED_LIBRARY_SUFFIX})
++  else()
++    set(lib ${CMAKE_STATIC_LIBRARY_PREFIX})
++    set(dll ${CMAKE_STATIC_LIBRARY_SUFFIX})
++  endif()
++    get_target_property(libname libzzip OUTPUT_NAME)
++    get_target_property(librelease libzzip RELEASE_POSTFIX)
++    add_custom_target(libzzip_latest ALL
++        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzip> ${lib}${libname}${dll}
++        )
++    install(FILES
++        ${outdir}/${lib}${libname}${dll}
++        DESTINATION ${CMAKE_INSTALL_LIBDIR})
++    if(ZZIPFSEEKO)
++    get_target_property(libname libzzipfseeko OUTPUT_NAME)
++    get_target_property(librelease libzzipfseeko RELEASE_POSTFIX)
++    add_custom_target(libzzipfseeko_latest ALL
++        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzipfseeko> ${lib}${libname}${dll}
++        )
++    install(FILES
++        ${outdir}/${lib}${libname}${dll}
++        DESTINATION ${CMAKE_INSTALL_LIBDIR})
++    endif(ZZIPFSEEKO)
++    if(ZZIPMMAPPED)
++    get_target_property(libname libzzipmmapped OUTPUT_NAME)
++    get_target_property(librelease libzzipmmapped RELEASE_POSTFIX)
++    add_custom_target(libzzipmmaped_latest ALL
++        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzipmmapped> ${lib}${libname}${dll}
++        )

package/zziplib/0001-implant-ZZIP_LIBLATEST-for-zzip_lib.patch line 78

Quoted 10 lines
package/zziplib/0001-implant-ZZIP_LIBLATEST-for-zzip_lib.patch new file +10 -0
++    install(FILES
++        ${outdir}/${lib}${libname}${dll}
++        DESTINATION ${CMAKE_INSTALL_LIBDIR})
++    endif(ZZIPMMAPPED)
++endif(ZZIP_LIBLATEST)
++
++
+ ## messages ##############################################
+
+ message(STATUS "lib zzipfseeko  to be compiled: ${ZZIPFSEEKO}")

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#7 lore raw

Hi Arnout,

Quoted 20 lines · Arnout Vandecappelle

Hi Andreas,

Quoted 7 lines · Andreas Ziegler

The current released version of zziplib copies static libraries with appended major version, but omits creating the necessary links to the base file names. This prevents the linker to find the libraries via the search path.

The issue (https://github.com/gdraheim/zziplib/issues/117) has been
fixed upstream; this patch extracts the necessary part of commit 0e8d35f92efb680c81f6ec1fca9f11d173dce389, to enable creation of symlinks.

Quoted 7 lines

This resolves the following autobuild issues:

http://autobuild.buildroot.net/results/6c56b645a2b723920f07b98474452824fba5e2c1
http://autobuild.buildroot.net/results/032aaff121fb114f388c67dbca3ad2b02f670e38
http://autobuild.buildroot.net/results/ba711034c0abe980f677e26de41739223e2f66e9

Since this patch was merged, we have failures [1] like:

Quoted 8 lines

[ 37%] Building C object zzipwrap/CMakeFiles/zzipwrap.dir/zzipwrap.c.o make[3]: stat: zzip/libzzip.a: Too many levels of symbolic links make[3]: *** No rule to make target 'zzip/libzzip.a', needed by 'zzipwrap/zzipwrap'. Stop.

Since this is about symlinks, it might be related to this patch.
Could you have a look?

This build [1] creates recursive links for two libraries:

$ ls -l zzip/*.a
-rw-r--r-- 1 iago iago 173008 Jul 26 07:26 zzip/libzzip.a
lrwxrwxrwx 1 iago iago     15 Jul 26 07:26 zzip/libzzipfseeko.a -> libzzipfseeko.a
lrwxrwxrwx 1 iago iago     16 Jul 26 07:26 zzip/libzzipmmapped.a -> libzzipmmapped.a

Removing the patch lets the build complete successfully.

I will have a look.

Kind regards,
Andreas

Quoted 103 lines

Regards,
Arnout

[1] http://autobuild.buildroot.net/results/743/7433a2ad111e2f014c81f196d3d1e2f63dffa858/

Quoted 96 lines

---
Changes v1 -> v2:
- extract link creation from commit 0e8d35f
Changes v2 -> v3:
- update failure list

  ...-implant-ZZIP_LIBLATEST-for-zzip_lib.patch | 78 
+++++++++++++++++++
  1 file changed, 78 insertions(+)

create mode 100644
package/zziplib/0001-implant-ZZIP_LIBLATEST-for-zzip_lib.patch

package/zziplib/0001-implant-ZZIP_LIBLATEST-for-zzip_lib.patch new file +7 -0
new file mode 100644
index 0000000000..50380861bc
@@ -0,0 +1,78 @@
+Extract link creation for versioned libraries from commit
+0e8d35f92efb680c81f6ec1fca9f11d173dce389.
+
+Signed-off-by: Andreas Ziegler <[email protected]>
+
+---
+From 0e8d35f92efb680c81f6ec1fca9f11d173dce389 Mon Sep 17 00:00:00 

2001

package/zziplib/0001-implant-ZZIP_LIBLATEST-for-zzip_lib.patch new file +14 -0
+From: Guido Draheim <[email protected]>
+Date: Sat, 22 May 2021 15:13:28 +0200
+Subject: [PATCH] #117 implant ZZIP_LIBLATEST for zzip.lib
+
+---
+ zzip/CMakeLists.txt | 57 
+++++++++++++++++++++++++++++++++++----------
+ 1 file changed, 45 insertions(+), 12 deletions(-)
+
+diff --git a/zzip/CMakeLists.txt b/zzip/CMakeLists.txt
+index a966d5f..ccd08b6 100644
+--- a/zzip/CMakeLists.txt
++++ b/zzip/CMakeLists.txt
+@@ -28,6 +28,12 @@ option(ZZIP_LIBTOOL "Ensure binary compatibility 

with libtool" OFF)
+ option(ZZIP_PKGCONFIG "Generate pkg-config files for linking" OFF)
+ endif()
+
++if(ZZIP_LIBTOOL OR ZZIP_PKGCONFIG) ++option(ZZIP_LIBLATEST "Ensure libname.lib links to libname-REL.lib" ON)
++else()
++option(ZZIP_LIBLATEST "Ensure libname.lib links to libname-REL.lib" OFF)
++endif()
++
+ # used in zzip/_config.h
+ set(ZZIP_PACKAGE "${PROJECT_NAME}lib")
+ set(ZZIP_VERSION "${PROJECT_VERSION}")
+@@ -346,6 +340,45 @@ if(ZZIP_LIBTOOL)

package/zziplib/0001-implant-ZZIP_LIBLATEST-for-zzip_lib.patch new file +15 -0
+   endif(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG)
+ endif(ZZIP_LIBTOOL)
+
++if(ZZIP_LIBLATEST)
++  if(BUILD_SHARED_LIBS)
++    set(lib ${CMAKE_SHARED_LIBRARY_PREFIX})
++    set(dll ${CMAKE_SHARED_LIBRARY_SUFFIX})
++  else()
++    set(lib ${CMAKE_STATIC_LIBRARY_PREFIX})
++    set(dll ${CMAKE_STATIC_LIBRARY_SUFFIX})
++  endif()
++    get_target_property(libname libzzip OUTPUT_NAME)
++    get_target_property(librelease libzzip RELEASE_POSTFIX)
++    add_custom_target(libzzip_latest ALL
++        COMMAND ${CMAKE_COMMAND} -E create_symlink 

$<TARGET_FILE_NAME:libzzip> ${lib}${libname}${dll}
++ )
++ install(FILES
++ ${outdir}/${lib}${libname}${dll}
++ DESTINATION ${CMAKE_INSTALL_LIBDIR})

++    if(ZZIPFSEEKO)
++    get_target_property(libname libzzipfseeko OUTPUT_NAME)
++    get_target_property(librelease libzzipfseeko RELEASE_POSTFIX)
++    add_custom_target(libzzipfseeko_latest ALL

++ COMMAND ${CMAKE_COMMAND} -E create_symlink
$<TARGET_FILE_NAME:libzzipfseeko> ${lib}${libname}${dll}
++ )
++ install(FILES
++ ${outdir}/${lib}${libname}${dll}
++ DESTINATION ${CMAKE_INSTALL_LIBDIR})

++    endif(ZZIPFSEEKO)
++    if(ZZIPMMAPPED)
++    get_target_property(libname libzzipmmapped OUTPUT_NAME)
++    get_target_property(librelease libzzipmmapped RELEASE_POSTFIX)
++    add_custom_target(libzzipmmaped_latest ALL

++ COMMAND ${CMAKE_COMMAND} -E create_symlink
$<TARGET_FILE_NAME:libzzipmmapped> ${lib}${libname}${dll}
++ )
++ install(FILES
++ ${outdir}/${lib}${libname}${dll}

Quoted 8 lines
Quoted 8 lines

++ DESTINATION ${CMAKE_INSTALL_LIBDIR})
++ endif(ZZIPMMAPPED)
++endif(ZZIP_LIBLATEST)
++
++
+ ## messages ############################################## +
+ message(STATUS "lib zzipfseeko to be compiled: ${ZZIPFSEEKO}")

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#8 lore raw
In reply to Arnout Vandecappelle

[added Fabrice, he is aware of this issue]

Hi Arnout, all

Analysis /result inline, I now need to test this fix with the known defects [2][3][4]

An additional column "debug?" in the autobuild results might be useful.

Kind regards,
Andreas

[2] http://autobuild.buildroot.net/?reason=mpd-0.23.3
[3] http://autobuild.buildroot.net/?reason=mpd-0.23.5
[4] http://autobuild.buildroot.net/?reason=zziplib-0.13.72

Quoted 25 lines · Arnout Vandecappelle

Hi Andreas,

Quoted 7 lines · Andreas Ziegler

The current released version of zziplib copies static libraries with appended major version, but omits creating the necessary links to the base file names. This prevents the linker to find the libraries via the search path.

The issue (https://github.com/gdraheim/zziplib/issues/117) has been
fixed upstream; this patch extracts the necessary part of commit 0e8d35f92efb680c81f6ec1fca9f11d173dce389, to enable creation of symlinks.

Quoted 7 lines

This resolves the following autobuild issues:

http://autobuild.buildroot.net/results/6c56b645a2b723920f07b98474452824fba5e2c1
http://autobuild.buildroot.net/results/032aaff121fb114f388c67dbca3ad2b02f670e38
http://autobuild.buildroot.net/results/ba711034c0abe980f677e26de41739223e2f66e9

Since this patch was merged, we have failures [1] like:

[ 37%] Building C object zzipwrap/CMakeFiles/zzipwrap.dir/zzipwrap.c.o make[3]: stat: zzip/libzzip.a: Too many levels of symbolic links make[3]: *** No rule to make target 'zzip/libzzip.a', needed by 'zzipwrap/zzipwrap'. Stop.

Quoted 5 lines

Since this is about symlinks, it might be related to this patch.
Could you have a look?

Regards,
Arnout

ANALYSIS

zziplib normally uses a version number (major version only) when building libraries; zziplib version 0.13.72 omits creating the usual links from versioned file names to the base name, which created autobuild errors for downstream components in the past.

Porting part of the CMake code present in the latest version of the zziplib repository solved this problem, but creates another one whenever versioning is not employed, since zzip/CMakeLists.txt does not handle this case properly: existing libraries are overwritten with a recursive link.

The mechanism used in zzip/CMakeLists.txt is identical for all libraries and implemented like this:

if(ZZIP_LIBLATEST)

	...

	get_target_property(libname libzzip OUTPUT_NAME)
	get_target_property(librelease libzzip RELEASE_POSTFIX)
	add_custom_target(libzzip_latest ALL
		COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzip> 
${lib}${libname}${dll}
		)
	install(FILES
		${outdir}/${lib}${libname}${dll}
		DESTINATION ${CMAKE_INSTALL_LIBDIR})

	...

endif(ZZIP_LIBLATEST)

The librelease variable is never used. $<TARGET_FILE_NAME:libzzip*> contains either a versioned or an unversioned file name (depending on RELEASE_POSTFIX being used by CMake). The link creation is handled by an unconditional cmake target that is executed regardless of the target file presence. Since both arguments to the create_symlink command may be identical, this can result in a recursive symlink overwriting the original file.

ROOT CAUSE:

CMAKE_BUILD_TYPE was set to Debug:

Quoted 1 line
Quoted 1 line
Quoted 1 line

zziplib 0.13.72 Installing to staging directory

PATH="/home/data/test/autobuild/host/bin:/home/data/test/autobuild/host/sbin:/home/iago/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
/usr/bin/make -j5
DESTDIR=/home/data/test/autobuild/host/microblaze-buildroot-linux-uclibc/sysroot install/fast -C /home/data/test/autobuild/build/zziplib-0.13.72/
Install the project...
-- Install configuration: "Debug"

zziplib settings are only complete for release builds, therefore, for example the version info is missing from the library files.

Quoted 76 lines

[1] http://autobuild.buildroot.net/results/743/7433a2ad111e2f014c81f196d3d1e2f63dffa858/

Quoted 71 lines

---
Changes v1 -> v2:
- extract link creation from commit 0e8d35f
Changes v2 -> v3:
- update failure list

  ...-implant-ZZIP_LIBLATEST-for-zzip_lib.patch | 78 
+++++++++++++++++++
  1 file changed, 78 insertions(+)

create mode 100644
package/zziplib/0001-implant-ZZIP_LIBLATEST-for-zzip_lib.patch

package/zziplib/0001-implant-ZZIP_LIBLATEST-for-zzip_lib.patch new file +7 -0
new file mode 100644
index 0000000000..50380861bc
@@ -0,0 +1,78 @@
+Extract link creation for versioned libraries from commit
+0e8d35f92efb680c81f6ec1fca9f11d173dce389.
+
+Signed-off-by: Andreas Ziegler <[email protected]>
+
+---
+From 0e8d35f92efb680c81f6ec1fca9f11d173dce389 Mon Sep 17 00:00:00 

2001

package/zziplib/0001-implant-ZZIP_LIBLATEST-for-zzip_lib.patch new file +14 -0
+From: Guido Draheim <[email protected]>
+Date: Sat, 22 May 2021 15:13:28 +0200
+Subject: [PATCH] #117 implant ZZIP_LIBLATEST for zzip.lib
+
+---
+ zzip/CMakeLists.txt | 57 
+++++++++++++++++++++++++++++++++++----------
+ 1 file changed, 45 insertions(+), 12 deletions(-)
+
+diff --git a/zzip/CMakeLists.txt b/zzip/CMakeLists.txt
+index a966d5f..ccd08b6 100644
+--- a/zzip/CMakeLists.txt
++++ b/zzip/CMakeLists.txt
+@@ -28,6 +28,12 @@ option(ZZIP_LIBTOOL "Ensure binary compatibility 

with libtool" OFF)
+ option(ZZIP_PKGCONFIG "Generate pkg-config files for linking" OFF)
+ endif()
+
++if(ZZIP_LIBTOOL OR ZZIP_PKGCONFIG) ++option(ZZIP_LIBLATEST "Ensure libname.lib links to libname-REL.lib" ON)
++else()
++option(ZZIP_LIBLATEST "Ensure libname.lib links to libname-REL.lib" OFF)
++endif()
++
+ # used in zzip/_config.h
+ set(ZZIP_PACKAGE "${PROJECT_NAME}lib")
+ set(ZZIP_VERSION "${PROJECT_VERSION}")
+@@ -346,6 +340,45 @@ if(ZZIP_LIBTOOL)

package/zziplib/0001-implant-ZZIP_LIBLATEST-for-zzip_lib.patch new file +15 -0
+   endif(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG)
+ endif(ZZIP_LIBTOOL)
+
++if(ZZIP_LIBLATEST)
++  if(BUILD_SHARED_LIBS)
++    set(lib ${CMAKE_SHARED_LIBRARY_PREFIX})
++    set(dll ${CMAKE_SHARED_LIBRARY_SUFFIX})
++  else()
++    set(lib ${CMAKE_STATIC_LIBRARY_PREFIX})
++    set(dll ${CMAKE_STATIC_LIBRARY_SUFFIX})
++  endif()
++    get_target_property(libname libzzip OUTPUT_NAME)
++    get_target_property(librelease libzzip RELEASE_POSTFIX)
++    add_custom_target(libzzip_latest ALL
++        COMMAND ${CMAKE_COMMAND} -E create_symlink 
Quoted 8 lines
Quoted 8 lines

$<TARGET_FILE_NAME:libzzip> ${lib}${libname}${dll}
++ )
++ install(FILES
++ ${outdir}/${lib}${libname}${dll}
++ DESTINATION ${CMAKE_INSTALL_LIBDIR})

++    if(ZZIPFSEEKO)
++    get_target_property(libname libzzipfseeko OUTPUT_NAME)
++    get_target_property(librelease libzzipfseeko RELEASE_POSTFIX)

Using a conditional CMake target ensures that existing files will not be overwritten:

	set(libzzip_target "${outdir}/${lib}${libname}${dll}")
	add_custom_target(libzzip_latest ${libzzip_target}
Quoted 17 lines
Quoted 17 lines

++ add_custom_target(libzzipfseeko_latest ALL
++ COMMAND ${CMAKE_COMMAND} -E create_symlink
$<TARGET_FILE_NAME:libzzipfseeko> ${lib}${libname}${dll}
++ )
++ install(FILES
++ ${outdir}/${lib}${libname}${dll}
++ DESTINATION ${CMAKE_INSTALL_LIBDIR})

++    endif(ZZIPFSEEKO)
++    if(ZZIPMMAPPED)
++    get_target_property(libname libzzipmmapped OUTPUT_NAME)
++    get_target_property(librelease libzzipmmapped RELEASE_POSTFIX)
++    add_custom_target(libzzipmmaped_latest ALL

++ COMMAND ${CMAKE_COMMAND} -E create_symlink
$<TARGET_FILE_NAME:libzzipmmapped> ${lib}${libname}${dll}
++ )
++ install(FILES
++ ${outdir}/${lib}${libname}${dll}

Quoted 8 lines
Quoted 8 lines

++ DESTINATION ${CMAKE_INSTALL_LIBDIR})
++ endif(ZZIPMMAPPED)
++endif(ZZIP_LIBLATEST)
++
++
+ ## messages ############################################## +
+ message(STATUS "lib zzipfseeko to be compiled: ${ZZIPFSEEKO}")

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#9 lore raw

PATCH 1/1 package/zziplib: create symlinks only if target is missing

In reply to Arnout Vandecappelle

Symlink creation should only happen for versioned libraries. Modify CMake rules to prevent overwriting existing libraties with recursive links.

Fixes the following autobuild failures:
http://autobuild.buildroot.net/results/dd1/dd1974dbc1a22a96a3cedb117417e66119821514/
http://autobuild.buildroot.net/results/df8/df8406402ccff7cec34ae5858b8da57d1a4ae9c1/
http://autobuild.buildroot.net/results/743/7433a2ad111e2f014c81f196d3d1e2f63dffa858/
http://autobuild.buildroot.net/results/79f/79f88e9ec14cda7d07cf689eee864791ba949892/
...
http://autobuild.buildroot.net/results/892/8922efbbbfe79e8286a411acce4086b5c77c57c0/
http://autobuild.buildroot.net/results/dfa/dfa8ade3a4c1750e6dd58e652f60af2a44f80dd8/
http://autobuild.buildroot.net/results/9cd/9cd4147486f32d642513ba14efca3a02d5745ab9/

Regression test cases:
http://autobuild.buildroot.net/results/ba7/ba711034c0abe980f677e26de41739223e2f66e9/
http://autobuild.buildroot.net/results/032/032aaff121fb114f388c67dbca3ad2b02f670e38/
http://autobuild.buildroot.net/results/6c5/6c56b645a2b723920f07b98474452824fba5e2c1/

---
 ...reate-symlinks-only-if-target-is-mis.patch | 59 +++++++++++++++++++
 1 file changed, 59 insertions(+)
 create mode 100644 package/zziplib/0002-ZZIP_LIBLATEST-create-symlinks-only-if-target-is-mis.patch
package/zziplib/0002-ZZIP_LIBLATEST-create-symlinks-only-if-target-is-mis.patch new file +59 -0
new file mode 100644
index 0000000000..25f9808b8c
@@ -0,0 +1,59 @@
+From 2b94e8dcc58696f23be07888913eddaa035273d8 Mon Sep 17 00:00:00 2001
+From: Andreas Ziegler <[email protected]>
+Date: Fri, 29 Jul 2022 10:29:29 +0200
+Subject: [PATCH] ZZIP_LIBLATEST: create symlinks only if target is missing
+
+Signed-off-by: Andreas Ziegler <[email protected]>
+---
+ zzip/CMakeLists.txt | 18 +++++++++++++++---
+ 1 file changed, 15 insertions(+), 3 deletions(-)
+
+diff --git a/zzip/CMakeLists.txt b/zzip/CMakeLists.txt
+index 4fa6b9c..fe20dd6 100644
+--- a/zzip/CMakeLists.txt
++++ b/zzip/CMakeLists.txt
+@@ -350,8 +350,12 @@ if(ZZIP_LIBLATEST)
+   endif()
+     get_target_property(libname libzzip OUTPUT_NAME)
+     get_target_property(librelease libzzip RELEASE_POSTFIX)
++    set(libzzip_target "${lib}${libname}${dll}")
++    add_custom_command(OUTPUT ${libzzip_target} 
++        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzip> ${libzzip_target}
++        )
+     add_custom_target(libzzip_latest ALL
+-        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzip> ${lib}${libname}${dll}
++        DEPENDS ${libzzip_target}
+         )
+     install(FILES
+         ${outdir}/${lib}${libname}${dll}
+@@ -359,8 +363,12 @@ if(ZZIP_LIBLATEST)
+     if(ZZIPFSEEKO)
+     get_target_property(libname libzzipfseeko OUTPUT_NAME)
+     get_target_property(librelease libzzipfseeko RELEASE_POSTFIX)
++    set(libzzipfseeko_target "${lib}${libname}${dll}")
++    add_custom_command(OUTPUT ${libzzipfseeko_target} 
++        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzip> ${libzzipfseeko_target}
++        )
+     add_custom_target(libzzipfseeko_latest ALL
+-        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzipfseeko> ${lib}${libname}${dll}
++        DEPENDS ${libzzipfseeko_target}
+         )
+     install(FILES
+         ${outdir}/${lib}${libname}${dll}
+@@ -369,8 +377,12 @@ if(ZZIP_LIBLATEST)
+     if(ZZIPMMAPPED)
+     get_target_property(libname libzzipmmapped OUTPUT_NAME)
+     get_target_property(librelease libzzipmmapped RELEASE_POSTFIX)
++    set(libzzipmmaped_target "${lib}${libname}${dll}")
++    add_custom_command(OUTPUT ${libzzipmmaped_target} 
++        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzip> ${libzzipmmaped_target}
++        )
+     add_custom_target(libzzipmmaped_latest ALL
+-        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzipmmapped> ${lib}${libname}${dll}
++        DEPENDS ${libzzipmmaped_target}
+         )
+     install(FILES
+         ${outdir}/${lib}${libname}${dll}
+-- 
+2.34.1
+
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#10 lore raw

Re: [Buildroot] [PATCH 1/1] package/zziplib: create symlinks only if target is missing

Sorry, there is a typo in the CMake code, I have to redo this. Change is marked as "Changes requested"

Kind regards,
Andreas

Quoted 101 lines · Andreas Ziegler

Symlink creation should only happen for versioned libraries. Modify CMake rules to prevent overwriting existing libraties with recursive links.

Fixes the following autobuild failures:
http://autobuild.buildroot.net/results/dd1/dd1974dbc1a22a96a3cedb117417e66119821514/
http://autobuild.buildroot.net/results/df8/df8406402ccff7cec34ae5858b8da57d1a4ae9c1/
http://autobuild.buildroot.net/results/743/7433a2ad111e2f014c81f196d3d1e2f63dffa858/
http://autobuild.buildroot.net/results/79f/79f88e9ec14cda7d07cf689eee864791ba949892/
...
http://autobuild.buildroot.net/results/892/8922efbbbfe79e8286a411acce4086b5c77c57c0/
http://autobuild.buildroot.net/results/dfa/dfa8ade3a4c1750e6dd58e652f60af2a44f80dd8/
http://autobuild.buildroot.net/results/9cd/9cd4147486f32d642513ba14efca3a02d5745ab9/

Regression test cases:
http://autobuild.buildroot.net/results/ba7/ba711034c0abe980f677e26de41739223e2f66e9/
http://autobuild.buildroot.net/results/032/032aaff121fb114f388c67dbca3ad2b02f670e38/
http://autobuild.buildroot.net/results/6c5/6c56b645a2b723920f07b98474452824fba5e2c1/

---
 ...reate-symlinks-only-if-target-is-mis.patch | 59 +++++++++++++++++++
 1 file changed, 59 insertions(+)
 create mode 100644

package/zziplib/0002-ZZIP_LIBLATEST-create-symlinks-only-if-target-is-mis.patch

diff --git a/package/zziplib/0002-ZZIP_LIBLATEST-create-symlinks-only-if-target-is-mis.patch b/package/zziplib/0002-ZZIP_LIBLATEST-create-symlinks-only-if-target-is-mis.patch new file mode 100644
index 0000000000..25f9808b8c
--- /dev/null
+++
b/package/zziplib/0002-ZZIP_LIBLATEST-create-symlinks-only-if-target-is-mis.patch

package/zziplib/0002-ZZIP_LIBLATEST-create-symlinks-only-if-target-is-mis.patch new file +4 -0
@@ -0,0 +1,59 @@
+From 2b94e8dcc58696f23be07888913eddaa035273d8 Mon Sep 17 00:00:00 2001
+From: Andreas Ziegler <[email protected]>
+Date: Fri, 29 Jul 2022 10:29:29 +0200
+Subject: [PATCH] ZZIP_LIBLATEST: create symlinks only if target is 

missing

package/zziplib/0002-ZZIP_LIBLATEST-create-symlinks-only-if-target-is-mis.patch new file +17 -0
+
+Signed-off-by: Andreas Ziegler <[email protected]>
+---
+ zzip/CMakeLists.txt | 18 +++++++++++++++---
+ 1 file changed, 15 insertions(+), 3 deletions(-)
+
+diff --git a/zzip/CMakeLists.txt b/zzip/CMakeLists.txt
+index 4fa6b9c..fe20dd6 100644
+--- a/zzip/CMakeLists.txt
++++ b/zzip/CMakeLists.txt
+@@ -350,8 +350,12 @@ if(ZZIP_LIBLATEST)
+   endif()
+     get_target_property(libname libzzip OUTPUT_NAME)
+     get_target_property(librelease libzzip RELEASE_POSTFIX)
++    set(libzzip_target "${lib}${libname}${dll}")
++    add_custom_command(OUTPUT ${libzzip_target}
++        COMMAND ${CMAKE_COMMAND} -E create_symlink

$<TARGET_FILE_NAME:libzzip> ${libzzip_target}
++ )
+ add_custom_target(libzzip_latest ALL
+- COMMAND ${CMAKE_COMMAND} -E create_symlink
$<TARGET_FILE_NAME:libzzip> ${lib}${libname}${dll}
++ DEPENDS ${libzzip_target}

package/zziplib/0002-ZZIP_LIBLATEST-create-symlinks-only-if-target-is-mis.patch new file +10 -0
+         )
+     install(FILES
+         ${outdir}/${lib}${libname}${dll}
+@@ -359,8 +363,12 @@ if(ZZIP_LIBLATEST)
+     if(ZZIPFSEEKO)
+     get_target_property(libname libzzipfseeko OUTPUT_NAME)
+     get_target_property(librelease libzzipfseeko RELEASE_POSTFIX)
++    set(libzzipfseeko_target "${lib}${libname}${dll}")
++    add_custom_command(OUTPUT ${libzzipfseeko_target}
++        COMMAND ${CMAKE_COMMAND} -E create_symlink

$<TARGET_FILE_NAME:libzzip> ${libzzipfseeko_target}
++ )
+ add_custom_target(libzzipfseeko_latest ALL
+- COMMAND ${CMAKE_COMMAND} -E create_symlink
$<TARGET_FILE_NAME:libzzipfseeko> ${lib}${libname}${dll}
++ DEPENDS ${libzzipfseeko_target}

package/zziplib/0002-ZZIP_LIBLATEST-create-symlinks-only-if-target-is-mis.patch new file +10 -0
+         )
+     install(FILES
+         ${outdir}/${lib}${libname}${dll}
+@@ -369,8 +377,12 @@ if(ZZIP_LIBLATEST)
+     if(ZZIPMMAPPED)
+     get_target_property(libname libzzipmmapped OUTPUT_NAME)
+     get_target_property(librelease libzzipmmapped RELEASE_POSTFIX)
++    set(libzzipmmaped_target "${lib}${libname}${dll}")
++    add_custom_command(OUTPUT ${libzzipmmaped_target}
++        COMMAND ${CMAKE_COMMAND} -E create_symlink

$<TARGET_FILE_NAME:libzzip> ${libzzipmmaped_target}
++ )
+ add_custom_target(libzzipmmaped_latest ALL
+- COMMAND ${CMAKE_COMMAND} -E create_symlink
$<TARGET_FILE_NAME:libzzipmmapped> ${lib}${libname}${dll}
++ DEPENDS ${libzzipmmaped_target}

package/zziplib/0002-ZZIP_LIBLATEST-create-symlinks-only-if-target-is-mis.patch new file +6 -1
+         )
+     install(FILES
+         ${outdir}/${lib}${libname}${dll}
+--
+2.34.1
+
--
Quoted 1 line

2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#11 lore raw

PATCH v2 1/1 package/zziplib: create symlinks only if target is missing

In reply to Andreas Ziegler

Symlink creation to base file names is only needed for versioned libraries. Modify CMake rules to prevent overwriting existing libraties with recursive links.

Fixes the following autobuild failures:
http://autobuild.buildroot.net/results/dd1/dd1974dbc1a22a96a3cedb117417e66119821514/
http://autobuild.buildroot.net/results/df8/df8406402ccff7cec34ae5858b8da57d1a4ae9c1/
http://autobuild.buildroot.net/results/743/7433a2ad111e2f014c81f196d3d1e2f63dffa858/
http://autobuild.buildroot.net/results/79f/79f88e9ec14cda7d07cf689eee864791ba949892/
...
http://autobuild.buildroot.net/results/892/8922efbbbfe79e8286a411acce4086b5c77c57c0/
http://autobuild.buildroot.net/results/dfa/dfa8ade3a4c1750e6dd58e652f60af2a44f80dd8/
http://autobuild.buildroot.net/results/9cd/9cd4147486f32d642513ba14efca3a02d5745ab9/

Regression test cases:
http://autobuild.buildroot.net/results/ba7/ba711034c0abe980f677e26de41739223e2f66e9/
http://autobuild.buildroot.net/results/032/032aaff121fb114f388c67dbca3ad2b02f670e38/
http://autobuild.buildroot.net/results/6c5/6c56b645a2b723920f07b98474452824fba5e2c1/

---
Changes v1 -> v2:
- correct file name in generator expressions

 ...reate-symlinks-only-if-target-is-mis.patch | 59 +++++++++++++++++++
 1 file changed, 59 insertions(+)
 create mode 100644 package/zziplib/0002-ZZIP_LIBLATEST-create-symlinks-only-if-target-is-mis.patch
package/zziplib/0002-ZZIP_LIBLATEST-create-symlinks-only-if-target-is-mis.patch new file +59 -0
new file mode 100644
index 0000000000..1fe4824a83
@@ -0,0 +1,59 @@
+From 5977725ecea038f32a86938703ca1ed2b080b31c Mon Sep 17 00:00:00 2001
+From: Andreas Ziegler <[email protected]>
+Date: Fri, 29 Jul 2022 12:32:27 +0200
+Subject: [PATCH] ZZIP_LIBLATEST: create symlinks only if target is missing
+
+Signed-off-by: Andreas Ziegler <[email protected]>
+---
+ zzip/CMakeLists.txt | 18 +++++++++++++++---
+ 1 file changed, 15 insertions(+), 3 deletions(-)
+
+diff --git a/zzip/CMakeLists.txt b/zzip/CMakeLists.txt
+index 4fa6b9c..dd1e56a 100644
+--- a/zzip/CMakeLists.txt
++++ b/zzip/CMakeLists.txt
+@@ -350,8 +350,12 @@ if(ZZIP_LIBLATEST)
+   endif()
+     get_target_property(libname libzzip OUTPUT_NAME)
+     get_target_property(librelease libzzip RELEASE_POSTFIX)
++    set(libzzip_target "${lib}${libname}${dll}")
++    add_custom_command(OUTPUT ${libzzip_target} 
++        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzip> ${libzzip_target}
++        )
+     add_custom_target(libzzip_latest ALL
+-        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzip> ${lib}${libname}${dll}
++        DEPENDS ${libzzip_target}
+         )
+     install(FILES
+         ${outdir}/${lib}${libname}${dll}
+@@ -359,8 +363,12 @@ if(ZZIP_LIBLATEST)
+     if(ZZIPFSEEKO)
+     get_target_property(libname libzzipfseeko OUTPUT_NAME)
+     get_target_property(librelease libzzipfseeko RELEASE_POSTFIX)
++    set(libzzipfseeko_target "${lib}${libname}${dll}")
++    add_custom_command(OUTPUT ${libzzipfseeko_target} 
++        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzipfseeko> ${libzzipfseeko_target}
++        )
+     add_custom_target(libzzipfseeko_latest ALL
+-        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzipfseeko> ${lib}${libname}${dll}
++        DEPENDS ${libzzipfseeko_target}
+         )
+     install(FILES
+         ${outdir}/${lib}${libname}${dll}
+@@ -369,8 +377,12 @@ if(ZZIP_LIBLATEST)
+     if(ZZIPMMAPPED)
+     get_target_property(libname libzzipmmapped OUTPUT_NAME)
+     get_target_property(librelease libzzipmmapped RELEASE_POSTFIX)
++    set(libzzipmmapped_target "${lib}${libname}${dll}")
++    add_custom_command(OUTPUT ${libzzipmmapped_target} 
++        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzipmmapped> ${libzzipmmapped_target}
++        )
+     add_custom_target(libzzipmmaped_latest ALL
+-        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzipmmapped> ${lib}${libname}${dll}
++        DEPENDS ${libzzipmmapped_target}
+         )
+     install(FILES
+         ${outdir}/${lib}${libname}${dll}
+-- 
+2.34.1
+
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#12 lore raw

Re: [Buildroot] [PATCH v2 1/1] package/zziplib: create symlinks only if target is missing

Quoted 14 lines · Andreas Ziegler

Symlink creation to base file names is only needed for versioned libraries. Modify CMake rules to prevent overwriting existing libraties with recursive links.

Fixes the following autobuild failures:
http://autobuild.buildroot.net/results/dd1/dd1974dbc1a22a96a3cedb117417e66119821514/
http://autobuild.buildroot.net/results/df8/df8406402ccff7cec34ae5858b8da57d1a4ae9c1/
http://autobuild.buildroot.net/results/743/7433a2ad111e2f014c81f196d3d1e2f63dffa858/
http://autobuild.buildroot.net/results/79f/79f88e9ec14cda7d07cf689eee864791ba949892/
...
http://autobuild.buildroot.net/results/892/8922efbbbfe79e8286a411acce4086b5c77c57c0/
http://autobuild.buildroot.net/results/dfa/dfa8ade3a4c1750e6dd58e652f60af2a44f80dd8/
http://autobuild.buildroot.net/results/9cd/9cd4147486f32d642513ba14efca3a02d5745ab9/

Quoted 6 lines

Regression test cases:
http://autobuild.buildroot.net/results/ba7/ba711034c0abe980f677e26de41739223e2f66e9/
http://autobuild.buildroot.net/results/032/032aaff121fb114f388c67dbca3ad2b02f670e38/
http://autobuild.buildroot.net/results/6c5/6c56b645a2b723920f07b98474452824fba5e2c1/

Applied to master, thanks.

Quoted 14 lines

---
Changes v1 -> v2:
- correct file name in generator expressions

  ...reate-symlinks-only-if-target-is-mis.patch | 59 +++++++++++++++++++
  1 file changed, 59 insertions(+)

create mode 100644 package/zziplib/0002-ZZIP_LIBLATEST-create-symlinks-only-if-target-is-mis.patch

package/zziplib/0002-ZZIP_LIBLATEST-create-symlinks-only-if-target-is-mis.patch new file +0 -0
new file mode 100644
index 0000000000..1fe4824a83

package/zziplib/0002-ZZIP_LIBLATEST-create-symlinks-only-if-target-is-mis.patch line 6

Quoted 6 lines
package/zziplib/0002-ZZIP_LIBLATEST-create-symlinks-only-if-target-is-mis.patch new file +6 -0
@@ -0,0 +1,59 @@
+From 5977725ecea038f32a86938703ca1ed2b080b31c Mon Sep 17 00:00:00 2001
+From: Andreas Ziegler <[email protected]>
+Date: Fri, 29 Jul 2022 12:32:27 +0200
+Subject: [PATCH] ZZIP_LIBLATEST: create symlinks only if target is missing
+
+Signed-off-by: Andreas Ziegler <[email protected]>

This was missing some detail about exactly what is going on, so I just copied
the text from your upstream PR and added that here.

It was also missing the upstream URL.

Quoted 9 lines
package/zziplib/0002-ZZIP_LIBLATEST-create-symlinks-only-if-target-is-mis.patch new file +9 -0
+---
+ zzip/CMakeLists.txt | 18 +++++++++++++++---
+ 1 file changed, 15 insertions(+), 3 deletions(-)
+
+diff --git a/zzip/CMakeLists.txt b/zzip/CMakeLists.txt
+index 4fa6b9c..dd1e56a 100644
+--- a/zzip/CMakeLists.txt
++++ b/zzip/CMakeLists.txt
+@@ -350,8 +350,12 @@ if(ZZIP_LIBLATEST)

package/zziplib/0002-ZZIP_LIBLATEST-create-symlinks-only-if-target-is-mis.patch line 25

Quoted 10 lines
package/zziplib/0002-ZZIP_LIBLATEST-create-symlinks-only-if-target-is-mis.patch new file +10 -0
+   endif()
+     get_target_property(libname libzzip OUTPUT_NAME)
+     get_target_property(librelease libzzip RELEASE_POSTFIX)
++    set(libzzip_target "${lib}${libname}${dll}")
++    add_custom_command(OUTPUT ${libzzip_target}
++        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzip> ${libzzip_target}
++        )
+     add_custom_target(libzzip_latest ALL
+-        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzip> ${lib}${libname}${dll}
++        DEPENDS ${libzzip_target}

This is actually not really great - it will not create the symlink if the
unversioned file exists already, but that may in fact be a leftover from a previous build. The correct way to do it would be to add a condition that it's only done if target_file_name != liblibname.dll

But for buildroot it's good enough (since the version will always be the same
anyway when you do a rebuild), so applied to master as is.

Regards,
Arnout

Quoted 24 lines
package/zziplib/0002-ZZIP_LIBLATEST-create-symlinks-only-if-target-is-mis.patch new file +24 -0
+         )
+     install(FILES
+         ${outdir}/${lib}${libname}${dll}
+@@ -359,8 +363,12 @@ if(ZZIP_LIBLATEST)
+     if(ZZIPFSEEKO)
+     get_target_property(libname libzzipfseeko OUTPUT_NAME)
+     get_target_property(librelease libzzipfseeko RELEASE_POSTFIX)
++    set(libzzipfseeko_target "${lib}${libname}${dll}")
++    add_custom_command(OUTPUT ${libzzipfseeko_target}
++        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzipfseeko> ${libzzipfseeko_target}
++        )
+     add_custom_target(libzzipfseeko_latest ALL
+-        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzipfseeko> ${lib}${libname}${dll}
++        DEPENDS ${libzzipfseeko_target}
+         )
+     install(FILES
+         ${outdir}/${lib}${libname}${dll}
+@@ -369,8 +377,12 @@ if(ZZIP_LIBLATEST)
+     if(ZZIPMMAPPED)
+     get_target_property(libname libzzipmmapped OUTPUT_NAME)
+     get_target_property(librelease libzzipmmapped RELEASE_POSTFIX)
++    set(libzzipmmapped_target "${lib}${libname}${dll}")
++    add_custom_command(OUTPUT ${libzzipmmapped_target}
++        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzipmmapped> ${libzzipmmapped_target}

package/zziplib/0002-ZZIP_LIBLATEST-create-symlinks-only-if-target-is-mis.patch line 59

Quoted 10 lines
package/zziplib/0002-ZZIP_LIBLATEST-create-symlinks-only-if-target-is-mis.patch new file +10 -0
++        )
+     add_custom_target(libzzipmmaped_latest ALL
+-        COMMAND ${CMAKE_COMMAND} -E create_symlink $<TARGET_FILE_NAME:libzzipmmapped> ${lib}${libname}${dll}
++        DEPENDS ${libzzipmmapped_target}
+         )
+     install(FILES
+         ${outdir}/${lib}${libname}${dll}
+--
+2.34.1
+

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#13 lore raw

Re: [Buildroot] [PATCH v2 1/1] package/zziplib: create symlinks only if target is missing

In reply to Andreas Ziegler
Quoted 21 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Andreas" == Andreas Ziegler <[email protected]> writes:

Symlink creation to base file names is only needed for versioned libraries. Modify CMake rules to prevent overwriting existing libraties with recursive links.

Fixes the following autobuild failures:
http://autobuild.buildroot.net/results/dd1/dd1974dbc1a22a96a3cedb117417e66119821514/
http://autobuild.buildroot.net/results/df8/df8406402ccff7cec34ae5858b8da57d1a4ae9c1/
http://autobuild.buildroot.net/results/743/7433a2ad111e2f014c81f196d3d1e2f63dffa858/
http://autobuild.buildroot.net/results/79f/79f88e9ec14cda7d07cf689eee864791ba949892/
...
http://autobuild.buildroot.net/results/892/8922efbbbfe79e8286a411acce4086b5c77c57c0/
http://autobuild.buildroot.net/results/dfa/dfa8ade3a4c1750e6dd58e652f60af2a44f80dd8/
http://autobuild.buildroot.net/results/9cd/9cd4147486f32d642513ba14efca3a02d5745ab9/

Regression test cases:
http://autobuild.buildroot.net/results/ba7/ba711034c0abe980f677e26de41739223e2f66e9/
http://autobuild.buildroot.net/results/032/032aaff121fb114f388c67dbca3ad2b02f670e38/
http://autobuild.buildroot.net/results/6c5/6c56b645a2b723920f07b98474452824fba5e2c1/

Quoted 4 lines

---
Changes v1 -> v2:
- correct file name in generator expressions

Committed to 2022.05.x and 2022.02.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot