Dear Maurice
Date: Wed, 21 Nov 2012 19:28:34 +0100 From: Maurice Lombardi Maurice.Lombardi@ujf-grenoble.fr Subject: Re: addition of a Mac OS X / X11 target to GRX To: grx@gnu.de Message-ID: 50AD1D52.5070804@ujf-grenoble.fr Content-Type: text/plain; charset=ISO-8859-1; format=flowed
By the way, if symlinks to it are added as I explained in my last message is it necessary to give all names inside the dylib for this to work ?
Adriaan already answered that.
The comma after "-install_name" needs to be a blank in macosx.diff:
- $(CC) $(LDOPT) -dynamiclib -install_name,$(libdir)/$(notdir $(GRX20SHna)) -headerpad_max_install_names -o $(GRX20SHna) $(LO) $(ADDON_LIBS) $(X11LIBS) + $(CC) $(LDOPT) -dynamiclib -install_name $(libdir)/$(notdir $(GRX20SHna)) -headerpad_max_install_names -o $(GRX20SHna) $(LO) $(ADDON_LIBS) $(X11LIBS)
As such the install_name is what most expect and is fine. In case fink reviewers want a change, I will deal with this within the package description.
I also tried the fat options. In general, they work. However, when I did -arch ppc, 2 small glitches showed up:
1) src/include/grx20.h, line 112: there is one unmatched ")" at the end of the line:
-#if defined(unix) || defined(__unix) || defined(__unix__) || defined(_AIX) || (defined(__APPLE__) && defined(__MACH__)) ) +#if defined(unix) || defined(__unix) || defined(__unix__) || defined(_AIX) || (defined(__APPLE__) && defined(__MACH__))
2) src/fonts/fdv_raw.c: error: fhdr has no member length. I think it is a leftover from earlier and therefore I simply deleted line 53:
- _GR_swap32u(&fhdr.length);
-arch ppc64 compiled, but there is an error during link, because of missing libraries. If I recall correctly, it is not supported on 10.6 and i would have to try on 10.5. I am not sure, whether it is worth to put more work into this.
I started to have a look at the pascal headers and examples using freepascal. I needed some additional defines in grx.pas for fpc, but it is not too bad. I think no extra version for fpc is needed and a first version is ready. Right now, I am at the examples. With a small mod, the first example compiled, but I think it did not work 100%. I need more tests on this. I noticed that some examples use the gpc unit. I have to check for a replacement.
A common issue in several examples is the use of binary numbers. fpc does not have the same way as gpc. My first fix is this:
{$ifdef fpc} c := GrAllocColor(c and %11100000,(c and %11100) shl 3, (c and %11) shl 6); {$else} c := GrAllocColor(c and 2#11100000,(c and 2#11100) shl 3, (c and 2#11) shl 6); {$endif}
It would be nice, if gpc could handle % for binary numbers. Maybe the makefile for the examples needs an extension for examples that work with gpc only.
Michael
Schindler Karl-Michael wrote:
-arch ppc64 compiled, but there is an error during link, because of missing libraries. If I recall correctly, it is not supported on 10.6 and i would have to try on 10.5. I am not sure, whether it is worth to put more work into this.
It's complicated, so it may be easier to stick with i386 and x86_64.
- 10.5 (and the 10.5 SDK) have ppc7400, ppc64, i386 and x86_64
[p18:~] adriaan% lipo -info /Developer/SDKs/MacOSX10.5.sdk/usr/lib/libSystem.dylib Architectures in the fat file: /Developer/SDKs/MacOSX10.5.sdk//usr/lib/libSystem.dylib are: ppc7400 ppc64 i386 x86_64
- 10.6 (and the 10.6 SDK) have x86_64, i386 and ppc7400 (but not ppc64). - 10.7 and 10.8 (and their respective SDKs) only have x86_64 and i386
Even if the older SDKS have been installed, the assemblers for the ppc targets may be missing (unless they were also installed by hand).
Regards,
Adriaan van Os
Dear friends of grx.
I am happy to announce the availability of grx/X11 for Mac OS X for manual installation as well as fink package. Saving jpeg, png, tiff and bmp images is working. Pascal bindings for gpc are untested so far. Thanks a lot for the patience of Maurice and Adriaan when helping me in the port. Feedback is gratefully acknowledged.
Michael Schindler
Le 22/11/2012 13:00, Schindler Karl-Michael a écrit :
Dear Maurice The comma after "-install_name" needs to be a blank in macosx.diff:
- $(CC) $(LDOPT) -dynamiclib -install_name,$(libdir)/$(notdir $(GRX20SHna)) -headerpad_max_install_names -o $(GRX20SHna) $(LO) $(ADDON_LIBS) $(X11LIBS)
- $(CC) $(LDOPT) -dynamiclib -install_name $(libdir)/$(notdir $(GRX20SHna)) -headerpad_max_install_names -o $(GRX20SHna) $(LO) $(ADDON_LIBS) $(X11LIBS)
OK corrected
As such the install_name is what most expect and is fine. In case fink reviewers want a change, I will deal with this within the package description.
I also tried the fat options. In general, they work. However, when I did -arch ppc, 2 small glitches showed up:
- src/include/grx20.h, line 112: there is one unmatched ")" at the end of the line:
-#if defined(unix) || defined(__unix) || defined(__unix__) || defined(_AIX) || (defined(__APPLE__) && defined(__MACH__)) ) +#if defined(unix) || defined(__unix) || defined(__unix__) || defined(_AIX) || (defined(__APPLE__) && defined(__MACH__))
OK corrected
- src/fonts/fdv_raw.c: error: fhdr has no member length. I think it is a
leftover from earlier and therefore I simply deleted line 53:
- _GR_swap32u(&fhdr.length);
in fact length has been changed to numchars, to be consistent with other drivers. But nobody has yet used this instruction because previously all systems were little endian. Corrected anaway
-arch ppc64 compiled, but there is an error during link, because of missing libraries. If I recall correctly, it is not supported on 10.6 and i would have to try on 10.5. I am not sure, whether it is worth to put more work into this.
Probably not, as indicated in an other mail by Adriaan. power pc seems to be outdated now. I suppressed the support in makedefs.grx and configure. But I kept FAT_I386 and FAT_X86_64 to enable a building of a fat library in one go.
This is uploaded to "more things"
I will see for the fpc support.
Maurice