-
Notifications
You must be signed in to change notification settings - Fork 127
Description
I'm setting up a intel based project and so I'm doing all this from a x86 shell and installed dependencies using the x86 version of homebrew.
I've done brew install imagemagick along with brew install libpng and brew install libjpeg
libpng was installed as dependancy of imagemagick along with turbo-jpeg which conflicts with libjpeg
It gave me these options during installation of libjpeg to work around this. which I have tried using but no dice.
Output from `brew install -v libjpeg`
i386 ❯ brew reinstall -v libjpeg
==> Fetching jpeg
==> Downloading https://ghcr.io/v2/homebrew/core/jpeg/manifests/9e
Already downloaded: /Users/djb/Library/Caches/Homebrew/downloads/2b2f8b288d01e487869928818a6967fa52e710e5480dcc149e6d5da6721ffb5e--jpeg-9e.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/jpeg/blobs/sha256:60e8af1b1b966df8aa970865dd17930b67edd23e10d3c96495879030a3b6f5ee
Already downloaded: /Users/djb/Library/Caches/Homebrew/downloads/ccaa14808a5897831d431578327fe25a82a3a1adc16bbaaef06ccbe5bbc0a6ec--jpeg--9e.ventura.bottle.tar.gz
==> Verifying checksum for 'ccaa14808a5897831d431578327fe25a82a3a1adc16bbaaef06ccbe5bbc0a6ec--jpeg--9e.ventura.bottle.tar.gz'
==> Reinstalling jpeg
==> Pouring jpeg--9e.ventura.bottle.tar.gz
/usr/bin/env tar --extract --no-same-owner --file /Users/djb/Library/Caches/Homebrew/downloads/ccaa14808a5897831d431578327fe25a82a3a1adc16bbaaef06ccbe5bbc0a6ec--jpeg--9e.ventura.bottle.tar.gz --directory /private/tmp/d20230517-23546-11ogyu2
/usr/bin/env cp -pR /private/tmp/d20230517-23546-11ogyu2/jpeg/. /usr/local/Homebrew/Cellar/jpeg
==> Finishing up
==> Caveats
jpeg is keg-only, which means it was not symlinked into /usr/local/homebrew,
because it conflicts with `jpeg-turbo`.
If you need to have jpeg first in your PATH, run:
fish_add_path /usr/local/homebrew/opt/jpeg/bin
For compilers to find jpeg you may need to set:
set -gx LDFLAGS "-L/usr/local/homebrew/opt/jpeg/lib"
set -gx CPPFLAGS "-I/usr/local/homebrew/opt/jpeg/include"
For pkg-config to find jpeg you may need to set:
set -gx PKG_CONFIG_PATH "/usr/local/homebrew/opt/jpeg/lib/pkgconfig"
==> Summary
🍺 /usr/local/homebrew/Cellar/jpeg/9e: 21 files, 867.4KB
==> Running `brew cleanup jpeg`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
I've tried forcing the linking of the library with these two commands but they didn't make any difference
> brew unlink libpng && brew link libpng
> brew link --overwrite libpng --force
When trying to compile the gem (CLI ouput here) I get the following mkmf.log.
mkmf.log output
"xcrun clang -o conftest -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/universal-darwin22 -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/backward -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -I/Library/Ruby/Gems/2.6.0/gems/phashion-1.2.0/ext/phashion_ext/include -L/Library/Ruby/Gems/2.6.0/gems/phashion-1.2.0/ext/phashion_ext/lib -L/usr/local/lib -x c++ conftest.c -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib -L/Library/Ruby/Gems/2.6.0/gems/phashion-1.2.0/ext/phashion_ext/lib -L/Library/Ruby/Gems/2.6.0/gems/phashion-1.2.0/ext/phashion_ext/lib -L/usr/local/lib -L. -L/AppleInternal/Library/BuildRoots/97f6331a-ba75-11ed-a4bc-863efbbaf80d/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.Internal.sdk/usr/local/lib -lruby.2.6 -lpthread -lpHash_gem -lstdc++ -ljpeg -lpng"
ld: warning: directory not found for option '-L/AppleInternal/Library/BuildRoots/97f6331a-ba75-11ed-a4bc-863efbbaf80d/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.Internal.sdk/usr/local/lib'
ld: library not found for -ljpeg
clang: error: linker command failed with exit code 1 (use -v to see invocation)
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return 0;
6: }
/* end */This gives the main error I think is the problem here ld: library not found for -ljpeg
As far as I can see I've given the system this library and the information on how to find it so I'm a little stuck on what to do next. What am I missing here?