Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#50868 closed defect (fixed)

_CGLGetCurrentContext not found when building ruby2.3 extensions

Reported by: davidfavor (David Favor) Owned by: kimuraw (kimura wataru)
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: Cc: mf2k (Frank Schima), chlangley
Port: ruby ruby23

Description

Attempting to build wpscan ruby2.3 dies with the dreaded + recurring "dyld: Symbol not found: _CGLGetCurrentContext" error.

Build log for ffi + mkmf attached.

Did a deinstall + reinstall + port select on Ruby. Likely overkill.

Paths for ruby + gem look correct...

imac> port select --list ruby
Available versions for ruby:
	none
	ruby23 (active)

imac> ruby --version
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15]

imac> ruby2.3 --version
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15]

imac> gem --version
2.5.1

imac> gem2.3 --version
2.5.1

Attachments (2)

ffi-build.log (1.7 KB) - added by davidfavor (David Favor) 8 years ago.
mkmf.log (2.5 KB) - added by davidfavor (David Favor) 8 years ago.

Download all attachments as: .zip

Change History (9)

Changed 8 years ago by davidfavor (David Favor)

Attachment: ffi-build.log added

Changed 8 years ago by davidfavor (David Favor)

Attachment: mkmf.log added

comment:1 Changed 8 years ago by davidfavor (David Favor)

Unable to modify header to set port=ruby + owner=raimue@…

comment:2 Changed 8 years ago by davidfavor (David Favor)

This ticket appears to be a duplicate of https://trac.macports.org/ticket/50806 so likely can be closed + worked in the first ticket.

My apologies for missing the first ticket, when I opened this one.

comment:3 Changed 8 years ago by mf2k (Frank Schima)

Resolution: duplicate
Status: newclosed

comment:4 Changed 8 years ago by mojca (Mojca Miklavec)

Cc: mf2k@… chlangley@… kimuraw@… added
Port: ruby added
Resolution: duplicate
Status: closedreopened

I'm reopening this ticket because what was added to #50806 doesn't seem to be related to gnuplot at all and I have no clue where to look; gnuplot seems to work for so many others and I also suspect some DYLD_LIBRARY_PATH being set from some random place.

According to Clemens:

my guess is that this is caused by ruby's build system setting DYLD_LIBRARY_PATH. I've seen the problem when a ruby thingy I tried to compile was calling pkg-config, which crashed because of DYLD_LIBRARY_PATH I worked around it at the time by replacing ${prefix}/bin/pkg-config with "unset DYLD_LIBRARY_PATH; exec ./pkg-config.bin "$@"", but for this specific instance it's not really clear where that would have to be fixed.

David, please repeat the relevant parts that you wrote to #50806 because I'll close that other ticket.

comment:5 Changed 8 years ago by mojca (Mojca Miklavec)

Cc: kimuraw@… removed
Owner: changed from macports-tickets@… to kimuraw@…
Port: ruby23 added
Status: reopenednew

comment:6 Changed 8 years ago by kimuraw (kimura wataru)

Resolution: fixed
Status: newclosed

I fixed this problem at r148654 (port:ruby23 2.3.1_1).

Try gem install ffi after port upgrade ruby23.

I think this is a bug in mkmf.rb and reported to ruby core-team about this problem. https://bugs.ruby-lang.org/issues/12379 (ja)

comment:7 Changed 8 years ago by kimuraw (kimura wataru)

This problem was fixed in upstream ruby's trunk and 2.3-branch

The next release version (ruby-2.3.2) will work fine without this patch.

Note: See TracTickets for help on using tickets.