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
New libjpeg package #7344
Comments
comment:2
There is an extra file, SPKG.txt~, in the package. I don't know if this should block its inclusion (I think this should go in as an optional package ASAP so it gets wider testing) but the show function doesn't work on my intel mac, 10.4.11, opening a TIFF file:
|
comment:3
Oops that was a TIFF example, but it happens with jpegs too:
|
comment:4
The error seems to be an issue with having multiple versions of libjpeg in OS X. Refer to: http://old.nabble.com/dyld:-Symbol-not-found:-__cg_jpeg_resync_to_restart-to9949988.html. I am unsure as to how to fix that problem (I haven ever used a Mac). |
comment:5
A new version without SPKG.txt~ is up at http://sage.math.washington.edu/home/timdumol/libjpeg-7.p1.spkg. |
This comment has been minimized.
This comment has been minimized.
comment:6
This needs checking on Solaris |
comment:7
When I try an example like mhampton's above (
(This is on OS X 10.6.) Is this an issue? |
comment:8
Sorry, I did not set up email notifications until recently, so cc'ing me did not help. I only stumbled across this when looking for tickets to review. I will check it on Solaris. Dave |
comment:9
A few points looking at spkg-install, which is overly complicated following recent updates to sage-env.
then it will work irrespective of the flag needed to generate 64-bit binaries. (Not all compilers need -m64, as others use -q64 and other flags). I'm not totally convinced LDFLAGS ever needs -m64, as I believe LDFLAGS gets passed to the linker. No linker I am aware of has the -m64 option (check GNU binutils manual if you wish). But I'm not 100% sure it is never needed. I think the right flag if needed is -64 for the GNU linker, but it is rarely needed, as normally the linker can work out whether a 32 or 64 bit binary is needed, based on the object files. The exception is when creasting shared libraries from archives, where the linker may not be able to determine this.
as it was agreed recently (see sage-devel) that there is no need for there to be variables for very basic commands. However, if the source code makes use of $CP etc, then they might have to stay. But if possible, just use mv, cp etc.
It does actually build on Solaris, but the spkg-install could be reduced considerably in size, as most of these checks are now done in once place. I'll help you do this. Dave |
comment:10
Replying to @sagetrac-drkirkby:
Perfect, thanks. The libjpeg makefile actually uses $CP, $RM and $MV, so that section can't be removed. |
comment:11
Attachment: spkg-install.gz I've looked at this, and have attached a revised spkg-install, which is a lot simpler. However, there are some odd things about this.
I just took the libjpeg source code, then built it with:
and it all went ok, without me having to override 'cp', 'mv' or 'rm'.
In the attacked in spkg-install I've left all the overriding of cp, but I don't feel it should be necessary. Dave |
comment:12
See also here. |
comment:13
New package version here: http://sage.math.washington.edu/home/timdumol/libjpeg-7.p2.spkg As stated in #7818, some makefiles depend on $RM being unset or set to "rm -f". The above code overrides any $RM setting, which otherwise causes compilation failure (at least for me). I am unsure of the GPL compatibility of libjpeg's licensing, but this message on: http://www.mail-archive.com/mozilla-license@mozilla.org/msg00143.html seems to suggest that it is widely considered GPL compatible. Otherwise, we may want to consider libjpeg-turbo (http://sourceforge.net/projects/libjpeg-turbo/) and patch PIL to use that. Regarding review of this package: The package may be reviewed by using the PIL package, as above:
|
This comment has been minimized.
This comment has been minimized.
comment:14
(I could have deleted Dave from the cc-list, but just added the missing trailing "t"...) |
comment:15
Replying to @TimDumol:
There's a much simpler way to unset RM than use
one can use:
If a Makefile needs RM set, I feel it would be better to fix the Makefile and report that upstream. Likewise if a Makefile needs |
comment:16
If this package causes compilation failure, then it needs work, not |
comment:17
.p1 gave compilation failure. .p2 fixes it. |
comment:22
Replying to @jhpalmieri:
Haven't looked at the spkg yet, but perhaps attach your |
comment:23
Replying to @nexttime:
I've posted it here: http://sage.math.washington.edu/home/palmieri/misc/config.log. |
comment:24
Replying to @jhpalmieri:
Hmmm, the error is just that John, did you set Haven't yet looked if there are further Btw., there's crap in the spkg, and I can't read the Mercurial files: $ ls -a
. .hg .hgignore~ spkg-install SPKG.txt src
.. .hgignore .hgignore.swp .spkg-install.swp .SPKG.txt.swp
$ hg log ; hg status
abort: requirement 'dotencode' not supported!
abort: requirement 'dotencode' not supported! Also, unfortunately Tim has deleted the old "patches" that were applied on MacOS X # This was needed for libjpeg. Is this needed for libjpeg-turbo?
#if [ -n "`uname -s | grep Darwin`" ]; then
# $CP ../patches/config.sub .
# $CP ../patches/config.guess .
# # Required for Mac OS (http://jetfar.com/libjpeg-and-python-imaging-pil-on-snow-leopard/)
# ./configure --enable-shared --enable-static --prefix="$SAGE_LOCAL"
#else
./configure --prefix="$SAGE_LOCAL"
#fi though that's not necessarily the problem. |
comment:25
I hadn't, because with OS X 10.6 on 64-bit machines, it shouldn't be necessary. I just tried it anyway, and got the same result. The file BUILDING.txt in the src directory says this:
The default version of nasm seems to be 0.98.40, or at least that's what I have installed. The same file also says this; perhaps this is the way to go:
If I configure with those options, it seems to succeed. That is, I ran "sage -sh", then changed to the directory
Then |
comment:26
Or maybe not; either I did something wrong or I can't use the 32-bit library in the 64-bit Sage build, but it doesn't seem to work in Sage: it keeps telling me "IOError: decoder jpeg not available". Maybe we should require nasm as a prerequisite on 64-bit OS X. (That could be another spkg.) |
comment:27
Replying to @jhpalmieri:
Yeah, you cannot use both 32- and 64-bit libraries or modules within / from the same executable.
I wonder if it builds (on MacOS X) without assembly parts (perhaps with (You could also try temporarily "removing" If Or we have to resort to some other (upstream) |
comment:28
Replying to @nexttime:
Yep, configuring with |
comment:29
Replying to @nexttime:
Sorry, I used a pretty recent version of Mercurial to create the repository, and it seems that it is backwards incompatible. I'll use
|
comment:30
Replying to @jhpalmieri:
I am uncertain, but I believe that you need to reinstall PIL (sage -f pil) in order to enable JPEG capabilities. |
comment:31
I think we should simply check whether This should work on all platforms, and this way machines having (at least) the required version installed won't suffer from not using faster implementations. If According to the docs, it might also be necessary to either pass |
comment:32
Building with |
comment:33
As with the spkg at #7345, you should also provide a patch to the scripts repo, adding the appropriate files to .hgignore there. |
comment:34
Replying to @jhpalmieri:
... if we really want to install any executables as well. Using them from Sage would certainly be inefficient, and |
Changed keywords from none to sd32 |
comment:36
Replying to @TimDumol:
There is a discussion of the libjpeg-turbo license by the main developer (I think) here: http://sourceforge.net/projects/libjpeg-turbo/forums/forum/1086868/topic/4519797 It's definitely "licensed under GPL". However, it seems to be licensed under a subset of LGPL, which would definitely be GPL compatible. |
comment:37
I tried building libjpeg_turbo-1.1.1.spkg on OS X 10.7 (Lion) with XCode 4.2.x and it fails during the ./configure stage:
|
comment:39
outdated, should close |
This is used by PIL (c.f. #7273). Inclusion as an optional or even as a standard package would be helpful.
The latest version of the package is here: http://sage.math.washington.edu/home/timdumol/libjpeg_turbo-1.1.1.spkg
CC: @sagetrac-drkirkby @kcrisman @nexttime
Component: packages: optional
Keywords: sd32
Author: Tim Dumol
Issue created by migration from https://trac.sagemath.org/ticket/7344
The text was updated successfully, but these errors were encountered: