New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
autotools: Fix static linking when openssl is enabled in windows #1723
Conversation
This adds Requires.private field in pkgconfig file. Using that field, pkgconfig pulls all the private cflags or libs while static linking. OpenSSL static libraries require some windows system libraies. Otherwise static liking fails with libarchive.
@@ -378,6 +378,7 @@ if test "x$with_iconv" != "xno"; then | |||
AC_CHECK_HEADERS([localcharset.h]) | |||
am_save_LIBS="$LIBS" | |||
LIBS="${LIBS} ${LIBICONV}" | |||
LIBSREQUIRED="$LIBSREQUIRED${LIBSREQUIRED:+ }iconv" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is totally broken and breaks all attempted use of the pkg-config file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this is totally broken, e.g. with my OBS build (https://build.opensuse.org/package/binary/home:alvistack/libarchive-libarchive-3.6.2/CentOS_8_Stream/x86_64/libarchive-devel-3.6.2-2.1.x86_64.rpm), nothing could provide pkgconfig(iconv)
:
Manually rollback this patch could help, e.g.:
curl -skL https://github.com/libarchive/libarchive/pull/1723.patch | patch -p1 -R
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My apology, I did not checked it in other systems. I have only tried to fix the issue in msys2/mingw environment, see the linked issue above. The msys2/mingw-packages repository provides an iconv.pc file https://github.com/msys2/MINGW-packages/tree/master/mingw-w64-libiconv. Feel free to revert this commit if needed.
git clean -xdf autoreconf -i && ./configure && make clean && git clean -xdf tar zcvf ../libarchive_3.6.2.orig.tar.gz --exclude=.git . debuild -uc -us cp libarchive.spec ../libarchive_3.6.2-1.spec mv ../libarchive*3.6.2*.{gz,xz,spec,dsc} /osc/home\:alvistack/libarchive-libarchive-3.6.2/ rm -rf ../libarchive*3.6.2*.* See libarchive#1723 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
This was added in libarchive#1723 but missed that the platform it was tested with patches libiconv to provide a pkg-config file, while that's not the case on other platforms. Instead of adding iconv to Requires.private add the library to Libs.private.
This was added in libarchive#1723 but missed that the platform it was tested with patches libiconv to provide a pkg-config file, while that's not the case on other platforms. Instead of adding iconv to Requires.private add the library to Libs.private by not reverting the "LIBS" assignment.
This was added in libarchive#1723 but missed that the platform it was tested with patches libiconv to provide a pkg-config file, while that's not the case on other platforms. Instead of adding iconv to Requires.private add the linker flags to Libs.private by not reverting the "LIBS" assignment.
git clean -xdf autoreconf -i && ./configure && make clean && git clean -xdf tar zcvf ../libarchive_3.6.2.orig.tar.gz --exclude=.git . debuild -uc -us cp libarchive.spec ../libarchive_3.6.2-1.spec mv ../libarchive*3.6.2*.{gz,xz,spec,dsc} /osc/home\:alvistack/libarchive-libarchive-3.6.2/ rm -rf ../libarchive*3.6.2*.* See libarchive#1723 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf autoreconf -i && ./configure && make clean && git clean -xdf tar zcvf ../libarchive_3.6.2.orig.tar.gz --exclude=.git . debuild -uc -us cp libarchive.spec ../libarchive_3.6.2-1.spec mv ../libarchive*3.6.2*.{gz,xz,spec,dsc} /osc/home\:alvistack/libarchive-libarchive-3.6.2/ rm -rf ../libarchive*3.6.2*.* See libarchive#1723 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf autoreconf -i && ./configure && make clean && git clean -xdf tar zcvf ../libarchive_3.7.0.orig.tar.gz --exclude=.git . debuild -uc -us cp libarchive.spec ../libarchive_3.7.0-1.spec mv ../libarchive*3.7.0*.{gz,xz,spec,dsc} /osc/home\:alvistack/libarchive-libarchive-3.7.0/ rm -rf ../libarchive*3.7.0*.* See libarchive#1723 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf ./build/autogen.sh && ./configure && make clean && git clean -xdf tar zcvf ../libarchive_3.7.0.orig.tar.gz --exclude=.git . debuild -uc -us cp libarchive.spec ../libarchive_3.7.0-1.spec mv ../libarchive*3.7.0*.{gz,xz,spec,dsc} /osc/home\:alvistack/libarchive-libarchive-3.7.0/ rm -rf ../libarchive*3.7.0*.* See libarchive#1723 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf autoreconf -i && ./configure && make clean && git clean -xdf tar zcvf ../libarchive_3.6.2.orig.tar.gz --exclude=.git . debuild -uc -us cp libarchive.spec ../libarchive_3.6.2-1.spec mv ../libarchive*3.6.2*.{gz,xz,spec,dsc} /osc/home\:alvistack/libarchive-libarchive-3.6.2/ rm -rf ../libarchive*3.6.2*.* See libarchive#1723 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf ./build/autogen.sh && ./configure && make clean && git clean -xdf tar zcvf ../libarchive_3.7.0.orig.tar.gz --exclude=.git . debuild -uc -us cp libarchive.spec ../libarchive_3.7.0-1.spec mv ../libarchive*3.7.0*.{gz,xz,spec,dsc} /osc/home\:alvistack/libarchive-libarchive-3.7.0/ rm -rf ../libarchive*3.7.0*.* See libarchive#1723 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf ./build/autogen.sh && ./configure && make clean && git clean -xdf tar zcvf ../libarchive_3.7.0.orig.tar.gz --exclude=.git . debuild -uc -us cp libarchive.spec ../libarchive_3.7.0-1.spec cp ../libarchive*3.7.0*.{gz,xz,spec,dsc} /osc/home\:alvistack/libarchive-libarchive-3.7.0/ rm -rf ../libarchive*3.7.0*.* See libarchive#1723 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf ./build/autogen.sh && ./configure && make clean && git clean -xdf tar zcvf ../libarchive_3.6.2.orig.tar.gz --exclude=.git . debuild -uc -us cp libarchive.spec ../libarchive_3.6.2-1.spec cp ../libarchive*3.6.2*.{gz,xz,spec,dsc} /osc/home\:alvistack/libarchive-libarchive-3.6.2/ rm -rf ../libarchive*3.6.2*.* See libarchive#1723 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf ./build/autogen.sh && ./configure && make clean && git clean -xdf tar zcvf ../libarchive_3.7.0.orig.tar.gz --exclude=.git . debuild -uc -us cp libarchive.spec ../libarchive_3.7.0-1.spec cp ../libarchive*3.7.0*.{gz,xz,spec,dsc} /osc/home\:alvistack/libarchive-libarchive-3.7.0/ rm -rf ../libarchive*3.7.0*.* See libarchive#1723 See libarchive#1919 See libarchive#1920 See libarchive#1921 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf ./build/autogen.sh && ./configure && make clean && git clean -xdf tar zcvf ../libarchive_3.7.0.orig.tar.gz --exclude=.git . debuild -uc -us cp libarchive.spec ../libarchive_3.7.0-1.spec cp ../libarchive*3.7.0*.{gz,xz,spec,dsc} /osc/home\:alvistack/libarchive-libarchive-3.7.0/ rm -rf ../libarchive*3.7.0*.* See libarchive#1723 See libarchive#1919 See libarchive#1920 See libarchive#1921 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf ./build/autogen.sh && ./configure && make clean && git clean -xdf tar zcvf ../libarchive_3.6.2.orig.tar.gz --exclude=.git . debuild -uc -us cp libarchive.spec ../libarchive_3.6.2-1.spec cp ../libarchive*3.6.2*.{gz,xz,spec,dsc} /osc/home\:alvistack/libarchive-libarchive-3.6.2/ rm -rf ../libarchive*3.6.2*.* See libarchive#1723 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf ./build/autogen.sh && ./configure && make clean && git clean -xdf tar zcvf ../libarchive_3.6.2.orig.tar.gz --exclude=.git . debuild -uc -us cp libarchive.spec ../libarchive_3.6.2-1.spec cp ../libarchive*3.6.2*.{gz,xz,spec,dsc} /osc/home\:alvistack/libarchive-libarchive-3.6.2/ rm -rf ../libarchive*3.6.2*.* See libarchive#1723 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf ./build/autogen.sh && ./configure && make clean && git clean -xdf tar zcvf ../libarchive_3.7.0.orig.tar.gz --exclude=.git . debuild -uc -us cp libarchive.spec ../libarchive_3.7.0-1.spec cp ../libarchive*3.7.0*.{gz,xz,spec,dsc} /osc/home\:alvistack/libarchive-libarchive-3.7.0/ rm -rf ../libarchive*3.7.0*.* See libarchive#1723 See libarchive#1919 See libarchive#1920 See libarchive#1921 See libarchive#1924 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf ./build/autogen.sh && ./configure && make clean && git clean -xdf tar zcvf ../libarchive_3.7.0.orig.tar.gz --exclude=.git . debuild -uc -us cp libarchive.spec ../libarchive_3.7.0-1.spec cp ../libarchive*3.7.0*.{gz,xz,spec,dsc} /osc/home\:alvistack/libarchive-libarchive-3.7.0/ rm -rf ../libarchive*3.7.0*.* See libarchive#1723 See libarchive#1919 See libarchive#1920 See libarchive#1921 See libarchive#1924 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf ./build/autogen.sh && ./configure && make clean && git clean -xdf tar zcvf ../libarchive_3.6.2.orig.tar.gz --exclude=.git . debuild -uc -us cp libarchive.spec ../libarchive_3.6.2-1.spec cp ../libarchive*3.6.2*.{gz,xz,spec,dsc} /osc/home\:alvistack/libarchive-libarchive-3.6.2/ rm -rf ../libarchive*3.6.2*.* See libarchive#1723 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf ./build/autogen.sh && ./configure && make clean && git clean -xdf tar zcvf ../libarchive_3.7.0.orig.tar.gz --exclude=.git . debuild -uc -us cp libarchive.spec ../libarchive_3.7.0-1.spec cp ../libarchive*3.7.0*.{gz,xz,spec,dsc} /osc/home\:alvistack/libarchive-libarchive-3.7.0/ rm -rf ../libarchive*3.7.0*.* See libarchive#1723 See libarchive#1919 See libarchive#1920 See libarchive#1921 See libarchive#1924 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf ./build/autogen.sh && ./configure && make clean && git clean -xdf tar zcvf ../libarchive_3.6.2.orig.tar.gz --exclude=.git . debuild -uc -us cp libarchive.spec ../libarchive_3.6.2-1.spec cp ../libarchive*3.6.2*.{gz,xz,spec,dsc} /osc/home\:alvistack/libarchive-libarchive-3.6.2/ rm -rf ../libarchive*3.6.2*.* See libarchive#1723 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf ./build/autogen.sh && ./configure && make clean && git clean -xdf tar zcvf ../libarchive_3.7.1.orig.tar.gz --exclude=.git . debuild -uc -us cp libarchive.spec ../libarchive_3.7.1-1.spec cp ../libarchive*3.7.1*.{gz,xz,spec,dsc} /osc/home\:alvistack/libarchive-libarchive-3.7.1/ rm -rf ../libarchive*3.7.1*.* See libarchive#1723 See libarchive#1919 See libarchive#1920 See libarchive#1921 See libarchive#1924 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf ./build/autogen.sh && ./configure && make clean && git clean -xdf tar zcvf ../libarchive_3.6.2.orig.tar.gz --exclude=.git . debuild -uc -us cp libarchive.spec ../libarchive_3.6.2-1.spec cp ../libarchive*3.6.2*.{gz,xz,spec,dsc} /osc/home\:alvistack/libarchive-libarchive-3.6.2/ rm -rf ../libarchive*3.6.2*.* See libarchive#1723 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf ./build/autogen.sh && ./configure && make clean && git clean -xdf tar zcvf ../libarchive_3.7.0.orig.tar.gz --exclude=.git . debuild -uc -us cp libarchive.spec ../libarchive_3.7.0-1.spec cp ../libarchive*3.7.0*.{gz,xz,spec,dsc} /osc/home\:alvistack/libarchive-libarchive-3.7.0/ rm -rf ../libarchive*3.7.0*.* See libarchive#1723 See libarchive#1919 See libarchive#1920 See libarchive#1921 See libarchive#1924 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf ./build/autogen.sh && ./configure && make clean && git clean -xdf tar zcvf ../libarchive_3.7.1.orig.tar.gz --exclude=.git . debuild -uc -us cp libarchive.spec ../libarchive_3.7.1-1.spec cp ../libarchive*3.7.1*.{gz,xz,spec,dsc} /osc/home\:alvistack/libarchive-libarchive-3.7.1/ rm -rf ../libarchive*3.7.1*.* See libarchive#1723 See libarchive#1919 See libarchive#1920 See libarchive#1921 See libarchive#1924 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf ./build/autogen.sh && ./configure && make clean && git clean -xdf tar zcvf ../libarchive_3.6.2.orig.tar.gz --exclude=.git . debuild -uc -us cp libarchive.spec ../libarchive_3.6.2-1.spec cp ../libarchive*3.6.2*.{gz,xz,spec,dsc} /osc/home\:alvistack/libarchive-libarchive-3.6.2/ rm -rf ../libarchive*3.6.2*.* See libarchive#1723 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf ./build/autogen.sh && ./configure && make clean && git clean -xdf tar zcvf ../libarchive_3.7.0.orig.tar.gz --exclude=.git . debuild -uc -us cp libarchive.spec ../libarchive_3.7.0-1.spec cp ../libarchive*3.7.0*.{gz,xz,spec,dsc} /osc/home\:alvistack/libarchive-libarchive-3.7.0/ rm -rf ../libarchive*3.7.0*.* See libarchive#1723 See libarchive#1919 See libarchive#1920 See libarchive#1921 See libarchive#1924 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf ./build/autogen.sh && ./configure && make clean && git clean -xdf tar zcvf ../libarchive_3.7.1.orig.tar.gz --exclude=.git . debuild -uc -us cp libarchive.spec ../libarchive_3.7.1-1.spec cp ../libarchive*3.7.1*.{gz,xz,spec,dsc} /osc/home\:alvistack/libarchive-libarchive-3.7.1/ rm -rf ../libarchive*3.7.1*.* See libarchive#1723 See libarchive#1919 See libarchive#1920 See libarchive#1921 See libarchive#1924 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf ./build/autogen.sh && ./configure && make clean && git clean -xdf tar zcvf ../libarchive_3.7.1.orig.tar.gz --exclude=.git . debuild -uc -us cp libarchive.spec ../libarchive_3.7.1-1.spec cp ../libarchive*3.7.1*.{gz,xz,spec,dsc} /osc/home\:alvistack/libarchive-libarchive-3.7.1/ rm -rf ../libarchive*3.7.1*.* See libarchive#1723 See libarchive#1919 See libarchive#1920 See libarchive#1921 See libarchive#1924 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf ./build/autogen.sh && ./configure && make clean && git clean -xdf tar zcvf ../libarchive_3.6.2.orig.tar.gz --exclude=.git . debuild -uc -us cp libarchive.spec ../libarchive_3.6.2-1.spec cp ../libarchive*3.6.2*.{gz,xz,spec,dsc} /osc/home\:alvistack/libarchive-libarchive-3.6.2/ rm -rf ../libarchive*3.6.2*.* See libarchive#1723 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf ./build/autogen.sh && ./configure && make clean && git clean -xdf tar zcvf ../libarchive_3.7.1.orig.tar.gz --exclude=.git . debuild -uc -us cp libarchive.spec ../libarchive_3.7.1-1.spec cp ../libarchive*3.7.1*.{gz,xz,spec,dsc} /osc/home\:alvistack/libarchive-libarchive-3.7.1/ rm -rf ../libarchive*3.7.1*.* See libarchive#1723 See libarchive#1919 See libarchive#1920 See libarchive#1921 See libarchive#1924 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
git clean -xdf ./build/autogen.sh && ./configure && make clean && git clean -xdf tar zcvf ../libarchive_3.6.2.orig.tar.gz --exclude=.git . debuild -uc -us cp libarchive.spec ../libarchive_3.6.2-1.spec cp ../libarchive*3.6.2*.{gz,xz,spec,dsc} /osc/home\:alvistack/libarchive-libarchive-3.6.2/ rm -rf ../libarchive*3.6.2*.* See libarchive#1723 Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
This adds Requires.private field in pkgconfig file. Using that field,
pkgconfig pulls all the private cflags or libs while static linking.
OpenSSL static libraries require some windows system libraies. Otherwise
static liking fails with libarchive.