Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Can't install OpenModelica on OS X from MacPorts

Can't install OpenModelica on OS X from MacPorts

It seems that it is currently not possible to install any version of OpenModelica on OS X using macports.

sudo port install openmodelica-anything fails.

Am I missing something? I previously had the binary package of macports installed but it caused my attempt to install macports to fail so I deleted /opt/openmodelica in order to get macports to work. I now would like to install openmodelica from source using macports but it doesn't seem to be available in any form.

Thanks,
Jerry

Re: Can't install OpenModelica on OS X from MacPorts

What errors do you get when trying to install using macports? Problems with the openmodelica port, or problems with something in macports?

Re: Can't install OpenModelica on OS X from MacPorts

I get "port xxx not found errors:

sudo port install openmodelica
Error: Port openmodelica not found

sudo port install openmodelica-devel
Error: Port openmodelica-devel not found

sudo port install openmodelica-release
Error: Port openmodelica-release not found

Also, at http://www.macports.org/ports.php, there are no hits when searching for openmodelica.

I'm pretty much a noob wrt macports but I have successfully installed other ports.

Jerry

Re: Can't install OpenModelica on OS X from MacPorts

Read the instructions carefully: http://openmodelica.org/index.php/download/download-mac

It will not work until you install our repository

Re: Can't install OpenModelica on OS X from MacPorts

Read the instructions carefully: http://openmodelica.org/index.php/download/download-mac

It will not work until you install our repository

Re: Can't install OpenModelica on OS X from MacPorts

Hmmm. That would be the rsync step. Here's what happens when I try to do that:

MBPro:~ me$ sudo echo rsync://build.openmodelica.org/macports/ >> /opt/local/etc/macports/sources.conf
-bash: /opt/local/etc/macports/sources.conf: Permission denied

FWIW, there's already a file at opt/local/etc/macports/sources.conf which appears to have been put there when I installed MacPorts, on April 2, 2012. Why am I being denied permission when I am sudo-ing? Why am I not being asked for my password?

BTW, why isn't OpenModelica hosted on MacPorts like a normal port?

Jerry

Re: Can't install OpenModelica on OS X from MacPorts

After setting up a MacPorts installation, run (as root). Is not the same as running as sudo (sudo cannot redirect files unless you tee it). If you'd like to maintain OpenModelica on macports.org, feel free. It's too much work for me (I won't accept to maintain the horrible paradiseo and rml-mmc dependencies on macports).

Re: Can't install OpenModelica on OS X from MacPorts

OK. But how do I run as root?

BTW, the problem I had installing MacPorts and then py-spyder on April 2, 2012, was apparently caused by an incompatibility from the binary installation of OpenModelica on September 20, 2011. Here is part of the exchange I had with the macports people. A little later I deleted /opt/openmolica and some associated files and did a fresh installation of MacPorts and py-spyder.

Jerry

<< Pasted partial exchange with macports people >>

   sudo port install py-spyder

(Spyder is a python IDE for technical computing.)

The installation failed with this error so that dbus and several other dependencies were not installed:

----------------------
Error: Target org.macports.activate returned: Image error: /Library/LaunchAgents/org.freedesktop.dbus-session.plist already exists and does not belong to a registered port.  Unable to activate port dbus. Use 'port -f activate dbus' to force the activation.
Error: Failed to install dbus
----------------------

I looked at /Library/LaunchAgents/org.freedesktop.dbus-session.plist and found that it is an alias that pointing to

   /opt/openmodelica/Library/LaunchAgents/org.freedesktop.dbus-session.plist

It turns that I had some time back installed Open Modelica using a .mpkg from a .dmg downloaded from http://openmodelica.org/, so that my /opt at the upper levels looks like this:

   /opt/local
   /opt/openmodelica

Re: Can't install OpenModelica on OS X from MacPorts

Several choices:
Login as Administrator
ssh root@localhost
su
sudo su
sudo sh

Re: Can't install OpenModelica on OS X from MacPorts

I've had luck just checking out the sources and building from scratch on OS X.  Of course, you have to install the pre-reqs by hand, too, but that's not bad.

Re: Can't install OpenModelica on OS X from MacPorts

sjoelund.se wrote:

Login as Administrator
ssh root@localhost
su
sudo su
sudo sh

I don't understand these instructions. Can you please be more explicit?
Jerry

Re: Can't install OpenModelica on OS X from MacPorts

Code:

Login as Administrator

Logout, click Administrator. Enter your admin password. Open a terminal.

Code:

ssh root@localhost 

If you have remote login enabled, you can login to any account you want...

Code:

su

Then type the password of the root account to gain a root shell

Code:

sudo su

Type your own password to gain a root shell

Code:

sudo sh

Type your own password to gain a root bourne shell


Or you could always just edit the file using sudo nano

Re: Can't install OpenModelica on OS X from MacPorts

OK. Thanks. The process was going OK (building, that is) but failed with paradiseo. Here are the three errors from the log file:


:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_math_paradiseo/paradiseo/work/paradiseo-1.3_beta2/paradiseo-eo/src/eoParticleBestInit.h:45:13: error: use of undeclared 'operator()'
:info:build             operator  ()(_pop[i]);
:info:build             ^
:info:build             this->


:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_math_paradiseo/paradiseo/work/paradiseo-1.3_beta2/paradiseo-eo/src/eoVelocity.h:50:13: error: use of undeclared 'operator()'
:info:build             operator  ()(_pop[i],i);
:info:build             ^
:info:build             this->


:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_math_paradiseo/paradiseo/work/paradiseo-1.3_beta2/paradiseo-eo/src/eoFlight.h:48:13: error: use of undeclared 'operator()'
:info:build             operator  ()(_pop[i]);
:info:build             ^
:info:build             this->

Do I need to contact someone with paradiseo and ask them to look into this?

Jerry

Re: Can't install OpenModelica on OS X from MacPorts

Please do. I think it would work if you "port install paradiseo configure.compiler=macports-gcc-4.4". The paradiseo sources really seem to hate clang/llvm which is the new OSX default.

Re: Can't install OpenModelica on OS X from MacPorts

Hello,

in general, you can simplify the building process to use MacPorts gcc 4.4 for OpenModelica and its dependencies (especially paradiseo; see sjoelund.se's comment):

Code:

sudo port install openmodelica-devel configure.compiler=macports-gcc-4.4

It works since several months for me.
I'm using OS 10.7.3 with the latest MacPorts version.

sgroehl

There are 0 guests and 0 other users also viewing this topic
You are here: