Caught execution error in library function

Hello there,

my name is matthias, but i just love my reddit user name.

regarding my dynare problem, I’m running MAC OS X 10.7.5, Octave 3.6.4, Dynare 4.3.3, which I have installed with MacPorts.

Here’s my problem (I’ve tried everything that justus did with his similar problem here: Fail to start: execution error in library function):

octave:1> addpath /Applications/Dynare/4.3.3/matlab
octave:2> dynare Newperspectives.mod

Configuring Dynare …
error: caught execution error in library function
error: called from:
error: /Applications/Dynare/4.3.3/matlab/dynare_config.m at line 213, column 10
error: /Applications/Dynare/4.3.3/matlab/dynare.m at line 68, column 12
octave:2>

I don’t know what to do. I’m afraid I’m too blond for getting things done, I have tried to install dynare with homebrew, but unfortunately I cannot get homebrew installed properly, which really bugs me. (my terminal: brew doctor, brew: Command not found.)
home brew installation seemed to be fine -> “ohai “Installation successful!” puts “You should run `brew doctor’ before you install anything.” puts “Now type: brew help””

I have tried to download the latest snapshot and did this:

octave:1> addpath /Applications/Dynare/4.4_2013-10-31/matlab
octave:2> cd /Users/matthias/desktop
octave:3> dynare example1

Configuring Dynare …
error: caught execution error in library function
error: called from:
error: /Applications/Dynare/4.4_2013-10-31/matlab/dynare_config.m at line 228, column 10
error: /Applications/Dynare/4.4_2013-10-31/matlab/dynare.m at line 68, column 12

//

Here’s what the terminal says when I type octave:

[client245-121:~] matthias% octave
GNU Octave, version 3.6.4
Copyright © 2013 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. For details, type `warranty’.

Octave was configured for “x86_64-apple-darwin11.4.2”.

Additional information about Octave is available at octave.org.

Please contribute if you find this software useful.
For more information, visit octave.org/get-involved.html

Read octave.org/bugs.html to learn how to submit bug reports.

