Open asivitz opened 2 years ago
I added the Kernel
framework to the bindings-GLFW cabal file and attempted to build it. But, it can't find the Kernel framework:
bindings-GLFW-lib-bindings-GLFW> Configure flags:
bindings-GLFW-lib-bindings-GLFW> --prefix=/nix/store/6wqmik2hq05qw21g1z1q1fry73qygvsw-bindings-GLFW-lib-bindings-GLFW-3.3.2.0 lib:bindings-GLFW --extra-framework-dirs=/nix/store/460pn884nfgm17x1fda319abb9vgh89d-apple-framework-AGL-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/dbqpv3cbwhvfyjwby2cfff702bnrxdhh-apple-framework-Cocoa-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/3r1z0k22y4gkg533ssw6bm286l18s14i-apple-framework-OpenGL-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/4n9iwj55ywbya14jszf3bf6429lkll0m-apple-framework-IOKit-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/g0wcki7rh19d03fg5sd9n2kncgsxng1p-apple-framework-CoreFoundation-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/1zcvv9j94a6jym6xgyfkirsjl93fm8hf-apple-framework-CoreVideo-11.0.0/Library/Frameworks --extra-framework-dirs=/nix/store/fnjklniai17rg3dpdbzzpiw280wlb9n4-apple-framework-Kernel-11.0.0/Library/Frameworks --package-db=clear --package-db=/nix/store/sjarai9nfv7h8ycwv5hm0mczzy3ml35y-bindings-GLFW-lib-bindings-GLFW-3.3.2.0-config/lib/ghc-8.10.7/package.conf.d --flags=-exposenative --flags=macosxusechdir --flags=macosxusemenubar --flags=macosxuseretina --flags=-osmesa --flags=-system-glfw --flags=-wayland --flags=x --exact-configuration --dependency=bindings-DSL=bindings-DSL-1.0.25-JfzWjQBQZfECMQk1xak58t --dependency=Cabal=Cabal-3.2.1.0 --dependency=array=array-0.5.4.0 --dependency=base=base-4.14.3.0 --dependency=binary=binary-0.8.8.0 --dependency=bytestring=bytestring-0.10.12.0 --dependency=containers=containers-0.6.5.1 --dependency=deepseq=deepseq-1.4.4.0 --dependency=directory=directory-1.3.6.0 --dependency=filepath=filepath-1.4.2.1 --dependency=ghc=ghc-8.10.7 --dependency=ghc-boot=ghc-boot-8.10.7 --dependency=ghc-boot-th=ghc-boot-th-8.10.7 --dependency=ghc-compact=ghc-compact-0.1.0.0 --dependency=ghc-heap=ghc-heap-8.10.7 --dependency=ghc-prim=ghc-prim-0.6.1 --dependency=hpc=hpc-0.6.1.0 --dependency=integer-gmp=integer-gmp-1.0.3.0 --dependency=mtl=mtl-2.2.2 --dependency=parsec=parsec-3.1.14.0 --dependency=pretty=pretty-1.1.3.6 --dependency=process=process-1.6.13.2 --dependency=rts=rts --dependency=template-haskell=template-haskell-2.16.0.0 --dependency=terminfo=terminfo-0.4.1.4 --dependency=text=text-1.2.4.1 --dependency=time=time-1.9.3 --dependency=transformers=transformers-0.5.6.2 --dependency=unix=unix-2.7.2.2 --dependency=xhtml=xhtml-3000.2.2.1 --with-ghc=ghc --with-ghc-pkg=ghc-pkg --with-hsc2hs=hsc2hs --with-gcc=cc --with-ld=ld --with-ar=ar --with-strip=strip --disable-executable-stripping --disable-library-stripping --disable-library-profiling --disable-profiling --enable-static --enable-shared --disable-coverage --enable-library-for-ghci --ghc-option=-fPIC --gcc-option=-fPIC
bindings-GLFW-lib-bindings-GLFW> Configuring library for bindings-GLFW-3.3.2.0..
bindings-GLFW-lib-bindings-GLFW> building
bindings-GLFW-lib-bindings-GLFW> Preprocessing library for bindings-GLFW-3.3.2.0..
bindings-GLFW-lib-bindings-GLFW> linking dist/build/Bindings/GLFW_hsc_make.o failed (exit code 1)
bindings-GLFW-lib-bindings-GLFW> rsp file was: "dist/build/Bindings/hsc2hscall57456-2.rsp"
bindings-GLFW-lib-bindings-GLFW> command was: /nix/store/qlicbgwj6mddbcdcfsqqp7g5fq3rphd1-clang-wrapper-11.1.0/bin/cc dist/build/Bindings/GLFW_hsc_make.o dist/build/Bindings/GLFW_hsc_utils.o -o dist/build/Bindings/GLFW_hsc_make -fPIC -fPIC -framework AGL -framework Cocoa -framework OpenGL -framework IOKit -framework CoreFoundation -framework CoreVideo -framework Kernel -L/nix/store/xxzvgvpxkh82s99hfckhyrsngq73m1jg-bindings-DSL-lib-bindings-DSL-1.0.25/lib/aarch64-osx-ghc-8.10.7/bindings-DSL-1.0.25-JfzWjQBQZfECMQk1xak58t -L/nix/store/ycnck3mjfwxfjvcv7i21wlq1bc6mx43m-ghc-8.10.7/lib/ghc-8.10.7/base-4.14.3.0 -L/nix/store/hxygwa1k49my5b8k8nm3nqjjr12ayj02-libiconv-50/lib -liconv -L/nix/store/ycnck3mjfwxfjvcv7i21wlq1bc6mx43m-ghc-8.10.7/lib/ghc-8.10.7/integer-gmp-1.0.3.0 -L/nix/store/gn1jhgk9h7yfn8s4yc7mwkvifms2s7hd-gmp-with-cxx-6.2.1/lib -lgmp -L/nix/store/ycnck3mjfwxfjvcv7i21wlq1bc6mx43m-ghc-8.10.7/lib/ghc-8.10.7/ghc-prim-0.6.1 -L/nix/store/ycnck3mjfwxfjvcv7i21wlq1bc6mx43m-ghc-8.10.7/lib/ghc-8.10.7/rts -L/nix/store/l33448mv3fscsh25v7vahkjazrgg70wk-libffi-3.4.2/lib -lm -ldl -lffi
bindings-GLFW-lib-bindings-GLFW> error: ld: framework not found Kernel
It's listed there as an '--extra-framework-dirs' in the configure flags. Any suggestion on how to debug why the linker is failing to find it?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
The odd thing is- I believe Kernel/IOKit is in the Kernel framework, not the IOKit framework. But the bindings-GLFW cabal file lists IOKit as a dependency, not Kernel: https://github.com/bsl/bindings-GLFW/blob/master/bindings-GLFW.cabal#L189
So perhaps the package itself is wrong. But then again, it's been that way for years and stack and cabal-install build it fine. So is there a bug in haskell.nix, or are cabal/stack more lenient with their handling of frameworks?