asterius icon indicating copy to clipboard operation
asterius copied to clipboard

ahc-boot No such file @/var/.../ar29968-0.rsp

Open BebeSparkelSparkel opened this issue 5 years ago • 10 comments

Trying to run this on macOS 10.15.1 but it is inserting @ at the beginning of the file path

> ahc-boot
ar: @/var/folders/zj/p9mj9djj3c3b4vjw5yzq1ckr0000gn/T/ar29968-0.rsp: No such file or directory
callProcess: ar "-r" "-c" "/Users/williamrusnack/Documents/asterius/.stack-work/install/x86_64-osx-custom-asterius/5712d8350648752475833347e3e5d3b317375b52376aecf5a470fc0d935bd03d/8.6.5/share/x86_64-osx-ghc-8.6.5/asterius-0.0.1/.boot/asterius_lib/rts/libHSrts.a" "@/var/folders/zj/p9mj9djj3c3b4vjw5yzq1ckr0000gn/T/ar29968-0.rsp" (exit 1): failed

BebeSparkelSparkel avatar Nov 26 '19 22:11 BebeSparkelSparkel

Asterius.Boot L145 adds an @ that makes ar fail.

BebeSparkelSparkel avatar Nov 26 '19 22:11 BebeSparkelSparkel

Thanks for reporting. I have a WIP branch for fixing & testing darwin support here; after fixing the @ issue of booting, it now fails with the following error message when running configure of an autoconf package:

Configuring ghc-prim-0.5.3...
configure: WARNING: unrecognized options: --with-compiler
checking for gcc... /usr/bin/gcc
checking whether the C compiler works... no
configure: error: in `/Users/distiller/project/.stack-work/install/x86_64-osx-custom-asterius/1d778aa5cc4903dd0f7b6344c055c493b33c2d1b0672db9d92e829c6c4299605/8.6.5/share/x86_64-osx-ghc-8.6.5/asterius-0.0.1/.boot/dist/dist/ghc-prim/build':
configure: error: C compiler cannot create executables
See `config.log' for more details
ahc-boot: user error (boot failure)

I'm not a darwin toolchain expert, so I'm stuck on this step. Would be great if you or someone else provide a bit of guidance here.

TerrorJack avatar Nov 27 '19 10:11 TerrorJack

@TerrorJack I am getting the same C compiler error. I'll try to resolve that

BebeSparkelSparkel avatar Nov 27 '19 14:11 BebeSparkelSparkel

For the checking whether the C compiler works... no error.

In ghc-toolkit/ghc-libdir/settings the ("C compiler link flags", " -fuse-ld=gold"), is an unsupported compiler flag. This line needs to be changed to ("C compiler link flags", " "),.

I'm not sure how that will affect compatibility for the other systems

BebeSparkelSparkel avatar Nov 27 '19 14:11 BebeSparkelSparkel

Thank you. I pushed the suggested fix; fingers crossed for the result in https://circleci.com/gh/tweag/asterius/7669

TerrorJack avatar Nov 27 '19 14:11 TerrorJack

Got another file path error

ar: @/Users/williamrusnack/Documents/asterius/.stack-work/install/x86_64-osx-custom-asterius/5712d8350648752475833347e3e5d3b317375b52376aecf5a470fc0d935bd03d/8.6.5/share/x86_64-osx-ghc-8.6.5/asterius-0.0.1/.boot/dist/dist/ghc-prim/build/objs-38207/ar38207-2.rsp: No such file or directory
ahc-boot: user error (boot failure)

BebeSparkelSparkel avatar Nov 27 '19 14:11 BebeSparkelSparkel

Confirmed the same error on CI. Maybe the easiest fix is to install gnu binutils via brew, and set up symlink only for ar. I'll see if a better fix without hacking the xcode toolchain is possible tomorrow.

TerrorJack avatar Nov 27 '19 22:11 TerrorJack

Yeah, I couldn't solve this last one. Ok, I'll look into the modified ar

BebeSparkelSparkel avatar Nov 27 '19 22:11 BebeSparkelSparkel

+1 on this when building asterius on MacOS

ProofOfKeags avatar Apr 21 '20 19:04 ProofOfKeags

brew install binutils with a symlink for ar worked. Are there long term consequences of leaving this symlink in place?

ProofOfKeags avatar Apr 21 '20 19:04 ProofOfKeags