-
-
Notifications
You must be signed in to change notification settings - Fork 487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The libpng12 spkg should also create symbolic links from libpng.*
for its libraries
#11696
Comments
comment:1
New spkg is up. Needs review and testing, the latter especially on Darwin. (Though I see no reason for doing so, we could still delete some of the links / the compatibility shared library on Darwin only.) |
This comment has been minimized.
This comment has been minimized.
Author: Leif Leonhardy |
comment:2
P.S.: This is just another instance of where it IMHO doesn't make sense to build a Sage version if the system already provides some sufficient one, since doing so only causes trouble. The best way would be to make such rather basic, unmodified packages just prerequisites; perhaps also supplying some easy way to build/install them on older systems (i.e., a tarball with some additional install script using reasonable settings). Shipping "standard" spkgs like e.g. also If we keep building such broadly available packages regardless of whether they're already installed system-wide (like also readline, PPL, GMP/MPIR, MPFR etc.), we should make sure they only get used by Sage components, by "moving them out of |
comment:3
Notes (from #11686):
For testing on iras, apply the spkg here, and then try building this matplotlib spkg. (The standard matplotlib spkg patches the file |
comment:4
On both an OS X box (OS version 10.6.8) and on iras: before installing the libpng spkg here, both systems failed to build the modified matplotlib spkg referred to in the previous comment. After installing the new libpng, both successfully built it. All doctests passed for the "plot" directory, and this worked:
After exiting Sage:
From the code, it looks like The package still needs testing on other systems, and we should run full doctests as well, not just for the 'plot' directory. |
comment:5
Replying to @jhpalmieri:
Perhaps also on some MacOS X 10.4 box, and also in general by building Sage from scratch with the new libpng spkg. The only issues I can imagine to arise happen if you try to start some program dynamically linked to an incompatible (presumably very old) system I don't know if there are any use cases of the latter we would have to take care of. Another problem we would notice when building Sage from scratch could be some "tight" components (shared libraries / extension modules), not using The latter should IMHO never happen (at least not with properly written packages) since |
comment:6
A full build works successfully on sage.math and another unix box on skynet (taurus). I'm still waiting on the skynet machines fulvia (OpenSolaris), mark (Solaris), and iras ("ia64-Linux-suse"). Meanwhile, this fails on OS X 10.6.8. That is, while the spkg builds, it causes R to fail to install. I've put the full install log on-line, but here is the tail end of the log:
On one OS X box, the following line from the R install log switched from "no" to "yes" after installing the new libpng spkg:
On another box, it said "yes" for the old spkg as well. For both machines, I get the same failure. |
comment:7
Replying to @jhpalmieri:
Yes, another system library R links to uses If only MacOS used proper shared library versioning... Can you also give the output of $ ls -l $SAGE_ROOT/local/lib/lib[Pp]ng* ? |
comment:8
Replying to @nexttime:
$ ls -l $SAGE_ROOT/local/lib/lib[Pp]ng*
With the old libpng:
With the new one:
|
comment:9
Ok, removing I'll update the spkg accordingly later. Note to myself: Also support |
comment:10
For the old libpng spkg, as part of a fresh Sage build:
The later times are the same for all of the .a and .la files in SAGE_LOCAL/lib, which is the time when docbuilding finished and doctesting started (as part of "make ptestlong"). For the earlier example I posted, all of the symlinks For the new spkg, since the Sage build crashed, it didn't reach any of these stages. |
comment:11
Replying to @nexttime:
Ooops, completely forgot this ticket. Deleting the symbolic link Johan Bosman apparently ran into this. So we should perhaps only remove the symbolic link (on Darwin) if there's really a system-wide Nevertheless, we should still fix |
comment:12
Replying to @nexttime:
And prepend Sage's |
comment:14
Replying to @nexttime:
The problem on his MacOS X machine is actually caused by something else, namely the way matplotlib tries to detect whether A preliminary matplotlib-1.0.1.p1 spkg working around this (and adding a couple of tests and diagnostic messages) can be found here. |
comment:15
The part about Cygwin in spkg-install is also very fishy and IMHO should be removed. |
comment:16
In fact it is somehow needed because the import library produced by libpng12 is quite empty and so useless... Maybe it is a good time to update libpng? |
Changed author from Leif Leonhardy to Leif Leonhardy, Jean-Pierre Flori |
comment:17
I've cleaned up everything, removed commented out code, added the trick for Cygwin. |
This comment has been minimized.
This comment has been minimized.
Reviewer: Dmitrii Pasechnik |
comment:25
On OS X 10.8, Mercurial doesn't work:
|
comment:26
In fact, this fails on all OS X systems. |
comment:27
Replying to @jdemeyer:
The problem is a conflict with the system library, which (on OSX This is probably caused by prepending |
comment:28
Cannot really work on this one as I don't have access to Mac OS X. Maybe mercurial links to something outside of Sage which itself links to libpng which at runtime is resolved as our libpng, but unfortunately the libpng we ship is less capable than the system-wide one and the symbol lookup fails. Could you post the mercurial log? |
comment:29
Replying to @jpflori:
please see http://boxen.math.washington.edu/home/dima/tmp/merc-osx.log this the install log of this spkg followed by the one of mercurial. |
comment:30
I think the problem is that somehow loading the mercurial module osutils triggers loading some Mac OS framework mysterious stuff which itself wants libpng, but Apple is so nice they decide to prefix their symbols with cg in their system wide libpng. Hopefully the spkgs we build and which need libpng ling to libpng12 and finds ours rather than the Mac OS X, at least it seems to be the case on Linux. |
comment:31
Just for fun, could you try building libpng after export SYMBOL_PREFIX=cg (same trick as used on Cygwin but with cg instead of the empty string). For future reference, I just fell on |
comment:32
And doesn't it work on Mac OSes with case sensitive filesystems? |
comment:33
Replying to @jpflori:
Replying to @jpflori:
reading this makes me think that we don't want to mess around with this. |
comment:34
I agree we don't want to deal with ssuch a mess, but the original goal of this ticket is to let Sage install on systems without a system wide libpng. By the way it seems mercurial triggers the ImageIO thingy because it uses EDITOR: |
comment:35
So maybe the best solution is to do as suggested in the above linked comment and in #4216 and use sage-native-execute to run hg on Mac OS... |
comment:36
Replying to @jpflori:
WIth p4, there is no lib[Pp]ng.* in $SAGE_LOCAL/lib at all on my (curresystem. There are libpng12.* only. This is why it works. With p5 (i.e. spkg on the ticket), there are lots of libpng.*
This results in the name clash we see on OSX. I suppose you can tweak the spkg to remove all the |
comment:37
Replying to @dimpase:
Exactly, and the solution to delete files is somehow "dirty"... Here are two different preliminary plans to get this merged.
Or second one:
The first solution looks infinitely more realistic and simpler, so I'll craft something based on that. |
Spkg diff, for review only. |
comment:38
Attachment: libpng-1.2.35.p5.diff.gz Updated spkg which deletes symlinks in $SAGE_LOCAL/lib/ on Darwin, please test there. The matplotlib/pkg-config problem should be dealt with elsewhere by updating the matplotlib spkg if still present. |
comment:39
looks ok on OSX. Positive review. |
Merged: sage-5.8.beta1 |
Doing so avoids trouble if
pkg-config
isn't available, and packages look for justlibpng
.The header
png.h
is already installed in$SAGE_LOCAL/include/
, and a symbolic link from$SAGE_LOCAL/lib/pkgconfig/libpng.pc
to the actuallibpng12.pc
is also created.Actually the links (and a compatibility
libpng
shared library) are created by upstream, butspkg-install
deleted these.Use spkg at:
http://boxen.math.washington.edu/home/jpflori/libpng-1.2.35.p5.spkg
Original changes:
libpng-1.2.35.p4 (Leif Leonhardy, August 17th 2011)
libpng.*
for its libraries #11696: Do not delete symbolic links fromlibpng.*
(and the sharedlibrary named
libpng.so.*
) in$SAGE_LOCAL/lib
; see the comment inspkg-install
for why (cf. also Race condition in matplotlib mkdir() #11686).-L$SAGE_LOCAL/lib
toLDFLAGS
, since otherwise Sage's zlib won'tbe used.
might still intentionally get overridden though.)
$MAKE
, but also install serially since this shouldn't take muchtime and is certainly safer.
$UNAME
.Further changes:
CC: @jdemeyer @jhpalmieri @kcrisman @dimpase
Component: packages: standard
Keywords: PNG libpng spkg
Author: Leif Leonhardy, Jean-Pierre Flori
Reviewer: Dmitrii Pasechnik
Merged: sage-5.8.beta1
Issue created by migration from https://trac.sagemath.org/ticket/11696
The text was updated successfully, but these errors were encountered: