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

-liconv is missing in libarchive.pc #1766

Open
leleliu008 opened this issue Aug 20, 2022 · 16 comments
Open

-liconv is missing in libarchive.pc #1766

leleliu008 opened this issue Aug 20, 2022 · 16 comments

Comments

@leleliu008
Copy link

https://www.libarchive.org/downloads/libarchive-3.6.1.tar.xz

./configure \
        --enable-xattr \
        --enable-acl \
        --enable-bsdtar=static \
        --enable-bsdcat=static \
        --enable-bsdcpio=static \
        --without-xml2 \
        --without-mbedtls \
        --without-nettle \
        --without-libb2 \
        --without-cng \
        --with-zlib \
        --with-lzma \
        --with-bz2lib \
        --with-lz4 \
        --with-lzo2 \
        --with-zstd \
        --with-iconv \
        --with-expat \
        --with-openssl

installed libarchive.pc :

prefix=/opt/ppkg/install.1.d/libarchive
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: libarchive
Description: library that can create and read several streaming archive formats
Version: 3.6.1
Cflags: -I${includedir}
Cflags.private: -DLIBARCHIVE_STATIC
Libs: -L${libdir} -larchive
Libs.private: -lcrypto -lexpat -llzo2 -llzma -lzstd -llz4 -lbz2 -lz

-liconv is not in Libs.private

@lazka
Copy link

lazka commented Dec 9, 2022

Starting with 3.6.2 iconv is now in Requires.private, which breaks pkgconf because iconv doesn't install a .pc file.

@eli-schwartz
Copy link

Regressed in #1723 which seems to have been added randomly for the sake of msys2? Nonstandard stuff strikes again...

@hswong3i
Copy link
Contributor

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

@lazka
Copy link

lazka commented Dec 10, 2022

Does this help #1812 ?

lazka added a commit to lazka/libarchive that referenced this issue Dec 10, 2022
Add the required linker flags to Libs.private if built with iconv.

Fixes libarchive#1766
xtkoba added a commit to termux/termux-packages that referenced this issue Dec 10, 2022
termux-pacman-bot added a commit to termux-pacman/termux-packages that referenced this issue Dec 10, 2022
@leleliu008
Copy link
Author

I'm confused that why only libiconv in Requires.private but other libs are in Libs.private

@leleliu008
Copy link
Author

Starting with 3.6.2 iconv is now in Requires.private, which breaks pkgconf because iconv doesn't install a .pc file.

this problem was not reported by CI, developers may consider adding more test cases In CI.

itsaky pushed a commit to AndroidIDEOfficial/terminal-packages that referenced this issue Dec 11, 2022
@ljavorsk
Copy link
Contributor

#1819 is aiming on the same issue

@ljavorsk
Copy link
Contributor

Is anything new on this bug?

@genbtc
Copy link

genbtc commented Jan 19, 2023

Hard keeping track of which #1766 #1812 #1813 #1819 #1825 is the right one.
After one month, do we know what is going on ?

@thesamesam
Copy link
Contributor

thesamesam commented Jan 19, 2023

It was fixed on master a few weeks ago: 1f35c46.

(#1825)

@eli-schwartz
Copy link

No it was not. Even after that commit, iconv.pc is still a pkg-config dependency if you build libarchive against -liconv.

The PR that was merged was wrong -- it only solved things for glibc.

@thesamesam
Copy link
Contributor

Oh, I see! :(

@leleliu008
Copy link
Author

my solution is modifying libarchive.pc after installing:

gsed -i '/Libs.private: /s|$| -liconv|' out/lib/pkgconfig/libarchive.pc
gsed -i '/Requires.private:/d'          out/lib/pkgconfig/libarchive.pc

it works for me.

@ljavorsk
Copy link
Contributor

But this is just a downstream workaround.

This issue should be fixed upstream so we avoid these types of ugly workarounds.

@kientzle
Copy link
Contributor

This issue should be fixed upstream so we avoid these types of ugly workarounds

I've seen a few PRs that were retracted. Is there an open PR that actually fixes the problem?

@JLP04
Copy link

JLP04 commented Jan 29, 2023

I've seen a few PRs that were retracted. Is there an open PR that actually fixes the problem?

It doesn't look like there are any that are still open. I think all of the PRs for this have been closed, unfortunately.

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

No branches or pull requests

9 participants