-
Notifications
You must be signed in to change notification settings - Fork 80
undefined symbols prevent linking on OSX / homebrew setup #97
Comments
I'll look around to check if the Thanks for the bug report! |
Here's what I get with |
I made another change in the cmake script to order the projects build: bdb1dc4 Can you retry it? |
I tried bdb1dc4. It still fails with undefined symbol errors :-/. I've attached two logs this time. So far in this issue, I've had I looked it up to remind myself why I had added that cmake setting, and it has to do with the "linking targets from other directories" error you might remember from #94. Wish I had remembered this detail earlier.
Then adding the option makes the build succeed. So that's one solution that we know works, but it requires a cmake upgrade. |
What is the full command line you're using to build with cmake? |
@etuttle , any update? |
Strange, somehow I missed the notifications for the last couple updates to this issue... The full command line I used to call cmake can be seen in the first few lines of the .txt files I posted (#97 (comment)). I tend to use a $cmake_opts shell variable, but you can see where I define that variable on the previous line in the .txt file. Did you need more than that? It seems likely that to solve this problem in clean way may require a cmake upgrade, but we also have the LDFLAGS work-around I mentioned in the issue report above. |
So if I update the documentation for OSX users to use CMake 3.15.5 and add the flag |
There are two paths I'm aware of:
|
Requiring cmake to version 3.13 for all platforms isn't possible because this version is too recent and not present in some of the supported Linux distributions: And Glewlwyd builds and runs fine on those versions But if we can restrict to 3.13 for OSX only I have no problem with that:
Also, I'm totally ok with fixing and cleaning the order of Concerning the option |
Got it, so we're aiming to fix this so OSX builds get the ideal build order. But retain backwards compatibility with older cmake. At the cost of if/else statement(s) in CMakeLists.txt. Let me take a shot at that. It may end up looking like PR #94, except with if/else statements around some of the
... because the cross-directory |
Hello @etuttle , I'm wondering if you still plan to complete the build for OSX? |
Oh I forgot about this one... sorry. Also I have a feeling that the solution we came up with is going to work everywhere but at the cost of ugly code in I'll try to spend some time coming up with an even better solution, but of course I have other things keeping me busy. If anyone else tries to build with homebrew libs, they should find this ticket which has hints and links to different ways to do it. |
As mentioned here I got this working by adding
LDFLAGS="-Wl,-undefined -Wl,dynamic_lookup"
to my env. Here's a more complete report of the problem.I've attached a terminal session with only a few minor edits for clarity. Also attached two of CMake's logs.
cmake-shell-log.txt
CMakeError.log
CMakeOutput.log
The text was updated successfully, but these errors were encountered: