[ncl-install] Error on Mac when testing NCL

Benedikt Becsi benedikt.becsi at boku.ac.at
Sat Jan 7 06:22:48 MST 2017


Hey Kwesi,

thanks again for your advice. It still ran into the same problem when I softlinked the library in /ncl_6.3.0/lib/. With some additional testing I found out the following:
NCL only started when I put export DYLD_FALLBACK_LIBRARY_PATH=/usr/local/Cellar/gcc/6.3.0_1/lib/gcc/6 into my .bashrc file. Removing this line I received the same error as when I try to run the test script ng4ex gsun01n -clean so I assumed that the problem was with the libstdc++.6.dylib library in my /usr/lib/ folder. Originally it was only a softlink to the libstdc++.6.0.9.dylib library in the same folder. Since NCL was able to start when I put the export DYLD_FALLBACK_LIBRARY_PATH line into my .bashrc-file, but ng4ex produced the error, it is obvious that the ng4ex bin does not use the library specified in the .bashrc file, but rather the default on in /usr/lib/. So for now I got it to run by disabling the mac System Integrity Protection (SIP) and replacing the libstdc++.6.dylib softlink with the full library in usr/local/Cellar/gcc/6.3.0_1/lib/gcc/6/, which is a homebrew gcc version I installed. Now it works perfectly, also ncl does start without the export DYLD_FALLBACK_LIBRARY_PATH line in my .bashrc-file. 
However, this can't be an optimal solution, since I don't know which programs accessed the softlink in /usr/lib/ and can't get redirected to libstdc++.6.0.9.dylib anymore because i deleted the softlink. The real solution should be that I can tell ng4ex and ncl and all the other bins in the ncl environment that they have to access the library I specify in my .bashrc-file. Does anybody know if that's possible? From my testing I conclude that the .bashrc file only tells the NCL bin what to do.

Thanks to all for your help!


>>> Kwesi Quagraine <starskykwesi at gmail.com> 05.01.17 17.11 Uhr >>>
Kindly go into this folder rather;


cd /usr/local/ncl_6.3.0/lib 


sudo ln -s /location/given/by/locating/libstdc++.6.dylib .

 Also remember to exit your terminal and re-enter your terminal before starting ncl


Hope it helps. Cheer!!




On Thu, Jan 5, 2017 at 5:40 PM, Benedikt Becsi <benedikt.becsi at boku.ac.at> wrote:
Hi Kwesi, 

