Discussion:
[Gc] Missing symbols error when _dyld_bind_fully_image_containing_address is called on OSX
Kjetil Matheussen
2016-07-13 08:14:34 UTC
Permalink
Hi all,

I'm compiling a program (users.notam02.no/~kjetism/radium) for osx which
uses bdwgc.

But when I run the program I get this error:

dyld: _dyld_bind_fully_image_containing_address() error
dyld: Symbol not found:
__ZN22QWindowSystemInterface19registerTouchDeviceEP12QTouchDevice
Referenced from:
/Volumes/samba_share/Radium.app/Contents/MacOS/./../lib/QtWebKit
Expected in: /Volumes/samba_share/Radium.app/Contents/MacOS/./../lib/QtGui
in /Volumes/samba_share/Radium.app/Contents/MacOS/./../lib/QtWebKit
Trace/BPT trap: 5

It seems like Qt5 from macports has an unresolved symbol. Normally, this
shouldn't be a problem since I'm not calling that function.

But, the error happens because bdwgc
calls _dyld_bind_fully_image_containing_address
during GC_INIT().[1]

To solve this problem, is it safe to just remove that call to
'_dyld_bind_fully_image_containing_address'
in bdwgc? I know that I don't store pointers used by the GC in any
dynamically loaded
libraries, and in my limited knowledge about the gc, that's the only reason
bdwgc has
for calling this function... There should be a shorter startup time as well
for the program when doing
this.

And as far as I can see, it works for me to remove the
call to '_dyld_bind_fully_image_containing_address' in bdwgc.
The program runs fine and there are no crashes so far,
but maybe it's not safe in the long run? Hopefully someone
who knows more than me can comment on this.


[1] Same thing happens if I set the DYLD_BIND_AT_LAUNCH
environment variable, but then the error shows up before GC_INIT() is
called.

Loading...