Skip to content
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

Merged
merged 1 commit into from Apr 16, 2022
Merged

autotools: Fix static linking when openssl is enabled in windows #1723

merged 1 commit into from Apr 16, 2022

Conversation

Biswa96
Copy link
Contributor

@Biswa96 Biswa96 commented Apr 13, 2022

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.

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"

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.

Copy link
Contributor

@hswong3i hswong3i Dec 10, 2022

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):

image

Manually rollback this patch could help, e.g.:

curl -skL https://github.com/libarchive/libarchive/pull/1723.patch | patch -p1 -R

Copy link
Contributor Author

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.

hswong3i added a commit to alvistack/libarchive-libarchive that referenced this pull request Dec 10, 2022
    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>
lazka added a commit to lazka/libarchive that referenced this pull request Dec 10, 2022
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.
lazka added a commit to lazka/libarchive that referenced this pull request Dec 10, 2022
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.
lazka added a commit to lazka/libarchive that referenced this pull request Dec 10, 2022
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.
hswong3i added a commit to alvistack/libarchive-libarchive that referenced this pull request Dec 10, 2022
    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>
hswong3i added a commit to alvistack/libarchive-libarchive that referenced this pull request Jul 19, 2023
    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>
hswong3i added a commit to alvistack/libarchive-libarchive that referenced this pull request Jul 19, 2023
    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>
hswong3i added a commit to alvistack/libarchive-libarchive that referenced this pull request Jul 19, 2023
    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>
hswong3i added a commit to alvistack/libarchive-libarchive that referenced this pull request Jul 19, 2023
    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>
hswong3i added a commit to alvistack/libarchive-libarchive that referenced this pull request Jul 19, 2023
    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>
hswong3i added a commit to alvistack/libarchive-libarchive that referenced this pull request Jul 19, 2023
    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>
hswong3i added a commit to alvistack/libarchive-libarchive that referenced this pull request Jul 19, 2023
    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>
hswong3i added a commit to alvistack/libarchive-libarchive that referenced this pull request Jul 19, 2023
    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>
hswong3i added a commit to alvistack/libarchive-libarchive that referenced this pull request Jul 19, 2023
    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>
hswong3i added a commit to alvistack/libarchive-libarchive that referenced this pull request Jul 19, 2023
    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>
hswong3i added a commit to alvistack/libarchive-libarchive that referenced this pull request Jul 19, 2023
    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>
hswong3i added a commit to alvistack/libarchive-libarchive that referenced this pull request Jul 19, 2023
    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>
hswong3i added a commit to alvistack/libarchive-libarchive that referenced this pull request Jul 19, 2023
    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>
hswong3i added a commit to alvistack/libarchive-libarchive that referenced this pull request Jul 19, 2023
    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>
hswong3i added a commit to alvistack/libarchive-libarchive that referenced this pull request Jul 20, 2023
    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>
hswong3i added a commit to alvistack/libarchive-libarchive that referenced this pull request Jul 20, 2023
    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>
hswong3i added a commit to alvistack/libarchive-libarchive that referenced this pull request Jul 30, 2023
    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>
hswong3i added a commit to alvistack/libarchive-libarchive that referenced this pull request Feb 6, 2024
    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>
hswong3i added a commit to alvistack/libarchive-libarchive that referenced this pull request Feb 6, 2024
    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>
hswong3i added a commit to alvistack/libarchive-libarchive that referenced this pull request Feb 6, 2024
    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>
hswong3i added a commit to alvistack/libarchive-libarchive that referenced this pull request Feb 25, 2024
    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>
hswong3i added a commit to alvistack/libarchive-libarchive that referenced this pull request Feb 25, 2024
    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>
hswong3i added a commit to alvistack/libarchive-libarchive that referenced this pull request Feb 25, 2024
    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>
hswong3i added a commit to alvistack/libarchive-libarchive that referenced this pull request Apr 25, 2024
    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>
hswong3i added a commit to alvistack/libarchive-libarchive that referenced this pull request Apr 25, 2024
    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>
hswong3i added a commit to alvistack/libarchive-libarchive that referenced this pull request Apr 25, 2024
    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>
hswong3i added a commit to alvistack/libarchive-libarchive that referenced this pull request Apr 25, 2024
    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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants