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.
Le 09/11/2012 01:10, Schindler Karl-Michael a écrit :
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 ...
I would be better to include instead $(X11LIBS) in this line of src/makefile.osx: it does the same but keeps everything independant. I have corrected and uploaded to the GRX "more things" directory.
In fact I do not understand why this is necessary in OSX and not in X11. Including this change in src/makefile.osx and not src/makefile.x11 keeps the two issues independants.
In X11 including $(X11LIBS) is necessary only when compiling binaries $(UTILP) $(UTILPX) and test programs, not when compiling the libraries.
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.
Maurice