thanks for your quick response, I created softlinks to different locations of the libstdc++.6.dylib library (three locations where located by "locate library") in your suggested folder (dind't exist btw), but unfortunately I still got the same error message every time:

dyld: Symbol not found: __ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE
  Referenced from: /usr/local/ncl_6.3.0/bin/ncl
  Expected in: /usr/lib/libstdc++.6.dylib
 in /usr/local/ncl_6.3.0/bin/ncl

Any other idea?
Thank you very much!


>>> Kwesi Quagraine <starskykwesi at gmail.com> 05.01.17 13.57 Uhr >>>
Hello Benedikt, try these from your terminal;


locate libstdc++.6.dylib library


cd /usr/local/ncl_6.3.0/bin/lib 


sudo ln -s /location/given/by/locating/libstdc++.6.dylib .


Kindly remember to put the dot at the end of the last command, it is just soft linking the location of the file to the current directory.


Hope it helps. Cheer!!


On Thu, Jan 5, 2017 at 1:54 PM, Benedikt Becsi <benedikt.becsi at boku.ac.at> wrote:
Dear all,

installing ncl on Mac did work, but when I try to run the test script ng4ex gsun01n -clean I get the following error message:

dyld: Symbol not found: __ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE
  Referenced from: /usr/local/ncl_6.3.0/bin/ncl
  Expected in: /usr/lib/libstdc++.6.dylib
 in /usr/local/ncl_6.3.0/bin/ncl

here are the details about my setup environment:

Benedikts-MacBook-Pro:bin ich$ which ncl
/usr/local/ncl_6.3.0/bin/ncl
Benedikts-MacBook-Pro:bin ich$ ncl -V
6.3.0
Benedikts-MacBook-Pro:bin ich$ otool -L `which ncl`
/usr/local/ncl_6.3.0/bin/ncl:
    /usr/lib/libssl.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8)
    /usr/lib/libcrypto.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8)
    /System/Library/Frameworks/LDAP.framework/Versions/A/LDAP (compatibility version 1.0.0, current version 2.4.0)
    /opt/X11/lib/libfontconfig.1.dylib (compatibility version 10.0.0, current version 10.0.0)
    /usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
    /opt/X11/lib/libXrender.1.dylib (compatibility version 5.0.0, current version 5.0.0)
    /usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.5)
    /opt/X11/lib/libXpm.4.dylib (compatibility version 16.0.0, current version 16.0.0)
    /opt/X11/lib/libX11.6.dylib (compatibility version 10.0.0, current version 10.0.0)
    /opt/X11/lib/libXext.6.dylib (compatibility version 11.0.0, current version 11.0.0)
    /usr/local/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.22.0)
    /usr/local/lib/libgomp.1.dylib (compatibility version 2.0.0, current version 2.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
    /usr/local/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
Benedikts-MacBook-Pro:bin ich$ env | grep NCARG
NCARG_ROOT=/usr/local/ncl_6.3.0
Benedikts-MacBook-Pro:bin ich$ which gcc
/usr/local/Cellar/gcc/6.3.0_1/bin/gcc
Benedikts-MacBook-Pro:bin ich$ which gfortran
/usr/local/Cellar/gcc/6.3.0_1/bin/gfortran
Benedikts-MacBook-Pro:bin ich$ gfortran --version
GNU Fortran (Homebrew GCC 6.3.0_1) 6.3.0
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Benedikts-MacBook-Pro:bin ich$ gcc --version
gcc (Homebrew GCC 6.3.0_1) 6.3.0
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I put the following lines into my .bashrc file:

export NCARG_ROOT=/usr/local/ncl_6.3.0
export PATH=$NCARG_ROOT/bin:$PATH
export PATH=/usr/local/Cellar/gcc/6.3.0_1/bin:$PATH
export DYLD_FALLBACK_LIBRARY_PATH=/usr/local/Cellar/gcc/6.3.0_1/lib/gcc/6

There  seems to be a problem with my libstdc++.6.dylib library. The file in  the /usr/lib/ directory is just an alias and points to a file named  libstdc++.6.0.9.dylib. Could it be that ncl has problems with that  version of the library?

Thank you very much for the help!
All the best,
Benedikt Becsi
 
_______________________________________________
 ncl-install mailing list
 List instructions, subscriber options, unsubscribe:
 http://mailman.ucar.edu/mailman/listinfo/ncl-install
 




-- 
Try not to become a man of success but rather a man of value-Albert Einstein


University of Cape Coast|College of Agriculture and Natural Sciences|Department of Physics|
Team Leader|Recycle Up! Ghana|Technology Without Borders|
Other emails: kwesi.quagraine at ucc.edu.gh|kwesi.quagraine at teog.de|
Mobile: +233266173582

Skype: quagraine_cwasi
Twitter: @Pkdilly








 
 



 



-- 
Try not to become a man of success but rather a man of value-Albert Einstein


University of Cape Coast|College of Agriculture and Natural Sciences|Department of Physics|
Team Leader|Recycle Up! Ghana|Technology Without Borders|
Other emails: kwesi.quagraine at ucc.edu.gh|kwesi.quagraine at teog.de|
Mobile: +233266173582

Skype: quagraine_cwasi
Twitter: @Pkdilly








 
 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-install/attachments/20170107/e11d435a/attachment-0001.html 


More information about the ncl-install mailing list