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

libarchive 3.6.2 has bugs #117869

Closed
2 tasks done
leleliu008 opened this issue Dec 11, 2022 · 6 comments
Closed
2 tasks done

libarchive 3.6.2 has bugs #117869

leleliu008 opened this issue Dec 11, 2022 · 6 comments
Labels
outdated PR was locked due to age upstream issue An upstream issue report is needed

Comments

@leleliu008
Copy link

leleliu008 commented Dec 11, 2022

brew gist-logs <formula> link OR brew config AND brew doctor output

Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Suspicious https://github.com/Homebrew/brew git origin remote found.
The current git origin is:
  https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git

With a non-standard origin, Homebrew won't update properly.
You can solve this by setting the origin remote:
  git -C "/usr/local/Homebrew" remote set-url origin https://github.com/Homebrew/brew

Warning: Suspicious https://github.com/Homebrew/homebrew-core git origin remote found.
The current git origin is:
  https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git

With a non-standard origin, Homebrew won't update properly.
You can solve this by setting the origin remote:
  git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core" remote set-url origin https://github.com/Homebrew/homebrew-core

Verification

  • I ran brew update and am still able to reproduce my issue.
  • I have resolved all warnings from brew doctor and that did not fix my problem.

What were you trying to do (and why)?

a cmake project using libarchive:

cmake
 pkg_check_modules(PKG_CONFIG_LIBARCHIVE libarchive)

What happened (include all command output)?

prefix=/usr/local/Cellar/libarchive/3.6.2
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.2
Cflags: -I${includedir}
Cflags.private: -DLIBARCHIVE_STATIC
Libs: -L${libdir} -larchive
Libs.private: -lexpat -llzma -lzstd -llz4 -lb2 -lbz2 -lz
Requires.private: iconv

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

-- Checking for module 'libarchive'
-- Package 'iconv', required by 'libarchive', not found

Reference:libarchive/libarchive#1766

What did you expect to happen?

cmake can successfully invoke pkg_check_modules(PKG_CONFIG_LIBARCHIVE libarchive)

Step-by-step reproduction instructions (by running brew commands)

brew install libarchive
@leleliu008 leleliu008 added the bug Reproducible Homebrew/homebrew-core bug label Dec 11, 2022
@carlocab carlocab added upstream issue An upstream issue report is needed and removed bug Reproducible Homebrew/homebrew-core bug labels Dec 11, 2022
@cho-m
Copy link
Member

cho-m commented Dec 29, 2022

Looks like there are at least 4 different PRs upstream for this:


Sadly, the one that got merged (last PR) may not help on macOS where -liconv is used. It may help on Linux where it is available in glibc.

@leleliu008
Copy link
Author

leleliu008 commented Dec 29, 2022

Two weeks have passed, I can't believe there is no one maintainer want to resolve this simple problem. They are just wating for the next release rather than making a patch to let it work.

@SMillerDev
Copy link
Member

We don't do patches that aren't accepted upstream. Debian did and it made their security worthless:
https://www.debian.org/security/2008/dsa-1571 if you want a fix, work with the libarchive developers.

@Kagami
Copy link

Kagami commented Dec 29, 2022

Just remove iconv from Requires.private at /opt/homebrew/opt/libarchive/lib/pkgconfig/libarchive.pc if you need to make it work now.

@MikeMcQuaid
Copy link
Member

I can't believe there is no one maintainer want to resolve this simple problem.

@leleliu008 not going to keep your issues open when you speak to us like this. If it's so simple: you do it (complying with our documented patch policies).

@MikeMcQuaid MikeMcQuaid closed this as not planned Won't fix, can't repro, duplicate, stale Dec 29, 2022
@antony-jr
Copy link

For those who need a fix for their CI/CD,

 brew install gnu-sed
 gsed -i '/Requires.private: iconv/d' /usr/local/opt/libarchive/lib/pkgconfig/libarchive.pc

SMillerDev added a commit to SMillerDev/homebrew-core that referenced this issue Jan 15, 2023
@carlocab carlocab mentioned this issue Feb 1, 2023
@github-actions github-actions bot added the outdated PR was locked due to age label Feb 3, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age upstream issue An upstream issue report is needed
Projects
None yet
Development

No branches or pull requests

7 participants