-
Notifications
You must be signed in to change notification settings - Fork 6
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
glibc2.36 adds arc4random_buf
, causing compile error
#33
Comments
I'm pretty certain the library builds with this. I have the same error on Fedora 37 and can build with system libarchive. Wrt the bug, yeah, I'm not even sure what's the right fix. |
I'm running the following script on my machine (VoidLinux, glibc 2.36) from a fresh directory: #!/bin/bash
curl -L 'https://github.com/haskell/ghcup-hs/archive/refs/tags/v0.1.19.0.tar.gz' \
| tar -xz
cd 'ghcup-hs-0.1.19.0'
cabal build --prefix='.' --project='cabal.project' \
-f'+internal-downloader' -f'+tui' -f'+system-libarchive' This exact build command is giving me the |
|
Running cabal build --prefix='.' --project='cabal.project' \
--constraint='libarchive +system-libarchive' now gives
It looks like |
Removing
from cabal.project and build using |
The issue is here: libarchive/c/autoconf-windows/config.h Lines 295 to 296 in 9be6b02
We would have to migrate to an autoconf script that produces a proper config.h on the target system instead of bundling that config. That would complicate the libarchive build system though. |
Per https://sourceware.org/glibc/wiki/Release/2.36, glibc2.36 adds built-in declarations for
arc4random_buf
. When compiling this library as dependency for another project (ghcup), thearc4random_buf
declaration from this project (in c/archive_random.c) clashes with the built-in declaration, resulting in an error message like so:The command being used to build
ghcup
(released version v0.1.19.0) is:(from some testing, this error occurs regardless of whether
-f+system-libarchive
is passed).I see that there is some way of customizing whether to include this declaration, perhaps by setting
HAVE_ARC4RANDOM_BUF
in autoconf-linux/config.h; however I have no idea how to correctly customize this config when the library is being built automatically by Cabal, as dependency of a different project. Would releasing a new version of this library to be compatible with glibc2.36 help?The text was updated successfully, but these errors were encountered: