-
-
Notifications
You must be signed in to change notification settings - Fork 164
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
Build error on Arch Linux when Clang is present #237
Comments
PS: I am the person who posted the segfault on lobste.rs. I haven't been able to compile any of the 0.6-pre series. ArchLinux uses gcc per default, but I have both gcc and clang installed. I have no idea whether it was gcc or clang that produced the segfault above. |
Great thanks, it looks like the problem is the feature detection of Can you run
I think the issue is that my build first builds unstripped binaries so we have symbols, and then strips them. Most people build stripped binaries in the first place, which is more portable. There's apparently no portable way to do the former. It depends on whether you're using Clang or GCC. |
$ command -v objcopy; echo $?
/usr/bin/objcopy
0 and $ pajig owns /usr/bin/objcopy
/usr/bin/objcopy is owned by binutils 2.31.1-4
$ gcc --version
gcc (GCC) 8.2.1 20181127
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ clang --version
clang version 7.0.1 (tags/RELEASE_701/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin |
I just tried explicitly with |
We need objcopy to put symbols for the OPTIMIZED binary in a separate file, and then add a "debuglink" field in the ELF. If we don't have objcopy, e.g. with Clang on OS X, we just strip it and lose the symbols. It doesn't appear to have the "debuglink" functionality? Should fix issue #237.
Cool, can you try this temporary tarball and see if it works? https://www.oilshell.org/share/oil-0.6.temp16.tar.gz I changed the Makefile to only rely on objcopy if it's there. |
With temp16 the build process runs successfully and produces a working binary. |
Great, thanks for trying it! That was a definite improvement to the Makefile. |
This is out now with 0.6.pre16: http://www.oilshell.org/release/0.6.pre16/ Announcement forthcoming: |
can confirm that it compiles and runs fine, thanks @andychu! |
Due to dsymutil being used, which is meant for OS X only
https://lobste.rs/s/y8noui/osh_0_6_pre15_does_not_crave_chaos#c_wouaea
The text was updated successfully, but these errors were encountered: