-
Notifications
You must be signed in to change notification settings - Fork 3
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
BrahmsConfig.h causing compile issues etc... (Actually - components can't link to brahms-engine) #11
Comments
BrahmsConfig.h is generated from BrahmsConfig.h.in Paths are set up in the main CMakeLists.txt file. Which one is the problem? |
Really the fact that paths are hard coded at compile time - is this BTW - just noticed it wasn't clear in my initial comment: I'm talking about compiling components using the brahms headers... On 25 February 2016 at 11:57, Seb James notifications@github.com wrote:
Alex Cope |
It's a decision I made to compile in the main namespace path. I've not I may re-instate SYSTEMML_INSTALL_PATH such that you can have a second I may implement a scheme for saving the delayed values stored in On 25 February 2016 at 12:05, Alex Cope notifications@github.com wrote:
Research Associate in Computational Neuroscience |
Extra Namespaces can be configured using brahms.xml or command line options, so that doesn't seem too important. I've made progress - it doesn't seem that the .h file paths do anything - but I'm still having trouble as components try to link agains brahms-engine symbols, but since engine is statically linked into brahms-execute I can't link against it??
|
I changed the code so that the code which was previously part of So you should be able to remove the libbrahms-engine linking On 25 February 2016 at 12:51, Alex Cope notifications@github.com wrote:
Research Associate in Computational Neuroscience |
I have done...
|
Yep, just confirmed - the issue is that the libbrahms-engine symbols are now in the executable, so when compiling a component the component cannot compile-time link against them. This leads to a failure to compile. You can avoid the issue at compile time by preventing undefined symbols being flagged, but the library still fails to load at run-time with the same problem |
Is the a problem when you compile SpineML_2_BRAHMS components? Or do you see it when compiling BRAHMS itself? |
Components (at the moment I'm working on tools/explicitList as it is more convenient) BRAHMS compiles fine... which means the stdlib compiles... so really not sure what the issue is |
Ah, looks like I've left some library linking in Apple. See framework/engine/CMakeLists.txt:
|
So you are static linking the stdlibs? |
Just the internal libraries:
|
See how everything is dynamically linked, but there's no libbrahms-engine.so etc |
? |
ldd shows the linking of an executable - I showed the linking of brahms-execute. All the dynamically linked libs are listed. |
libbrahms-engine is compiled into libbrahms-engine.a and statically linked into brahms-execute. However, there's something not working when we do this on Apple. |
How does this work on Linux? The symbols are still stuck in an executable so components can't link to them |
Yes, but that executable dynamically loads the component.so, and when it does that the symbols are all available. |
Not on Mac - I can bypass the compile time error and it still falls flat... Why is there no compile time error on LInux, or do you use a similar trick to ignore the errors?
|
Here's what I think you need to find an analogue for: This is framework/execute/CMakeLists.txt:
|
And see the root CMakeLists.txt for the content of BRAHMS_LINK_WHOLE_ARCHIVE |
-Wl,--whole-archive equivalent might be -all_load |
That's what I'm trying! |
Yay! After that it works. Now I'll try and move over to the CMake BRAHMS and make sure the master SML_2_BRAHMS plays nicely with it... I've fixed up the CMake BRAHMS already and will create a new pull request (no need as it respects my new commit...) |
Ok, good stuff. In the root CMakeLists.txt, change:
for
then remove the if(APPLE) bit from framework/execute/CMakeLists.txt |
Hi Seb,
Just compiling against the CMake BRAHMS and there seem to be a few issues - mainly stemming from the fact that BrahmsConfig.h is setting a lot of stuff I'd rather it didn't... this includes a hard coded path. It would be better to have the code generation pass in this path instead, as hard coding it means that the self contained BRAHMS will only work in one directory - bad news for users.
Alex
The text was updated successfully, but these errors were encountered: