Date: Fri, 09 Nov 2012 09:46:55 +0100 From: Maurice Lombardi Maurice.Lombardi@ujf-grenoble.fr Subject: Re: grx on Mac OS X To: grx@gnu.de Message-ID: 509CC2FF.1090607@ujf-grenoble.fr Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Looking into the two linux systems I have access to, I see
- In one, a group computer to which I have full root access, there is no
/usr/X11 directory, only a /usr/X11R6 directory which contains virtually nothing, only a bin subdirectory containing symlinks to mkfontdir and mkfontscale
- In the other, a lab computer to which I have no root access, I see
neither /usr/X11 nor /usr/X11R6 directories (but they could be hidden from ordinary users).
X11 files are contained in regular /usr/include, /usr/lib, /usr/lib32, /usr/lib64 directories, and thus they are not found through $(X11INCS) and $(X11LIBS). The only necessary stuff when compiling binaries seems to be -lX11 contained in $(X11LIBS).
Probably you can check on your system.
On a plain Mac OS X, there is no X11. At least with some versions and it must be installed by the user. If so, it is placed in /usr/X11/, for example /usr/X11/lib/libX11.dylib. At least on 10.6, i also have /usr/X11R6, but this is only a symlink to /usr/X11.
With the latest patch "./configure --target=osx; make" gives a successful build. Thank you for your patience.
The next step is enabling the extra image file formats. This crashes with undefined symbols, when building the library.
Example after ./configure --target=osx --enable-png
... gcc -m32 -dynamiclib -dylib_install_name,libgrx20X-2.4.9.dylib -o ../lib/macosx/libgrx20X-2.4.9.dylib draw/bitblt.lo ... Undefined symbols: "_png_set_gray_to_rgb", referenced from: _readpng in png2ctx.lo "_png_set_IHDR", referenced from: _writepng in ctx2png.lo
and many more in png2ctx.lo and ctx2png.lo. As with X11, the library and the library path are needed, depending on the installation of libpng.dylib. Example: -L/usr/local/lib and -lpng
Le 10/11/2012 01:45, Schindler Karl-Michael a écrit :
Example after ./configure --target=osx --enable-png
... gcc -m32 -dynamiclib -dylib_install_name,libgrx20X-2.4.9.dylib -o ../lib/macosx/libgrx20X-2.4.9.dylib draw/bitblt.lo ... Undefined symbols: "_png_set_gray_to_rgb", referenced from: _readpng in png2ctx.lo "_png_set_IHDR", referenced from: _writepng in ctx2png.lo
and many more in png2ctx.lo and ctx2png.lo. As with X11, the library and the library path are needed, depending on the installation of libpng.dylib. Example: -L/usr/local/lib and -lpng
In linux you need to run /sbin/ldconfig as root after installing manually a new software to register shared libraries This is frequently overlooked when installing with a package manager, because it does so automatically. This is indicated in the top level readme file of grx. Does this exists in OS X ? or an equivalent ? If so try with the -v option to see what it does: the directories in which links are registered are indicated. In my system I see that way registering X11, png, tiff, jpeg and grx libraries. For you, it could be also the problem with X11 libraries
Maurice