Date: Thu, 08 Nov 2012 11:48:48 +0100 From: Maurice Lombardi Maurice.Lombardi@ujf-grenoble.fr Subject: Re: grx on Mac OS X To: grx@gnu.de Message-ID: 509B8E10.8030804@ujf-grenoble.fr Content-Type: text/plain; charset=UTF-8; format=flowed
Le 07/11/2012 22:47, Schindler Karl-Michael a ?crit :
I applied your patch to a fresh copy of the sources, configure for osx.
<snip>
Oops, I forgot to replace -f makefile.x11 by -f makefile.osx in the top makefile.osx.
corrected and uploaded. I also made /usr/X11 the default X11base both for osx and x11, because ir works also in the two linux systems I have access to
Besides this error, there are a couple of warnings. If you intend to work on them, i could send you the complete list.
They occur because gcc becomes more and more picky with time. Not easy to correct because options to suppress some warnings in recent versions of gcc are not understood in older versions and cause build crashes
2 Examples:
In file included from bgi/textd.c:25: bgi/text.h:79: warning: ?packed? attribute ignored for field of type ?FontNameTyp? bgi/text.h:81: warning: ?packed? attribute ignored for field of type ?uchar? bgi/text.h:82: warning: ?packed? attribute ignored for field of type ?uchar? bgi/text.h:83: warning: ?packed? attribute ignored for field of type ?uchar? bgi/text.h:84: warning: ?packed? attribute ignored for field of type ?uchar? bgi/text.h:88: warning: ?packed? attribute ignored for field of type ?char? bgi/text.h:90: warning: ?packed? attribute ignored for field of type ?char? bgi/text.h:91: warning: ?packed? attribute ignored for field of type ?uchar? bgi/text.h:93: warning: ?packed? attribute ignored for field of type ?uchar? bgi/text.h:94: warning: ?packed? attribute ignored for field of type ?uchar? bgi/text.h:95: warning: ?packed? attribute ignored for field of type ?uchar? bgi/text.h:96: warning: ?packed? attribute ignored for field of type ?schar? bgi/text.h:97: warning: ?packed? attribute ignored for field of type ?uchar[5]?
No harm, it is really a warning that the packed attribute changes nothing, and is thus superfluous. -Wno-attributes suppress these warnings in gcc 4.7.2, but is not understood in gcc 3.4.5
bgi/lnestyle.c: In function ?setlinestyle?: bgi/lnestyle.c:51: warning: pointer targets in assignment differ in signedness bgi/lnestyle.c:54: warning: pointer targets in assignment differ in signedness bgi/lnestyle.c:57: warning: pointer targets in assignment differ in signedness
This could be corrected for by changing the sources. In fact the correct signedness is not always obvious, and in BGI the old BP signs are kept everywhere to keep consistency with old programs, but are different from those of GRX.
Maurice
OK. With the new patch, there is progress, but still one issue.
gcc -m32 -dynamiclib -dylib_install_name,libgrx20X-2.4.9.dylib -o ../lib/macosx/libgrx20X-2.4.9.dylib draw/bitblt.lo ...
fails with missing symbols from X11. Therefore, i tried
make LDOPT='-m32 -L/usr/X11/lib -lX11'
which gives a succesfull
gcc -m32 -L/usr/X11/lib -lX11 -dynamiclib -dylib_install_name,libgrx20X-2.4.9.dylib -o ../lib/macosx/libgrx20X-2.4.9.dylib draw/bitblt.lo ...
after this make runs fine until its end.
make install seems to do reasonable things :-)
I could easily add the LDOPT part in the fink package description, but maybe it could be solved at the code level.
I also tried the program xdemogrx. It works, but I am not really sure about bugs. I will see. Maybe, we should get the makefile correct first.
Michael.