Problems with installation using Homebrew

Install support for openEMS

Moderators: thorsten, sebastian

Post Reply
estennw
Posts: 1
Joined: Tue 18 Apr 2017, 14:19

Problems with installation using Homebrew

Post by estennw » Tue 18 Apr 2017, 16:02

I have a problem with installing openEMS using Homebrew. I am not sure if the problem is Homebrew related or not, but I cannot figure out where the install fails. As suggested, I try to install the package using the command

Code: Select all

brew install --HEAD https://raw.github.com/thliebig/openEMS-Project/master/brew/openEMS.rb
I've also tried

Code: Select all

brew install --HEAD openEMS
Both methods yields the following output after Homebrew runs "make"

Code: Select all

==> make
Last 15 lines from /Users/username/Library/Logs/Homebrew/openems/02.make:
         ^
1 error generated.
make[5]: *** [src/CMakeFiles/CSXCAD.dir/CSRectGrid.cpp.o] Error 1
make[5]: *** Waiting for unfinished jobs....
In file included from /tmp/openems-20170418-84668-1k6bknf/CSXCAD/src/CSPrimitives.cpp:27:
/tmp/openems-20170418-84668-1k6bknf/CSXCAD/src/CSFunctionParser.h:22:10: fatal error: 'fparser.hh' file not found
#include "fparser.hh"
         ^
1 error generated.
make[5]: *** [src/CMakeFiles/CSXCAD.dir/CSPrimitives.cpp.o] Error 1
make[4]: *** [src/CMakeFiles/CSXCAD.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [CSXCAD-prefix/src/CSXCAD-stamp/CSXCAD-build] Error 2
make[1]: *** [CMakeFiles/CSXCAD.dir/all] Error 2
make: *** [all] Error 2
 
Do not report this issue to Homebrew/brew or Homebrew/core!
Is this any known issue? Ignoring the error and running

Code: Select all

mkdir ~/opt
ln -s /usr/local/Cellar/openEMS/HEAD ~/opt/openEMS
does not work. The alias leads nowhere, and the no openEMS-related files are added to /usr/local/cellar. Since opt is an alias leading nowhere, trying to add the path;

Code: Select all

addpath('~/opt/openEMS/share/openEMS/matlab');
addpath('~/opt/openEMS/share/CSXCAD/matlab');
fails.

For the record, I've also tried to add the path directly from the Library, i.e.

Code: Select all

addpath('/Users/username/Library/Caches/Homebrew/openEMS--git/CSXCAD/matlab')
addpath('/Users/username/Library/Caches/Homebrew/openEMS--git/openEMS/matlab')
When trying this, the paths are added successfully. Then the first steps tutorial. InitCSX works, InitFDTD('NrTS', 0, 'EndCriteria', 0) works fine, but RunOpenEMS( '.', 'nonexistant.xml', '' ) leads to the following output

Code: Select all

/Users/username/Library/Caches/Homebrew/openEMS--git/openEMS/matlab/private/../../openEMS.sh: line 10: /Users/username/Library/Caches/Homebrew/openEMS--git/openEMS/matlab/private/../../openEMS: No such file or directory
/Users/username/Library/Caches/Homebrew/openEMS--git/openEMS/matlab/private/../../openEMS.sh: line 10: exec: /Users/username/Library/Caches/Homebrew/openEMS--git/openEMS/matlab/private/../../openEMS: cannot execute: No such file or directory
Any ideas? Thanks

thorsten
Posts: 1430
Joined: Mon 27 Jun 2011, 12:26

Re: Problems with installation using Homebrew

Post by thorsten » Tue 18 Apr 2017, 18:16

I think I have seen this problem before, but I'm not sure.
The problem is that homebrew and cmake somehow do not understand that fparser has to be compiled first, otherwise the dependencies are broken.
Unfortunately I do not have any Mac and thus cannot really help you.
As I have stated in the readme, Mac OS is highly experimental and you are pretty much on your own...
I can only recommend at this time you install a virtual machine (maybe VirtualBox) with a modern Linux OS inside (maybe Ubuntu) and test openEMS there...

regards
Thorsten

Post Reply