-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Linker error for osrm-datastore target when using mason #3501
Comments
Thanks for reporting. From what I can see you're using the mason integration? Can you reproduce without mason? Ubuntu 16.04 has all dependencies in I will have a look at this after the holidays. Sidenote: t2.micro has 1 GB of RAM, with only 1 GB of additional swapfile I'm surprised you are able to compile and link at all. If all you need are pre-built binaries you can get them bundled via the npm |
I'm getting the same error. Ubuntu 16.04, plenty of memory (64GB). |
I got it to work just using the standard build.
|
mkdir -p build
|
|
@Gubio The error you're getting here Can you try building on a machine with more RAM, or adding swap space to the machine you're using? |
Trying to reproduce the issues. Following the Mason docs https://github.com/Project-OSRM/osrm-backend/wiki/Building-with-Mason I get Clang to segfault during linking
Seems like LTO related and can be worked around by passing |
Done ;) |
Follow-up here. I can re-produce your initial issue with the following setup:
If you add I just re-worked our Wiki and split off the two ways of getting the required dependencies:
And we really should think about disabling LTO by default .. cc @springmeyer @TheMarex |
Huge 👍 I think disabling LTO by default is the right choice.
The bug is in clang 3.9.0 (and causes binutils gold to segfault). It has nothing to do with mason. The clang bug is fixed in 3.9.1 and 4.x and was never present in 3.8.x. This is noted at #3389. |
This disables the `-flto` LTO flag by default since we're seeing segfaults in compiler lto plugins, binutils and linker errors again and again for various clang / gcc / binutils combinations. Pass `-DNEBALE_LTO` to `cmake` in order to re-enable LTO. LTO situation in short: - LTO does not work at all for gcc<4.9 - With gcc>=4.9 the "slim" LTO format is getting used dumping IR - Older binutils need LTO plugins which know how to read this IR - Recent binutils handle this format all by themselves - LLVM is more or less the same with some Clang versions segfaulting If you need the performance benefit of LTO, make sure your compiler and binutils are up to date and see for yourself if LTO builds work for you. References: - https://gcc.gnu.org/wiki/LinkTimeOptimizationFAQ - #3481 (comment) - #3501 - #3441 (and a ton of other LTO tickets if you search for them)
This disables the `-flto` LTO flag by default since we're seeing segfaults in compiler lto plugins, binutils and linker errors again and again for various clang / gcc / binutils combinations. Pass `-DNEBALE_LTO` to `cmake` in order to re-enable LTO. LTO situation in short: - LTO does not work at all for gcc<4.9 - With gcc>=4.9 the "slim" LTO format is getting used dumping IR - Older binutils need LTO plugins which know how to read this IR - Recent binutils handle this format all by themselves - LLVM is more or less the same with some Clang versions segfaulting If you need the performance benefit of LTO, make sure your compiler and binutils are up to date and see for yourself if LTO builds work for you. References: - https://gcc.gnu.org/wiki/LinkTimeOptimizationFAQ - #3481 (comment) - #3501 - #3441 (and a ton of other LTO tickets if you search for them)
Ubuntu 16.04
t2.micro AWS
swap 1gb
The text was updated successfully, but these errors were encountered: