David Kirkby wrote:
> 2009/8/14 Marshall Hampton <[email protected]>:
>> I'm all in favor of PIL as standard.  Does it install OK on Solaris?
>> I can't think of any other objection.
>>
>> -Marshall
> 
> 
> I've just built PIL on 't2' using the *GNU* compiler and it built ok.
> 
> Given there is a plan eventually to use the Sun compiler on Solaris, I
> personally think it would be useful for new packages to build with
> that too.
> 
> On my machine at home, I have a partial build of Sage using the Sun
> compiler. I'll have no access to that now (the electricity company are
> doing some maintenance, so I had to switch off the computers today.
> I'll switch the machine on when I get home. I would propose if there
> are any problems with PIL on the Sun compiler, they are sorted out
> first.
> 
> It should be pretty simple a package of that size. I note however it
> uses the -fPIC flag to build some of the code, which is one of the
> flags that is not portable. Hence if that is hard-coded, it will fail
> with the Sun compiler.
> 
> Failing to sort these problems out before packages are included only
> leaves bigger issues in using the Sun compiler at a later date.
> 
> I've found with a little tweaking, a large number of programs will
> build with the Sun compiler. This one is small, so any changes should
> be easy to integrate.
> 
> Dave

Just thought I'd update you.

I tested PIL with the Sun compiler (Sun Studio 12 update 1), which I 
downloaded for my own machine a few days ago. I used:

$ ./sage -i pil-1.1.6

PIL respects 'CC' (i.e. it uses the Sun compiler, not gcc). It also uses 
the correct flags to generate the position independent code 
(-xcode=pic32, though -KPIC would work too). An example line is below:

/opt/sunstudio12.1/bin/cc -DNDEBUG -O -xcode=pic32 -DHAVE_LIBJPEG 
-DHAVE_LIBZ -DWORDS_BIGENDIAN 
-I/export/home/drkirkby/sage/suncc/sage-4.1.1/local/include/freetype2 
-IlibImaging -I/export/home/drkirkby/sage/suncc/sage-4.1.1/local/include 
-I/usr/local/include -I/usr/include 
-I/export/home/drkirkby/sage/suncc/sage-4.1.1/local/include/python2.6 -c 
_imaging.c -o build/temp.solaris-2.10-sun4u-2.6/_imaging.o

There are no GNU-isms there!!

<SNIP>

--------------------------------------------------------------------
PIL 1.1.6 BUILD SUMMARY
--------------------------------------------------------------------
version       1.1.6
platform      sunos5 2.6.2 (r262:71600, Aug 16 2009, 09:37:57)
               [C]
--------------------------------------------------------------------
--- TKINTER support ok
--- JPEG support ok
--- ZLIB (PNG/ZIP) support ok
--- FREETYPE2 support ok
--------------------------------------------------------------------

<SNIP>

Successfully installed pil-1.1.6

So PIL build from the Sage prompt on Solaris with *both* the GNU and Sun 
compilers on Solaris, with no serious problems!

There are a few compiler warnings. If the person wishing to add this is 
the original author, perhaps he would like to address them, but 
otherwise that builds ok. I have NOT checked the functionality of it.

I've list a few compiler warnings below for completeness. If anyone 
wants complete log of the build of PIL I can send it.

So whilst I don't know much about the package, it builds fine, so I 
certainly have no objections to it's inclusion.

Dave



Warnings are:

1)
"libImaging/ZipEncode.c", line 310: warning: statement not reached

2)
"libImaging/GetBBox.c", line 57: warning: initializer does not fit or is 
out of range: 0xffffffff
"libImaging/GetBBox.c", line 98: warning: initializer does not fit or is 
out of range: 0xffffffff

3) The following warning appears multiple times, and many lines.

         argument : pointer to function(pointer to struct 
ImagingMemoryInstance {array[5] of char mode, int type, int depth, int 
bands, int xsize, int ysize, pointer to struct ImagingPaletteInstance 
{..} palette, pointer to pointer to unsigned char image8, pointer to 
pointer to int image32, pointer to pointer to char image, pointer to 
char block, int pixelsize, int linesize, pointer to function(..) 
returning void destroy}, pointer to struct ImagingMemoryInstance 
{array[5] of char mode, int type, int depth, int bands, int xsize, int 
ysize, pointer to struct ImagingPaletteInstance {..} palette, pointer to 
pointer to unsigned char image8, pointer to pointer to int image32, 
pointer to pointer to char image, pointer to char block, int pixelsize, 
int linesize, pointer to function(..) returning void destroy}) returning 
void
"_imagingmath.c", line 225: warning: argument #3 is incompatible with 
prototype:
         prototype: pointer to void : "_imagingmath.c", line 196
         argument : pointer to function(pointer to struct



--~--~---------~--~----~------------~-------~--~----~
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to