Skip to content

MacOS X 10.4 build problem

4 messages · Simon Urbanek, Bill Northcott

#
I have attempted to build the release R 2.1 on MacOS X 10.4 Tiger  
using gcc 4.0

The build is dying thus:
building package 'graphics'
mkdir ../../../library/graphics
mkdir ../../../library/graphics/R
mkdir ../../../library/graphics/demo
mkdir ../../../library/graphics/po
mkdir ../../../library/graphics/man
Error in dyn.load(x, as.logical(local), as.logical(now)) :
         unable to load shared library '/Users/billn/Public/R/R-2.1.0/ 
build/library/grDevices/libs/grDevices.so':
   dlopen(/Users/billn/Public/R/R-2.1.0/build/library/grDevices/libs/ 
grDevices.so, 6): Symbol not found: __cg_jpeg_resync_to_restart
   Referenced from: /System/Library/Frameworks/ 
ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/ 
Versions/A/ImageIO
   Expected in: /usr/local/lib/libJPEG.dylib


I don't really understand the error message.
grDevices.so exists:
[PBG4-BN:~] billn% otool -L /Users/billn/Public/R/R-2.1.0/build/ 
library/grDevices/libs/grDevices.so
/Users/billn/Public/R/R-2.1.0/build/library/grDevices/libs/grDevices.so:
         /System/Library/Frameworks/AppKit.framework/Versions/C/ 
AppKit (compatibility version 45.0.0, current version 824.0.0)
         libR.dylib (compatibility version 2.1.0, current version 2.1.0)
         /usr/lib/libmx.A.dylib (compatibility version 1.0.0, current  
version 92.0.0)
         /usr/lib/libSystem.B.dylib (compatibility version 1.0.0,  
current version 88.0.0)

but the reference to /usr/local/lib/libJPEG.dylib baffles me.  The  
library that is installed is called libjpeg.62.0.0.dylib and  
symlinked as libjpeg.62.dylib and libjpeg.dylib.

Presumably __cg_jpeg_resync_to_restart is a symbol defined in  
CoreGraphics, but why is it looking in the non-existent libJPEG ???

Bill Northcott
#
Bill,
On May 2, 2005, at 8:12 AM, Bill Northcott wrote:

            
It's a problem in your library setup. Your /usr/local/lib/ 
libJPEG.dylib conflicts with the system libJPEG.dylib from ImageIO  
framework (which is in /System/Library/Frameworks/ 
ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/ 
Versions/A/Resources/libJPEG.dylib). Since R forces the load of the  
one in /usr/local/lib first (as you configured it), it is loaded  
instead of the one in ImageIO framework, but it doesn't contain the  
same symbols, thus the load fails. You should remove /usr/local/ 
libJPEG.dylib and use static version or ImageIO instead.

Cheers,
Simon
#
On 02/05/2005, at 10:50 PM, Simon Urbanek wrote:
Ding!  I get it.  It is a problem with the case independent file  
system.  libJPEG would be different from the gnu libjpeg, but on HFS+  
it is not.  Hence the confusion.

I will try to look at it later.  I think all I may need to do is  
remove the libjpeg.dylib symlink, which would Appleise it.

Bill
#
On 02/05/2005, at 10:50 PM, Simon Urbanek wrote:

            
Removing the symlink did the trick.  I notice that all the libraries  
in the ImageIO framework have capitalisation.  I guess this stops  
them being linked by accidentally by GNU style builds but not vice  
versa.

I now have a working R 2.1 built on Tiger with gcc-4.0/gfortran.

Bill