Vote on PIL dependencies -- libjpeg, libtiff

42 views
Skip to first unread message

Tim Joseph Dumol

unread,
Oct 28, 2009, 10:08:05 PM10/28/09
to sage-...@googlegroups.com
As stated in http://trac.sagemath.org/sage_trac/ticket/7273, PIL has dependencies on libtiff and libjpeg that can break the build.

There are several options:

(1) PIL can be crippled -- have libtiff and libjpeg disabled even if the local system has them,

(2) libtiff and libjpeg be included as standard libraries along with PIL, or

(3) PIL, libtiff, and libjpeg be included as optional libraries.

Here are the new packages:

libtiff: http://sage.math.washington.edu/home/timdumol/libtiff-3.9.1.p0.spkg

libjpeg: http://sage.math.washington.edu/home/timdumol/libjpeg-7.p0.spkg

PIL: http://sage.math.washington.edu/home/timdumol/pil-1.1.6.p1.spkg

Links are also posted in the trac ticket.

Can we have a vote on what to do?

- Tim Joseph Dumol <tim (at) timdumol (dot) com>

mhampton

unread,
Oct 28, 2009, 10:13:57 PM10/28/09
to sage-devel
While I personally tend to want more things standard in sage, I
realize that's related to the fact that I've never really tried to
help port sage to things like Windows and Solaris. I think to be
consistent we would need to have libtiff and libjpeg as optional
packages for a while, and make them standard if they pass the usual
hurdles (conform to the spkg requirements on the wiki, build and pass
tests on all supported platforms, and get a passing developer vote).
But I am +1 to their eventual inclusion, I don't Sage can be taken
seriously for image processing until they are standard.

By the way, I have tried the libjpeg spkg and it worked well on an
intel mac running 10.4.11. Thanks for creating that!

-Marshall

On Oct 28, 9:08 pm, Tim Joseph Dumol <t...@timdumol.com> wrote:
> As stated inhttp://trac.sagemath.org/sage_trac/ticket/7273, PIL has

William Stein

unread,
Oct 28, 2009, 11:02:27 PM10/28/09
to sage-...@googlegroups.com
On Wed, Oct 28, 2009 at 7:08 PM, Tim Joseph Dumol <t...@timdumol.com> wrote:
> As stated in http://trac.sagemath.org/sage_trac/ticket/7273, PIL has
> dependencies on libtiff and libjpeg that can break the build.
>
> There are several options:
>
> (1) PIL can be crippled -- have libtiff and libjpeg disabled even if the
> local system has them,
>
> (2) libtiff and libjpeg be included as standard libraries along with PIL, or
>
> (3) PIL, libtiff, and libjpeg be included as optional libraries.

There are 2 other options:

(4) When building *binaries* for distribution, PIL does not link in
libtiff and libjpeg, even if the build system has them. When users
build Sage themselves, PIL will link in libtiff and libjpeg if the
system has them, as it does now.

(5) We modify PIL so it gracefully fails if libtiff and libjpeg are
not available at runtime, instead of bombing out completely the moment
it tries to do anything nontrivial. This is a bog standard thing to
do, which is done in *most* Python libraries, and certainly often in
Python itself. I'm surprised it isn't done in PIL already.

Probably (4) is easier than (5), and would be a good temporary
measure, which would allow us to put off (2). I would implement (2)
via an environment variable that gets set before building a Sage for
distribution.

Doing (3) for libtiff and libjpeg is a no brainer. Post the packages
to trac and get them refereed. I'm against deprecating PIL to the
status of optional.

Also, I agree with Marshall -- it would probably be wise at this point
to get a handle on porting Sage to Cygwin before adding more and more
new components to Sage. Every component has the potential to make
porting work more difficult. I can't emphasize this too much. For
example, I think Mike Hansen has spent a lot of time today frustrated
with the Windows port because we use ECL to build Maxima now, and
Maxima (and Fricas) both totally fail to build with ECL on Cygwin,
though ECL itself seems to build fine. Amusingly, they fail with the
most cryptic error I've ever seen: "no error" !.

-- William

>
> Here are the new packages:
>
> libtiff: http://sage.math.washington.edu/home/timdumol/libtiff-3.9.1.p0.spkg
>
> libjpeg: http://sage.math.washington.edu/home/timdumol/libjpeg-7.p0.spkg
>
> PIL: http://sage.math.washington.edu/home/timdumol/pil-1.1.6.p1.spkg
>
> Links are also posted in the trac ticket.
>
> Can we have a vote on what to do?
>
> - Tim Joseph Dumol <tim (at) timdumol (dot) com>
>
> >
>



--
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

Tim Joseph Dumol

unread,
Oct 29, 2009, 2:30:50 AM10/29/09
to sage-...@googlegroups.com
I have implemented (4) and the new package file is up at http://sage.math.washington.edu/home/timdumol/pil-1.1.6.p2.spkg . A patch for sage-bdist is up at #7273. The new environment variable is $SAGE_BINARY_BUILD.

libjpeg and libtiff are in new tickets #7344 and #7345 respectively.

- Tim Joseph Dumol <tim (at) timdumol (dot) com>


Reply all
Reply to author
Forward
0 new messages