#2987 closed defect (fixed)
Mac openmodelica-devel fails to install
Reported by: | Owned by: | Adeel Asghar | |
---|---|---|---|
Priority: | high | Milestone: | 1.9.4 |
Component: | Build Environment | Version: | trunk |
Keywords: | Mac Macport OMEdit | Cc: |
Description
I have tried both upgrade, and installing 23415 and the build completes, but then Macports gets into the following loop:
---> Building openmodelica-devel ---> Staging openmodelica-devel into destroot ---> Installing openmodelica-devel @23415_0+gfortran48+libraries+modelica3d+qt+sundials ---> Cleaning openmodelica-devel ---> Computing dependencies for openmodelica-devel ---> Deactivating openmodelica-devel @23320_0+gfortran48+libraries+modelica3d+qt+sundials ---> Cleaning openmodelica-devel ---> Activating openmodelica-devel @23415_0+gfortran48+libraries+modelica3d+qt+sundials ---> Cleaning openmodelica-devel ---> Updating database of binaries ---> Scanning binaries for linking errors ---> Found 2 broken file(s), matching files to ports ---> Found 1 broken port(s), determining rebuild order ---> Rebuilding in order openmodelica-devel @23415 +gfortran48+libraries+modelica3d+qt+sundials ---> Computing dependencies for openmodelica-devel ---> Cleaning openmodelica-devel ---> Scanning binaries for linking errors ---> Found 2 broken file(s), matching files to ports ---> Found 1 broken port(s), determining rebuild order ---> Rebuilding in order openmodelica-devel @23415 +gfortran48+libraries+modelica3d+qt+sundials ---> Computing dependencies for openmodelica-devel ---> Fetching distfiles for openmodelica-devel ---> Verifying checksums for openmodelica-devel ---> Extracting openmodelica-devel ---> Configuring openmodelica-devel ---> Building openmodelica-devel ---> Staging openmodelica-devel into destroot ---> Deactivating openmodelica-devel @23415_0+gfortran48+libraries+modelica3d+qt+sundials ---> Cleaning openmodelica-devel ---> Uninstalling openmodelica-devel @23415_0+gfortran48+libraries+modelica3d+qt+sundials ---> Cleaning openmodelica-devel ---> Computing dependencies for openmodelica-devel ---> Installing openmodelica-devel @23415_0+gfortran48+libraries+modelica3d+qt+sundials ---> Activating openmodelica-devel @23415_0+gfortran48+libraries+modelica3d+qt+sundials ---> Cleaning openmodelica-devel ---> Updating database of binaries ---> Scanning binaries for linking errors ---> Found 2 broken file(s), matching files to ports ---> Found 1 broken port(s), determining rebuild order ---> Rebuilding in order openmodelica-devel @23415 +gfortran48+libraries+modelica3d+qt+sundials ---> Computing dependencies for openmodelica-devel ---> Fetching distfiles for openmodelica-devel ---> Verifying checksums for openmodelica-devel ---> Extracting openmodelica-devel ---> Configuring openmodelica-devel ---> Building openmodelica-devel ---> Staging openmodelica-devel into destroot ---> Deactivating openmodelica-devel @23415_0+gfortran48+libraries+modelica3d+qt+sundials ---> Cleaning openmodelica-devel ---> Uninstalling openmodelica-devel @23415_0+gfortran48+libraries+modelica3d+qt+sundials ---> Cleaning openmodelica-devel ---> Computing dependencies for openmodelica-devel ---> Installing openmodelica-devel @23415_0+gfortran48+libraries+modelica3d+qt+sundials ---> Activating openmodelica-devel @23415_0+gfortran48+libraries+modelica3d+qt+sundials ---> Cleaning openmodelica-devel ---> Updating database of binaries ---> Scanning binaries for linking errors ---> Found 2 broken file(s), matching files to ports Error: Port openmodelica-devel is still broken after rebuilding it more than 3 times. Error: Please run port -d -y rev-upgrade and use the output to report a bug. Port openmodelica-devel still broken after rebuilding 3 time(s) while executing "error "Port $portname still broken after rebuilding [expr {$broken_port_counts($portname) - 1}] time(s)"" (procedure "revupgrade_scanandrebuild" line 280) invoked from within "revupgrade_scanandrebuild broken_port_counts $opts" (procedure "macports::revupgrade" line 5) invoked from within "macports::revupgrade $opts" (procedure "action_revupgrade" line 2) invoked from within "action_revupgrade $action $portlist $opts" (procedure "action_upgrade" line 25) invoked from within "$action_proc $action $portlist [array get global_options]" (procedure "process_cmd" line 103) invoked from within "process_cmd $remaining_args" invoked from within "if { [llength $remaining_args] > 0 } { # If there are remaining arguments, process those as a command set exit_status [process_cmd $remaining..." (file "/opt/local/bin/port" line 5268)
As, it does appear to install, it just doesn't complete, I tried to run it, and OMEdit crashes with this:
Dyld Error Message: Library not loaded: /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_23415/build/lib/omc/libOpenModelicaCompiler.dylib Referenced from: /Applications/MacPorts/OMEdit.app/Contents/MacOS/OMEdit Reason: image not found
Perhaps this failure relates to this change?
https://trac.openmodelica.org/OpenModelica/changeset/23388
It looks as though the compile is working, but some file is not being properly installed in the correct place for it to actually run?
As macports suggested, I did also run:
port -d -y rev-upgrade
and can attach the log file that generates, if it would be helpful.
Change History (23)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Yup, that makes sense. It looks like the same issue that showed up here:
https://trac.openmodelica.org/OpenModelica/ticket/2701
that you were able to fix that way.
Thanks.
comment:4 by , 10 years ago
No luck. I just tried to upgrade to 23428, and I am seeing the same problem.
---> Found 2 broken file(s), matching files to ports ---> Found 1 broken port(s), determining rebuild order ---> Rebuilding in order openmodelica-devel @23428 +gfortran48+libraries+modelica3d+qt+sundials
And, I tried to run it, and again get a crash that it can't find the library. It is still searching in the build directory:
Dyld Error Message: Library not loaded: /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_23428/build/lib/omc/libOpenModelicaCompiler.dylib Referenced from: /Applications/MacPorts/OMEdit.app/Contents/MacOS/OMEdit Reason: image not found
comment:5 by , 10 years ago
As one other clue, perhaps. I found that libOpenModelicaCompiler.dylib is being put here:
/opt/locallib/omc/
So, after the incomplete install, just so that OMEdit can find it I tried this:
sudo ln -s /opt/local//lib/omc/libOpenModelicaCompiler.dylib /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_23428/build/lib/omc/libOpenModelicaCompiler.dylib
Now, OMEdit does open. But, it doesn't open the default libraries, such as Modelica. And, File->System Libraries is empty.
comment:6 by , 10 years ago
I also tried this:
sudo install_name_tool -change "/opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_23428/build/lib/omc/libOpenModelicaCompiler.dylib" "/opt/local/lib/omc/libOpenModelicaCompiler.dylib" /opt/local/bin/omc sudo install_name_tool -change "/opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-devel/openmodelica-devel/work/openmodelica_23428/build/lib/omc/libOpenModelicaCompiler.dylib" "/opt/local/lib/omc/libOpenModelicaCompiler.dylib" /Applications/MacPorts/OMEdit.app/Contents/MacOS/OMEdit
And, again, OMEdit, does open, but it doesn't show any default libraries, except for OpenModelica. It also, doesn't launch the omc process, and won't load any files or libraries.
comment:7 by , 10 years ago
And, perhaps one other clue....OMShell and OMPlot seem to be working just fine.
comment:8 by , 10 years ago
Does File->System Libraries show Modelica? In that case it could just be a settings issue.
OMEdit is not supposed to launch omc processes any longer (OMEdit is the omc process).
comment:9 by , 10 years ago
Do you mean after doing the "install_name_tool" above, to get OMEdit to launch?
If so, no! That menu is completely empty. And if I try to open a file or library manually, I don't see anything happen at all.
comment:12 by , 10 years ago
r23452 should work. It took two days to checkout the svn on the mac mini, but after that, the error was easy to find :(
comment:13 by , 10 years ago
It now does build and install. But OMEdit, still doesn't work. The only library it shows in the Library Browser is "OpenModelica" and the File->System Libraries menu is completely empty. If I try to manually open a file or library, nothing happens. It doesn't seem to matter if it is a system library, or one of my models.
I can click open, and it brings up the file selection dialog box. I can then select one, and click open, and it just comes right back to OMEdit with nothing showing in Modeling or the the Library browser.
comment:14 by , 10 years ago
Can you provide the omeditcommands.mos and omeditcommunication.log from the temp directory?
comment:15 by , 10 years ago
I just tried to use OMEdit to create a new model. I clicked new, and put in a name, and clicked OK. It then responded with a dialog box that says:
Error: File not Found:
/Application/MacPorts/OMEdit.app/Contents/lib/omc/ModelicaBuiltin.mo.
Error: Internal error Builtin.getInitialFunctions failed.
(this repeats...)
I just checked and /Applications/MacPorts/OMedit.app/Contents/ (which is were OMEdit is installed) doesn't not contain a lib file at all. That info instead is in:
/opt/local/lib/omc
So, it seems as though what is happening is that OMEdit is looking in the wrong place for the necessary libraries. When it was using omc, it searched in the correct place. Probably the problem is that both were searching in relative paths, but omc lived in the /opt/local directory structure.
comment:16 by , 10 years ago
Yes, this will be a problem for OSX that I had not anticipated. I am a bit unsure how to solve it. You could symlink /opt/local/lib/omlibrary ~/.openmodelica/libraries to use the /opt ones as your personal ones. Or set env.var OPENMODELICALIBRARY to point to /opt. But that is just a workaround.
comment:17 by , 10 years ago
Err... Setting OPENMODELICAHOME="/opt/local" is of course better. Then you would also be able to simulate. http://stackoverflow.com/questions/7583163/how-do-i-retrieve-the-path-to-my-dylib-at-runtime suggests I should be able to provide a fix with just a little effort.
comment:18 by , 10 years ago
The second suggestion is a bit of pain, because it is a bit annoying to set environmental variables so they end up going to GUI applications.
So, I did the following as yet a third work around:
sudo ln -s /opt/local/lib /Applications/MacPorts/OMedit.app/Contents/lib
sudo ln -s /opt/local/include /Applications/MacPorts/OMedit.app/Contents/include
Again, not elegant, but now it seems to work. I tried just the first symlink, and then OMEdit did run, but if I tried a simulation I got errors about a missing header file. So, added the second symlink, and now it seems fine.
comment:19 by , 10 years ago
r23457 should work. I can't test OMEdit since I only have ssh access to OSX. But this one should work (I checked that it finds the libOpenModelicaCompiler.dylib file which is not in OMEdit.app/Contents).
comment:20 by , 10 years ago
I will try it and let you know, once it becomes available. (Seems that the macports sync doesn't find the new files on the openmodelica server for a bit of time. I'm still seeing only 23454 when I sync, but if I look at the web site, I see 23457 available).
comment:21 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
You got it! Working now!
Thank you.
comment:22 by , 9 years ago
Milestone: | Future → pre1.9.4 |
---|
It doesn't make sense to keep closed ticket in the "Future" milestone that were simply forgotten to assign to the correct milestone in the past.
comment:23 by , 7 years ago
Milestone: | pre1.9.4 → 1.9.4 |
---|
Removing the pre1.9.4 milestone in favor of 1.9.4.
I'm guessing that I don't change the linking to use rpath using otool... I'll have a look tomorrow.