Nixpkgs: openexr fails to build on Mac OS X since e5e31593cebf0322fff2badcb8f85eb2cd40da74

Created on 27 Apr 2020  路  8Comments  路  Source: NixOS/nixpkgs

Describe the bug
build of OpenEXR fails to find -lImath2_4

To Reproduce

$ nix-build . -A openexr

Expected behavior

Successful build.

Screenshots

clang++ -DHAVE_CONFIG_H -I. -I../config  -D_THREAD_SAFE -I/nix/store/yzdk3am5jpm0g87mzm513jzj1w4mp12v-ilmbase-2.4.1-dev/include -I/nix/store/yzdk3am5jpm0g87mzm513jzj1w4mp12v-ilmbase-2.4.1-dev/include/OpenEXR -D_THREAD_SAFE -I.. -I../config  -I/nix/store/wkz4cs14c5dsfi86q3zw8nayfii1lckr-zlib-1.2.11-dev/include  -pipe -g -O2 -std=c++14 -D_THREAD_SAFE  -c -o dwaLookups.o dwaLookups.cpp
/nix/store/pd2xsac3kz5ziskb5x90cm9jcjk2xcc6-bash-4.4-p23/bin/bash ../libtool  --tag=CXX   --mode=link clang++ -pipe -g -O2 -std=c++14 -D_THREAD_SAFE    -o dwaLookups dwaLookups.o -L/nix/store/gjj7ka209rfdr4fsryjfx16if4bk74qa-ilmbase-2.4.1/lib -L/nix/store/gjj7ka209rfdr4fsryjfx16if4bk74qa-ilmbase-2.4.1/lib -lImath-2_4 -lHalf-2_4 -lIex-2_4 -lIexMath-2_4 -lIlmThread-2_4 -D_THREAD_SAFE
libtool: link: clang++ -pipe -g -O2 -std=c++14 -D_THREAD_SAFE -o dwaLookups dwaLookups.o -D_THREAD_SAFE  -L/nix/store/gjj7ka209rfdr4fsryjfx16if4bk74qa-ilmbase-2.4.1/lib -lImath-2_4 -lHalf-2_4 -lIex-2_4 -lIexMath-2_4 -lIlmThread-2_4
ld: library not found for -lImath-2_4
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [Makefile:762: dwaLookups] Error 1
make[1]: *** Waiting for unfinished jobs....
/nix/store/pd2xsac3kz5ziskb5x90cm9jcjk2xcc6-bash-4.4-p23/bin/bash ../libtool  --tag=CXX   --mode=link clang++ -pipe -g -O2 -std=c++14 -D_THREAD_SAFE    -o b44ExpLogTable b44ExpLogTable.o -L/nix/store/gjj7ka209rfdr4fsryjfx16if4bk74qa-ilmbase-2.4.1/lib -L/nix/store/gjj7ka209rfdr4fsryjfx16if4bk74qa-ilmbase-2.4.1/lib -lImath-2_4 -lHalf-2_4 -lIex-2_4 -lIexMath-2_4 -lIlmThread-2_4 -D_THREAD_SAFE
libtool: link: clang++ -pipe -g -O2 -std=c++14 -D_THREAD_SAFE -o b44ExpLogTable b44ExpLogTable.o -D_THREAD_SAFE  -L/nix/store/gjj7ka209rfdr4fsryjfx16if4bk74qa-ilmbase-2.4.1/lib -lImath-2_4 -lHalf-2_4 -lIex-2_4 -lIexMath-2_4 -lIlmThread-2_4
ld: library not found for -lImath-2_4
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [Makefile:758: b44ExpLogTable] Error 1
make[1]: Leaving directory '/private/tmp/nix-build-openexr-2.4.1.drv-0/source/OpenEXR/IlmImf'
make: *** [Makefile:502: all-recursive] Error 1
builder for '/nix/store/3qp40w14j9x0rf9kh58j6mxah4829mz5-openexr-2.4.1.drv' failed with exit code 2
error: build of '/nix/store/3qp40w14j9x0rf9kh58j6mxah4829mz5-openexr-2.4.1.drv' failed

Additional context
Add any other context about the problem here.

Notify maintainers

@lovesegfault

Metadata

  • system: "x86_64-darwin"
  • host os: Darwin 19.2.0, macOS 10.15.2
  • multi-user?: yes
  • sandbox: no
  • version: nix-env (Nix) 2.3.4
  • channels(root): "nixpkgs-20.09pre221715.5f814bf9cc4"
  • channels(jfelice): "darwin"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixpkgs

Maintainer information:

attribute:
- openexr
- ilmbase
bug darwin

All 8 comments

Something seems to be mangling the library names incorrectly?

The ilmbase package contains:

libHalf-2_4.24.dylib      libIex-2_4.24.dylib       libIexMath-2_4.24.dylib   libIlmThread-2_4.24.dylib libImath-2_4.24.dylib
libHalf.dylib             libIex.dylib              libIexMath.dylib          libIlmThread.dylib        libImath.dylib
libHalf.la                libIex.la                 libIexMath.la             libIlmThread.la           libImath.la

Notice the periods.

cc. @flokli

I lack the hardware to debug this. @LnL7, any ideas?

Repro'd on 10.14

https://github.com/AcademySoftwareFoundation/openexr/blob/master/INSTALL.md#configuring-via-autoconf seems to indicate that autoconf-based builds are only supported on linux - we may want to switch this to cmake. Building outside of nix via cmake is working fine for me.

I can confirm this still builds on x86_64-linux at least.

86241 appears to fix this for me (macos 10.14). Reopen if it's still a problem for you.

Was this page helpful?
0 / 5 - 0 ratings