Opened 9 years ago
Closed 8 years ago
#50806 closed defect (duplicate)
gnuplot on ElCapitan fails due to Symbol not found
Reported by: | chlangley | Owned by: | mojca (Mojca Miklavec) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | ||
Port: | gnuplot |
Description (last modified by mojca (Mojca Miklavec))
Hello:
gnuplot port installs but then fails to run complaining of missing links.
Here is the story:
on OSX 10.11.3 MBP
| => sudo port install gnuplot ---> Computing dependencies for gnuplot ---> Fetching archive for gnuplot ---> Attempting to fetch gnuplot-5.0.3_0+aquaterm+luaterm+pangocairo+wxwidgets+x11.darwin_15.x86_64.tbz2 from http://packages.macports.org/gnuplot ---> Attempting to fetch gnuplot-5.0.3_0+aquaterm+luaterm+pangocairo+wxwidgets+x11.darwin_15.x86_64.tbz2 from http://sea.us.packages.macports.org/macports/packages/gnuplot ---> Attempting to fetch gnuplot-5.0.3_0+aquaterm+luaterm+pangocairo+wxwidgets+x11.darwin_15.x86_64.tbz2 from http://lil.fr.packages.macports.org/gnuplot ---> Fetching distfiles for gnuplot ---> Verifying checksums for gnuplot ---> Extracting gnuplot ---> Applying patches to gnuplot ---> Configuring gnuplot ---> Building gnuplot ---> Staging gnuplot into destroot ---> Installing gnuplot @5.0.3_0+aquaterm+luaterm+pangocairo+wxwidgets+x11 ---> Activating gnuplot @5.0.3_0+aquaterm+luaterm+pangocairo+wxwidgets+x11 ---> Cleaning gnuplot ---> Updating database of binaries ---> Scanning binaries for linking errors ---> No broken files found. ________________________________________________________________________________ | ~ @ rootless6 (chuck) | => gnuplot dyld: Symbol not found: _CGLGetCurrentContext Referenced from: /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo Expected in: /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL in /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo Trace/BPT trap: 5
Change History (10)
comment:1 Changed 9 years ago by mojca (Mojca Miklavec)
Description: | modified (diff) |
---|---|
Keywords: | _CGLGetCurrentContext removed |
Owner: | changed from macports-tickets@… to mojca@… |
Version: | 2.3.4 |
comment:2 Changed 9 years ago by davidfavor (David Favor)
https://trac.macports.org/ticket/50868 cover what may be the same problem.
The machine I'm using had a fresh install of El Capitan (no upgrade) + has XCode up to date.
While I agree /System/Library/Frameworks is badly broken, having suggestions about how to fix this would be great.
comment:3 Changed 9 years ago by davidfavor (David Favor)
Doing some additional testing.
The ffi gem builds clean with gem2.2 + breaks with gem2.3, see logs in ticket #50868 for more detail.
Here are the exact steps I went through:
1) git clone https://github.com/wpscanteam/wpscan.git wpscan.git
2) cd wpscan.git
3) works: gem2.2 install bundler && bundle install
4) fails: gem2.3 install bundler && bundle install
Looking through the Portfile for both ruby22 + ruby23 both configure.args settings look the same to me, so unsure why ruby22 references the correct libraries + ruby23 throws an error when building ffi.
comment:4 Changed 9 years ago by mojca (Mojca Miklavec)
You need to get a working version of frameworks that reside in /System/Library/Frameworks
from somewhere. The easiest option would probably be reinstalling the OS X, but you could just as well copy those files from undamaged copy of the OS (or theoretically from installation medium if you are familiar with tools to work with these files – probably not for a newbie). But I'm the wrong person to advise. I have no clue how you ended up with that situation.
comment:5 Changed 9 years ago by davidfavor (David Favor)
This same problem exists two I recently acquired.
Both came with El Capitan pre-installed.
Seems unlikely two factory fresh Macs were shipped with /System/Library/Frameworks corrupted.
comment:6 Changed 9 years ago by davidfavor (David Favor)
Just build ruby from source (outside Macports).
Ruby builds + tests good.
Installation of wpscan worked first time.
No problems reported building ffi, so it appears something is a bit off in the Portfile.
And I see no major differences between the two Portfiles for ruby22 (which works) + ruby23 (which fails).
comment:7 Changed 9 years ago by davidfavor (David Favor)
So the temporary fix appears to be build from source.
comment:8 Changed 9 years ago by davidfavor (David Favor)
Work around till Macports Ruby is fixed. This installs ruby in /runtime to separate from Macports.
1) wget https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.1.tar.gz
2) tar -xf ruby-2.3.1.tar.gz
3) cd ruby-2.3.1
4) ./configure --prefix=/runtime/osx-10.11
5) make && make check && make install
6) cd ..
7) git clone https://github.com/wpscanteam/wpscan.git wpscan.git
8) cd wpscan.git
9) sudo /runtime/osx-10.11/bin/gem install bundler && bundle install
# no errors, ffi installs quietly
10) /runtime/osx-10.11/bin/ruby ./wpscan.rb http://FastSEOHosting.com
Works perfectly well. _
This suggest to me the comments about "broken Frameworks" may be correct + the fix then is to decouple Ruby from these "Frameworks", as normal source build works well.
Many gems have ffi as a dependency, so till this is fixed building from source appears to be the only answer.
comment:9 Changed 8 years ago by neverpanic (Clemens Lang)
Ruby's gem build systems are known to set DYLD_LIBRARY_PATH. In this case DYLD_LIBRARY_PATH is probably set to /opt/local/lib which contains additional libraries when you try to build your gem. The correct fix is not to set DYLD_LIBRARY_PATH; it's almost always wrong to do so and leads to problems like the one you've seen.
comment:10 Changed 8 years ago by mojca (Mojca Miklavec)
Resolution: | → duplicate |
---|---|
Status: | new → closed |
chlangley, can you please make sure that you don't have DYLD_LIBRARY_PATH
set anywhere?
Everyone else ... can you please copy the relevant parts about ruby (like comments 6 and 8) to the port that started about ruby (#50868) and continue the discussion there? There's probably nothing I can do about gnuplot.
For future reference: please CC the port maintainer (
port info gnuplot
). You can also add three braces to start and stop the code.But this particular problem looks like something is fundamentally broken on your system. In particular something seems to be broken in
/System/Library/Frameworks
. I have no clue how this could have happened or what you can do about that (you can either copy the frameworks from another machine with a working OS or try to reinstall your OS). Please ask others for advice.