For information about changes from previous versions, type `news’.

octave:1>

it seems to me that octave should be running smoothly, but again, I’m confused.

maybe somebody could be so kind and help me, it’s appreciated, if I shall try something different or you need more info, please just let me know

thank you very much in advance,

matthias

PS i have also installed X11

What’s the output when you open terminal and type:

It should be a colon-separated list of directories and should include

If the homebrew installation was successful and the brew command doesn’t work, then this is probably not in your path. To fix it you can enter

in your .bashrc file or enter it at the terminal every time you open a new one. Now try brew doctor

hey houtan,

thank you for your quick reply, unfortunately it didn’t work, here’s what terminal said when I’ve followed your instructions

[client206-84:~] matthias% echo PATH /opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/X11/bin:/usr/texbin [client206-84:~] matthias% PATH={PATH}:/usr/local/bin
PATH=/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/X11/bin:/usr/texbin:/usr/local/bin: Command not found.
[client206-84:~] matthias% brew doctor
brew: Command not found.
[client206-84:~] matthias%

I feel live giving up, currently considering running ubuntu on my mac, although I’m currently unsure if that would be a smart idea.

thank you, best

matthias

At the terminal prompt type:ls -la /usr/local/bin/brew and send me the output.

With regards to Ubuntu installations on Macs, the number and severity of the problems you’ll have depend on your mac. They range from annoying problems to no problems at all. There are wiki pages that describe in detail the steps you’ll need to take to get it all working. It’s clear that support for open source software on a Mac is not as developed as on GNU/Linux systems, so there’ll always be more work to do to get those things working. Though, in my opinion, Homebrew makes it fairly easy to do, it is not an Apple product and hence will never work as well as the package managers distributed with GNU/Linux systems. If the most important thing to you is working on an open platform, then it would behoove you to change.

hey houtan,

blimey, you’re quick in response, it’s appreciated.

here’s the output

[client206-84:~] matthias% ls -la /usr/local/bin/brew
ls: /usr/local/bin/brew: No such file or directory
[client206-84:~] matthias%

looks like things didn’t work out.

I just don’t want to rip matlab and instead work with octave, because I respect other peoples copyrights (also I used to work in the music industry, so copyrights mean something to me).

I’m not particularly keen on working with ubuntu as I have no clue, all I want to do is solve some basic DSGE models with dynare and have a look at the graphical output, that’s it.

so you prefer homebrew over macportsm ja ?

thanks again for all your help.

matthias

Yes, I prefer Homebrew to MacPorts because Homebrew uses the native mac packages and libraries whereas macports replicates them by default and I don’t like having multiple libraries and programs laying around, which leads to all sorts of confusing issues.

Here, clearly, the Homebrew installation was not successful. Just to be clear, this is what you typed to install Homebrew:ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"

What’s the output of:ls -la /usr/local

I see.

if I’ll put in the installation code, terminal says:

[client206-84:~] matthias% ruby -e "$(curl -fsSL raw.github.com/mxcl/homebrew/go/install)"
Illegal variable name.

[client206-84:~] matthias% ls -la /usr/local
total 0
drwxr-xr-x 9 root wheel 306 12 Okt 2012 .
drwxr-xr-x@ 15 root wheel 510 10 Dez 23:05 …
drwxr-xr-x 37 root wheel 1258 12 Okt 2012 bin
drwxr-xr-x 3 root wheel 102 12 Mai 2012 etc
drwxr-xr-x 4 root wheel 136 11 Sep 2011 itms
drwxr-xr-x 3 root wheel 102 11 Sep 2011 juniper
drwxr-xr-x 4 root wheel 136 12 Okt 2012 lib
drwxr-xr-x 4 root wheel 136 4 Apr 2012 share
drwxr-xr-x 4 root wheel 136 12 Okt 2012 texlive
[client206-84:~] matthias%

cheers, m.

There is something wrong with your setup if the Homebrew installation doesn’t even launch giving you that “Illegal variable name” error.

Also, you have previously installed to /usr/local (juniper and itms directories, and texlive, which homebrew recommends you install). Anyway, the point is that /usr/local is owned by the root user, so you cannot install to it without running as the super user on your system (i.e. using sudo before the command that will install to this directory). Hence, you should change the owner of /usr/local to be your user name and the group to be admin. i.e.

sudo chown matthias:admin /usr/local/ sudo chown -R matthias:admin /usr/local/bin sudo chown -R matthias:admin /usr/local/lib sudo chown -R matthias:admin /usr/local/share

Anyway, note that switching to Ubuntu will entail interacting with the terminal more than you do in OS X.

yeah, I’m just sitting in class and one guy has his linux comp over the beamer, …now I’m really frightened.

I probably won’t install ubuntu, here’s what terminal said after doing what you’ve suggested:

[client206-84:~] matthias% sudo chown matthias:admin /usr/local/
sudo chown -R matthias:admin /usr/local/bin
sudo chown -R matthias:admin /usr/local/lib
sudo chown -R matthias:admin /usr/local/share[client206-84:~] matthias% sudo chown -R matthias:admin /usr/local/bin
[client206-84:~] matthias% sudo chown -R matthias:admin /usr/local/lib
[client206-84:~] matthias% sudo chown -R matthias:admin /usr/local/share
[client206-84:~] matthias%
[client206-84:~] matthias% ruby -e "$(curl -fsSL raw.github.com/mxcl/homebrew/go/install)"
Illegal variable name.
[client206-84:~] matthias%

sorry to be such a headache.

m.

Sorry to be unclear. The commands I gave you were just going to fix the permissions on your installation directories so that, once we figure out the illegal variable problem, we’ll be able to run the installation script. To make sure it worked, at the command prompt type ls -la /usr/local and send me the output

Also, at the command prompt, type:echo $SHELL and send me the output

no sweat, you’re helping me, so it’s all good

here’s the output

[client206-84:~] matthias% ls -la /usr/local
total 0
drwxr-xr-x 9 matthias admin 306 12 Okt 2012 .
drwxr-xr-x@ 15 root wheel 510 10 Dez 23:05 …
drwxr-xr-x 37 matthias admin 1258 12 Okt 2012 bin
drwxr-xr-x 3 root wheel 102 12 Mai 2012 etc
drwxr-xr-x 4 root wheel 136 11 Sep 2011 itms
drwxr-xr-x 3 root wheel 102 11 Sep 2011 juniper
drwxr-xr-x 4 matthias admin 136 12 Okt 2012 lib
drwxr-xr-x 4 matthias admin 136 4 Apr 2012 share
drwxr-xr-x 4 root wheel 136 12 Okt 2012 texlive
[client206-84:~] matthias%

[client206-84:~] matthias% echo $SHELL
/bin/tcsh

m.

type:bash
then type:ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"
Also, in the future, please enclose the results in the Code brackets (see the code button at the top of your reply box). it makes it easier to read.

ok, will use the code button here for upcoming results,

just a quickie, it’s installing, …man, that makes me so happy, you cannot believe.

so after the installation I’ll run the “sudo chown” commands you’ve given me, right ?

THANK YOU !

No. Homebrew will correctly set the permissions it needs, though they’ll be the same as what I told you.

After that, you’ll change your path to exclude all of the MacPorts paths.

Then you’ll install octave.

Then Dynare should work.

Also, why are you using t shell? The mac default is bash.

understood, here’s what terminal said after installed homebrew

[code][client206-84:~] matthias% bash
bash-3.2$ ruby -e “$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)”
==> This script will install:
/usr/local/bin/brew
/usr/local/Library/…
/usr/local/share/man/man1/brew.1
==> The following directories will be made group writable:
/usr/local/etc
==> The following directories will have their group set to admin:
/usr/local/etc

Press ENTER to continue or any other key to abort
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/etc
Password:
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/etc
==> Downloading and installing Homebrew…
remote: Counting objects: 142830, done.
remote: Compressing objects: 100% (49896/49896), done.
remote: Total 142830 (delta 97584), reused 136858 (delta 91877)
Receiving objects: 100% (142830/142830), 33.21 MiB | 146 KiB/s, done.
Resolving deltas: 100% (97584/97584), done.
From https://github.com/mxcl/homebrew

  • [new branch] master -> origin/master
    HEAD is now at 03fd80f dirt 1.0 (new formula)
    ==> Installation successful!
    You should run `brew doctor’ before you install anything.
    Now type: brew help
    bash-3.2$ brew doctor
    Warning: You have MacPorts or Fink installed:
    /opt/local/bin/port

This can cause trouble. You don’t have to uninstall them, but you may want to
temporarily move them out of the way, e.g.

sudo mv /opt/local ~/macports

Warning: Unbrewed static libraries were found in /usr/local/lib.
If you didn’t put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected static libraries:
/usr/local/lib/libhelium_mac.a

Warning: You have a non-Homebrew ‘pkg-config’ in your PATH:
/opt/local/bin/pkg-config

./configure may have problems finding brew-installed packages using
this other pkg-config.
bash-3.2$ [/code]

shall I proceed with the octave installation ?

also how to I excl macport path, any hint ?

I dont know why t-shell instead of bash, I feel like the “i dont know what im doing” dog in front of a pc.

m.

Did you just install macports to install octave? If so, just uninstall it (follow the macports instructions on how to do this). Otherwise, do what brew doctor tells you. Namely:

Then your path won’t matter because you will no longer have macports in the regular place. But, you can still remove it from your path by doing:

Then install octave

yup, i just installed macports for installing octave. I will uninstall it.

I am able to start octave in terminal, but it’s probably better to re-install it with homebrew, eh. this is what I will do after uninstalling macports.

thanks so much for your help.

I’ll write in here if things are up and running.

thanks again,

matthias

uninstalled macports, got brew doctor telling me I’m ready to brew, installed octave, I start octave:

[code][client194-250:~] matthias% octave
GNU Octave, version 3.6.4
Copyright © 2013 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. For details, type `warranty’.

Octave was configured for “x86_64-apple-darwin11.4.2”.

Additional information about Octave is available at http://www.octave.org.

Please contribute if you find this software useful.
For more information, visit http://www.octave.org/get-involved.html

Read http://www.octave.org/bugs.html to learn how to submit bug reports.

For information about changes from previous versions, type `news’.[/code]

I add the path and dynare that lovely model (the exact same code that worked in class on a PC w/ matlab), I get this here:

[code]octave:1> addpath /Applications/Dynare/4.3.3/matlab
octave:2> dynare Newperspectives.mod

Configuring Dynare …
error: caught execution error in library function
error: called from:
error: /Applications/Dynare/4.3.3/matlab/dynare_config.m at line 213, column 10
error: /Applications/Dynare/4.3.3/matlab/dynare.m at line 68, column 12
octave:2> [/code]

now, I’m back from where I started, looks like i ran in circles.

any idea how to proceed ?

Thanks, cheers, m

Yes, follow the directions in
[Fail to start: execution error in library function)

and download the mex functions here
dynare.org/houtan/octave/

This should work.

oh, ok, makes sense, let me try first thing after i got home.

thanks as usual, m.