caught execution error in library function

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

caught execution error in library function

Postby i_am_ur_middlefinger » Wed Dec 11, 2013 7:11 pm

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: viewtopic.php?f=1&t=4747):

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 (C) 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'.

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
i_am_ur_middlefinger
 
Posts: 13
Joined: Wed Dec 11, 2013 6:54 pm

Re: caught execution error in library function

Postby HoutanBastani » Thu Dec 12, 2013 10:27 am

What's the output when you open terminal and type:
Code: Select all
echo $PATH


It should be a colon-separated list of directories and should include
Code: Select all
/usr/local/bin


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
Code: Select all
PATH=${PATH}:/usr/local/bin

in your .bashrc file or enter it at the terminal every time you open a new one. Now try
Code: Select all
brew doctor
Best,
Houtan
HoutanBastani
 
Posts: 197
Joined: Fri Jan 22, 2010 4:11 pm
Location: Paris, France

Re: caught execution error in library function

Postby i_am_ur_middlefinger » Fri Dec 13, 2013 9:21 am

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
i_am_ur_middlefinger
 
Posts: 13
Joined: Wed Dec 11, 2013 6:54 pm

Re: caught execution error in library function

Postby HoutanBastani » Fri Dec 13, 2013 9:42 am

At the terminal prompt type:
Code: Select all
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.
Best,
Houtan
HoutanBastani
 
Posts: 197
Joined: Fri Jan 22, 2010 4:11 pm
Location: Paris, France

Re: caught execution error in library function

Postby i_am_ur_middlefinger » Fri Dec 13, 2013 9:53 am

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
i_am_ur_middlefinger
 
Posts: 13
Joined: Wed Dec 11, 2013 6:54 pm

Re: caught execution error in library function

Postby HoutanBastani » Fri Dec 13, 2013 10:02 am

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:
Code: Select all
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"


What's the output of:
Code: Select all
ls -la /usr/local
Best,
Houtan
HoutanBastani
 
Posts: 197
Joined: Fri Jan 22, 2010 4:11 pm
Location: Paris, France

Re: caught execution error in library function

Postby i_am_ur_middlefinger » Fri Dec 13, 2013 10:11 am

I see.

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

[client206-84:~] matthias% ruby -e "$(curl -fsSL https://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.
i_am_ur_middlefinger
 
Posts: 13
Joined: Wed Dec 11, 2013 6:54 pm

Re: caught execution error in library function

Postby HoutanBastani » Fri Dec 13, 2013 10:29 am

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.
Code: Select all
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.
Best,
Houtan
HoutanBastani
 
Posts: 197
Joined: Fri Jan 22, 2010 4:11 pm
Location: Paris, France

Re: caught execution error in library function

Postby i_am_ur_middlefinger » Fri Dec 13, 2013 10:34 am

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 https://raw.github.com/mxcl/homebrew/go/install)"
Illegal variable name.
[client206-84:~] matthias%

sorry to be such a headache.

m.
i_am_ur_middlefinger
 
Posts: 13
Joined: Wed Dec 11, 2013 6:54 pm

Re: caught execution error in library function

Postby HoutanBastani » Fri Dec 13, 2013 10:45 am

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
Code: Select all
ls -la /usr/local
and send me the output

Also, at the command prompt, type:
Code: Select all
echo $SHELL
and send me the output
Best,
Houtan
HoutanBastani
 
Posts: 197
Joined: Fri Jan 22, 2010 4:11 pm
Location: Paris, France

Re: caught execution error in library function

Postby i_am_ur_middlefinger » Fri Dec 13, 2013 10:47 am

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.
i_am_ur_middlefinger
 
Posts: 13
Joined: Wed Dec 11, 2013 6:54 pm

Re: caught execution error in library function

Postby HoutanBastani » Fri Dec 13, 2013 11:03 am

type:
Code: Select all
bash

then type:
Code: Select all
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.
Best,
Houtan
HoutanBastani
 
Posts: 197
Joined: Fri Jan 22, 2010 4:11 pm
Location: Paris, France

Re: caught execution error in library function

Postby i_am_ur_middlefinger » Fri Dec 13, 2013 11:22 am

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 !
i_am_ur_middlefinger
 
Posts: 13
Joined: Wed Dec 11, 2013 6:54 pm

Re: caught execution error in library function

Postby HoutanBastani » Fri Dec 13, 2013 11:28 am

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.
Best,
Houtan
HoutanBastani
 
Posts: 197
Joined: Fri Jan 22, 2010 4:11 pm
Location: Paris, France

Re: caught execution error in library function

Postby i_am_ur_middlefinger » Fri Dec 13, 2013 11:31 am

understood, here's what terminal said after installed homebrew

Code: Select all
[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$


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.
i_am_ur_middlefinger
 
Posts: 13
Joined: Wed Dec 11, 2013 6:54 pm

Next

Return to Dynare help

Who is online

Users browsing this forum: No registered users and 6 guests