-
Notifications
You must be signed in to change notification settings - Fork 65
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
compiling from source fails - what are the requirements? #108
Comments
I just started afresh by downloading the optipng source archive from this repo and compiling it manually, using the info found here https://github.com/NixOS/nixpkgs/blob/bd6ba87381ef6274a830253b60e481209d4d7c7d/pkgs/tools/graphics/optipng/default.nix
When I however add the following env var before running configure and run export LD=$CC
./configure --with-system-zlib --prefix="vendor" --bindir="vendor" --with-system-libpng
make install When adjusting the // From https://sourceforge.net/projects/optipng/files/OptiPNG/
await binBuild.file(path.resolve(__dirname, '../vendor/source/optipng.tar.gz'), [
`LD=$CC ./configure --with-system-zlib --with-system-libpng --prefix="${bin.dest()}" --bindir="${bin.dest()}"`,
'LD=$CC make install'
]); |
Ok, final update. I tried more experiments with my own fork, and I can get it to work by simply calling |
thank you, putting this into your shell.nixs mkDerivation seem to work. pkgs.stdenv.mkDerivation {
# name = "...";
# buildInputs = [...];
# workaround for npm dep compilation
# https://github.com/imagemin/optipng-bin/issues/108
shellHook = ''
LD=$CC
'';
} |
I fixed it with:
|
Thanks for the proposed fix, with it, I get the following error and stacktrace
I added |
@happysalada add |
Hi,
I'm using NixOS for my servers and local VM's but I can't get optipng-bin to compile successfully when being installed via an npm dependency.
I've been tweaking and testing for well over a month now but all to no avail. Can you please help and tell us what specific libraries are expected to be where exactly?
This is the (consistent) error message I keep getting:
Thanks a lot in advance!
The text was updated successfully, but these errors were encountered: