-
Notifications
You must be signed in to change notification settings - Fork 58
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
Error in libmutation++_fortran.dylib. #176
Comments
Ehi @anfuso1193, the problem might be related to the cmake script of stagline. Could you please provide a link to the code such that I can inspect it? |
Hi Ruben, have you recieved my email with all the info you asked for? |
@anfuso1193 I don't think I have. But I'd very much prefer you to put that info here in the issue such that everybody in the future could eventually stumble on this issue and learn something. |
Yeah sure, sorry for that. Here's the file:
Let me know if you have any troubles with the drive. |
I took the liberty to edit your message and add the actual code in the message to make sure it stays there for future reference (the Google Drive will expire). Anyway, the way Mutation is included is not as reported in the documentation. Did you check it? https://github.com/mutationpp/Mutationpp/blob/master/docs/coupling.md |
Here's an example for the Fortran interface: https://github.com/mutationpp/Mutationpp/blob/master/examples/fortran/CMakeLists.txt.shared |
No, I didn't. I was following other instructions (Codes_101_BD.docs file inside the stagline folder). I will have a look at the documentation. |
I guess that's historical for old versions of mutation. The new way is exactly aimed at avoid problems with wrong path because that information is included in the cmake target and doesn't have to be hard-coded by hand. Let me know if you manage to make it work.😉 |
Hi Ruben, |
Hello @anfuso1193, if you tell me what you tried and what problems you are encountering, I can help you troubleshoot. I'm afraid I have no time to support the build system of an external project right now, I'm sorry. The starting point is this file: https://github.com/mutationpp/Mutationpp/blob/master/examples/fortran/CMakeLists.txt.shared. Adapt it to stagline cmake script file. |
Thanks, Ruben. The code seems to work now but the problem was not the CMake. Apparently, it was on my .zshrc file. |
Hello @anfuso1193, good to know. I still think that the cmake script should be adapted to use cmake targets (as shown in the script I shared before) instead of retrieving paths. Also, the build script should be adapted to be independent of user environment configuration (your I'm closing this now, feel free to get back here if you need more help with building. |
My OS is:
MacBook Pro 2018
OS Version:
Catalina 10.15.7
Cmake Version:
3.21.0
uname -a
outputenv
outputMutation++ origin
Build from sourceMutation++ build steps
Step
git clone github.com/mutationpp/Mutationpp
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=$(realpath ../install) ..
make -j4 install
Step: modify the ~/.zshrc profile
export MPP_DIRECTORY='/Users/enricoanfuso/Documents/Enrico/VKI/Codes/Mutationpp'
export MPP_DATA_DIRECTORY=$MPP_DIRECTORY/data
export PATH=$MPP_DIRECTORY/install/bin:$PATH
export LD_LIBRARY_PATH=$MPP_DIRECTORY/install/lib:$LD_LIBRARY_PATH
Step
ccmake ..
BUILD_FORTRAN_WRAPPER --> ON
Step
cd Mutationpp
cd build
make -j4 install
Step
In "Mutationpp/install/include" I have drag&drop the "mutationpp.mod" file inside the "mutation++" folder
Mutation++ cmake output
Mutation++ make output
Your software build steps
cd stagline
mkdir build
cd build
ccmake ../
MPP_INSTALL_DIR /Users/enricoanfuso/Documents/Enrico/VKI/Codes/Mutationpp/install (press 'c' and 'g')
make -j 4 install
Steps to reproduce
When I try to run a test case of 'stagline' I get the following errors
"
dyld: Library not loaded: libmutation++_fortran.dylib
Referenced from: /Users/enricoanfuso/Documents/Enrico/VKI/Codes/stagline/bin/stagline
Reason: image not found
zsh: abort stagline
"
Comments
I checked in "/Users/enricoanfuso/Documents/Enrico/VKI/Codes/Mutationpp/install/lib" and both the files libmutation++_fortran.dylib, libmutation++.dylib are there
The text was updated successfully, but these errors were encountered: