Hi, Alan,

On Jan 25, 2010, at 21:45 , Alan W. Irwin wrote:

> On 2010-01-25 15:58-0800 David MacMahon wrote:
>
>> If any curious souls out there can figure this out I'd sure
>> appreciate it.  I'm happy that it works with WITH_FREETYPE=ON because
>> that's what I prefer, but I'm also perplexed as to why the build
>> behaves differently with WITH_FREETYPE=OFF.
>
> From the detailed results you gave me off list, I figured it might  
> be due to
> your adopted DYLD_LIBRARY_PATH that did not refer to your non-standard
> (macports) locations for libfreetype.  Let us know whether if fixing
> that makes a difference.

I'm sorry to say that it does not make a helpful difference.  I think  
it might be a little bit of a red herring in that I think Macs do  
have their own form of embedded rpath-type info in the executables  
and shared libraries.  How else would this work?...

$ export DYLD_LIBRARY_PATH=fubar

$ echo $DYLD_LIBRARY_PATH
fubar

# Truncated lines to avoid email wrapping/mangling
$ otool -L /opt/local/bin/octave | cut -c1-50
/opt/local/bin/octave:
         /opt/local/lib/octave-3.2.3/liboctinterp.dylib (c
         /opt/local/lib/octave-3.2.3/liboctave.dylib (comp
         /opt/local/lib/octave-3.2.3/libcruft.dylib (compa
         /opt/local/lib/libmetis.4.dylib (compatibility ve
         /opt/local/lib/liblapack.dylib (compatibility ver
         /opt/local/lib/libptcblas.dylib (compatibility ve
         /opt/local/lib/libptf77blas.dylib (compatibility
         [snip]

Installing PLplot from the "bad" (i.e. WITH_FRETYPE=OFF) build tree,  
I get a bus error if I use the xcairo driver with DYLD_LIBRARY_PATH  
set as "usual" (for me) OR set to empty. If I prepend "/opt/local/ 
lib" to DYLD_LIBRARY_PATH, I get an "Unable to load driver" error  
message; better than a bus error, but not by much...

$ DYLD_LIBRARY_PATH= ./x01c -dev xcairo
PLplot library version: 5.9.5
Bus error

$ DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH ./x01c -dev xcairo
PLplot library version: 5.9.5
Bus error

$ DYLD_LIBRARY_PATH=/opt/local/lib:$DYLD_LIBRARY_PATH ./x01c -dev xcairo
PLplot library version: 5.9.5
Unable to load driver: cairo.

*** PLPLOT ERROR, IMMEDIATE EXIT ***
Unable to load driver
Program aborted

I think if I rebuild with pldebug enabled, then I might get  
informational output from line 3247 of plcore.c...

pldebug( "plLoadDriver", "lt_dlopenext failed because of "
     "the following reason:\n%s\n", lt_dlerror());

Interestingly, installing PLplot from the "good" (i.e.  
WITH_FREETYPE=ON) build tree, works with my DYLD_LIBRARY_PATH setting  
or setting it to nothing...

$ DYLD_LIBRARY_PATH= ./x01c -dev xcairo
PLplot library version: 5.9.5

$ DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH ./x01c -dev xcairo
PLplot library version: 5.9.5

...but it fails to load if I prepend /opt/local/lib to  
DYLD_LIBRARY_PATH...

$ DYLD_LIBRARY_PATH=/opt/local/lib:$DYLD_LIBRARY_PATH ./x01c -dev xcairo
dyld: Library not loaded: /System/Library/Frameworks/ 
Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/ 
A/libLAPACK.dylib
   Referenced from: /System/Library/Frameworks/Accelerate.framework/ 
Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib
   Reason: Incompatible library version: vecLib requires version  
1.0.0 or later, but libLAPACK.dylib provides version 0.0.0
Trace/BPT trap

I think this is because the dynamic linker, dyld, finds and deems  
incompatible the liblapack.dylib in /opt/local/lib before finding  
libLAPACK.dylib in /System/Library/... (Macs apparently like case- 
insensitive filesystems for some reason, maybe a hangover from their  
pre-UNIX days).

Weird.

I think I will stop setting DYLD_LIBRARY_PATH until I remember why I  
set it in the first place! :-)  But I'm still unable to explain why  
WITH_FREETYPE=OFF causes problems with xcairo.

Dave

P.S.  FWIW, my cmake line was simply "cmake .. 1>cmake.stdout  
2>cmake.stderr".  The only options are what you see in the  
CMakeCache.txt files.


------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to