OK, I guess that I can get this to work, as long as I make it inside of MacPorts and set<br><br>export DYLD_FALLBACK_LIBRARY_PATH=/opt/local/lib<br><br>I'll start another thread soon with some working port files for gtk-sharp2.
<br><br>Bob<br><br>ps If anyone know what I need to set to get it to work in my home directory I would still like to know.<br><br><div><span class="gmail_quote">On 9/15/07, <b class="gmail_sendername">bob spamnot</b> <
<a href="mailto:bob.spamnot@gmail.com">bob.spamnot@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I am trying to build
gtk-sharp-2.0 from source since there is no working port of this (and there isn't on Fink either at the moment). If I can get this to work I can make a portfile for it, so I guess it does relate to Macports:-). But I cannot get the dynamic library situation sorted. In fact I am quite mystified by the apple DYLN_LIBRARY_PATH variable. Any help or pointers will be greatly appreciated. Sorry about the long post, I've tried to condense it down. Here is the steps I have done (note I am on a PowerBook G4, OS X
10.4.10, XCode 2.4.1):<br><br>1a. Install gnome: sudo port install gnome<br><br>Actually I haven't (yet) got it to fully install but it makes it most of the way (certainly far enough for the bits needed by gtk-sharp-2.0
).<br><br>1b. Install mono: sudo port install mono<br><br>2. Download gtk-sharp from gnome snv to a local src directory. I've<br>tried both the HEAD version and tagged version 2.10.2.<br><br>3. Make it in the following way:
<br><br>bash> echo $PATH<br>usr/local/bin:/opt/local/bin:/opt/local/sbin:/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin<br>bash> ./configure --prefix=/Users/name/local-sharp<br>bash> make<br>bash> make install<br>
<br>This all works, so now gtk-sharp is install in local-sharp in my home directory.<br><br>4. Now I try to compile a simple program:<br><br>bash> which mcs<br>mcs is hashed (/opt/local/bin/mcs)<br><br>bash> export PKG_CONFIG_PATH=/opt/local/lib/pkgconfig:/usr/X11R6/lib/pkgconfig:/Users/name/local-sharp/lib/pkgconfig
<br><br>bash> mcs -pkg:gtk-sharp-2.0 HelloWorldGtk.cs <br><br>bash> mono HelloWorldGtk.exe <br><br>** (HelloWorldGtk.exe:10680): WARNING **: The following assembly referenced from /Users/name/src/gtk-sharp-cvs/test/HelloWorldGtk.exe could not be loaded:
<br> Assembly: gtk-sharp (assemblyref_index=1)<br> Version: <a href="http://2.10.0.0" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">2.10.0.0</a><br> Public Key: 35e10195dab3c99f
<br>System error: Unknown error: 0<br><br><br>** (HelloWorldGtk.exe:10680): WARNING **: Could not load file or assembly 'gtk-sharp, Version=
<a href="http://2.10.0.0" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">2.10.0.0</a>, Culture=neutral, PublicKeyToken=35e10195dab3c99f' or one of its dependencies.<br><br>Unhandled Exception:
System.IO.FileNotFoundException: Could not load file or assembly 'gtk-sharp, Version=
<a href="http://2.10.0.0" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">2.10.0.0</a>, Culture=neutral, PublicKeyToken=35e10195dab3c99f' or one of its dependencies.<br>File name: "gtk-sharp, Version=
<a href="http://2.10.0.0" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">2.10.0.0</a>, Culture=neutral, PublicKeyToken=35e10195dab3c99f"
<br><br>OK, I guess I need to set DYLD_LIBRARY_PATH <br>bash> export DYLD_LIBRARY_PATH=/opt/local/lib:/Users/name/local-sharp/lib (note leaving out /opt/local/lib doesn't work either)<br><br>bash> mono HelloWorldGtk.exe
<br>dyld: Symbol not found: __cg_jpeg_resync_to_restart<br> Referenced from: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO<br> Expected in: /opt/local/lib/libJPEG.dylib
<br><br>Trace/BPT trap<br><br>Here is where I'm stuck. I've tried lots of variations but they all either give me this error or they cannot find gtk-sharp-2.0 or the regular gtk libs (which are in /opt/local/lib). I'll spare you the details of the other variations except one. If I set DYLD_LIBRARY_PATH=/opt/local/lib and just try to use eog or mcs I get this same error (note they both work fine if DYLN is not set).
E.G.:<br><br>bash> export DYLD_LIBRARY_PATH=/opt/local/lib<br>bash> eog<br>dyld: Symbol not found: __cg_jpeg_resync_to_restart<br> Referenced from: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
<br> Expected in: /opt/local/lib/libjpeg.62.dylib<br><br>Trace/BPT trap<br>bash> mcs HelloWorld.cs (very simple helloworld which just writes to console and works if DYLN not set)<br>dyld: Symbol not found: __cg_jpeg_resync_to_restart
<br> Referenced from: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO<br> Expected in: /opt/local/lib/libJPEG.dylib<br><br>Trace/BPT trap<br><br>This seems completely bizarre to me. Both eog and mcs were made by Macports and linked against stuff in /opt/local/lib, so why should adding /opt/local/lib to DYLD_LIBRARY_PATH make libJPEG look into the framework listed above. Maybe someone could explain to me what DYLN_LIBRARY_PATH is doing (the man page doesn't really help)?
<br><br>I've try searching google on the above "Symbol not found" error and get lots of hits (so I'm not alone) but none of the suggestions seem to help. I'd be glad to show some of the other things I've tried but this post is long enough and I'm hoping someone will have an easy answer:-) I hope I was clear enough, feel free to ask for clarification.
<br><br>Thanks,<br><span class="sg">Bob<br><br>
</span></blockquote></div><br>