osx 10.10.2 / sage 6.5 - how to read jpg/tiff files? - sage -i libjpeg-6b problem

72 views
Skip to first unread message

peter metcalf

unread,
Mar 23, 2015, 6:22:40 AM3/23/15
to sage-...@googlegroups.com
HI All

I'm trying to read jpg files using PIL or matplotlib

any help/suggestions would be most welcome!

the following fails

sage -i libjpeg-6b

the relevant part of the log file may be

==================================================

gcc -fPIC  -I.   -c -o jmemmgr.o jmemmgr.c

gcc -fPIC  -I.   -c -o jmemnobs.o jmemnobs.c

rm -f libjpeg.a

ar rc libjpeg.a  jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o jcsample.o jchuff.o jcphuff.o jcdctmgr.o jfdctfst.o jfdctflt.o jfdctint.o jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o jcomapi.o jutils.o jerror.o jmemmgr.o jmemnobs.o

ranlib libjpeg.a

sh: line 1:  4325 Trace/BPT trap: 5       /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk / -find ranlib 2> /dev/null

ranlib: error: unable to find utility "ranlib", not a developer tool or in PATH

make: *** [libjpeg.a] Error 72

===================================================

I also noted this odd line at the beginning of the log file (I am not Karl Crisman)


===================================================

C compiler: gcc

C compiler version:

Using built-in specs.

COLLECT_GCC=/Applications/sage/local/bin/gcc

COLLECT_LTO_WRAPPER=/Applications/sage/local/bin/../libexec/gcc/x86_64-apple-darwin11.4.2/4.9.2/lto-wrapper

Target: x86_64-apple-darwin11.4.2

Configured with: ../src/configure --prefix=/Users/karl.crisman/Downloads/sage-6.5/local --with-local-prefix=/Users/karl.crisman/Downloads/sage-6.5/local --with-gmp=/Users/karl.crisman/Downloads/sage-6.5/local --with-mpfr=/Users/karl.crisman/Downloads/sage-6.5/local --with-mpc=/Users/karl.crisman/Downloads/sage-6.5/local --with-system-zlib --disable-multilib --disable-nls --enable-languages=c,c++,fortran --disable-libitm --without-isl --without-cloog  

Thread model: posix






Dima Pasechnik

unread,
Mar 23, 2015, 7:47:02 AM3/23/15
to sage-...@googlegroups.com


On Monday, 23 March 2015 10:22:40 UTC, peter metcalf wrote:
HI All

I'm trying to read jpg files using PIL or matplotlib

any help/suggestions would be most welcome!

the following fails

sage -i libjpeg-6b

the relevant part of the log file may be

==================================================

gcc -fPIC  -I.   -c -o jmemmgr.o jmemmgr.c

gcc -fPIC  -I.   -c -o jmemnobs.o jmemnobs.c

rm -f libjpeg.a

ar rc libjpeg.a  jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o jcsample.o jchuff.o jcphuff.o jcdctmgr.o jfdctfst.o jfdctflt.o jfdctint.o jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o jcomapi.o jutils.o jerror.o jmemmgr.o jmemnobs.o

ranlib libjpeg.a

sh: line 1:  4325 Trace/BPT trap: 5       /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk / -find ranlib 2> /dev/null

ranlib: error: unable to find utility "ranlib", not a developer tool or in PATH

make: *** [libjpeg.a] Error 72

===================================================

I also noted this odd line at the beginning of the log file (I am not Karl Crisman)


it just tells us that you are running a binary distribution of Sage built by Karl.

I suspect that the problem is that the package you're trying to install is a very old (from 2007)
and since then OSX has changed much. And there is no regular testing of experimental packages,
so you're more or less on your own here.

By the way, are you sure you have XCode's command line tools installed?

If yes, it might mean that you need to replace a call to ranlib to an equavalent call to ar:
at least on Linux:
"running ranlib is completely equivalent to executing ar -s"

So you might edit the spkg-install script to fix it, or create a ranlib shell script that will
call ar...

Let us know if this works.

Dmitrii

peter metcalf

unread,
Mar 23, 2015, 2:00:28 PM3/23/15
to sage-...@googlegroups.com
Thanks Dmitrii

I also get errors with

sage -f python

so there is something more fundamental going on than the problem with libjpeg-6b

I think I do have Xcode command line tools installed 

since 'xcode-select -p'  returns
/Applications/Xcode.app/Contents/Developer

This is the first error in /Applications/sage/logs/pkgs/python.log

=======================

checking for int64_t... yes

checking for ssize_t... yes

checking size of int... 0

checking size of long... 0

checking size of void *... 0

checking size of short... 0

checking size of float... 0

checking size of double... 0

checking size of fpos_t... 0

checking size of size_t... configure: error: in `/Applications/sage/local/var/tmp/sage/build/python-2.7.8/src':

configure: error: cannot compute sizeof (size_t)

See `config.log' for more details

Error configuring Python.

================================================

This is the first error in /Applications/sage/local/var/tmp/sage/build/python-2.7.8/src/config.log

================================================

Target: x86_64-apple-darwin11.4.2

Configured with: ../src/configure --prefix=/Users/karl.crisman/Downloads/sage-6.5/local --with-local-prefix=/Users/karl.crisman/Downloads/sage-6.5/local --with-gmp=/Users/karl.crisman/Downloads/sage-6.5/local --with-mpfr=/Users/karl.crisman/Downloads/sage-6.5/local --with-mpc=/Users/karl.crisman/Downloads/sage-6.5/local --with-system-zlib --disable-multilib --disable-nls --enable-languages=c,c++,fortran --disable-libitm --without-isl --without-cloog  

Thread model: posix

gcc version 4.9.2 (GCC) 

configure:3818: $? = 0

configure:3807: gcc -V >&5

gcc: error: unrecognized command line option '-V'

gcc: fatal error: no input files

compilation terminated.

configure:3818: $? = 1

configure:3807: gcc -qversion >&5

gcc: error: unrecognized command line option '-qversion'

gcc: fatal error: no input files

compilation terminated.

configure:3818: $? = 1

configure:3838: checking whether the C compiler works

===========================================================

python.log

Volker Braun

unread,
Mar 23, 2015, 2:19:56 PM3/23/15
to sage-...@googlegroups.com
Can you try compiling Sage just from source, not inside the mac app...

peter metcalf

unread,
Mar 23, 2015, 2:47:41 PM3/23/15
to sage-...@googlegroups.com
Thanks

if I type 'make' in SAGE_ROOT this is the first sign of a problem - no installed math library found

===========================================

configure: Excellent, the C, C++ and Fortran compilers are all GCC 4.9.2

configure: Excellent, GCC 4.9.2 is later than the minimum

configure: needed to build Sage, which is GCC version 4.0.1

checking for sqrt in -lm... no

configure: This system has no maths library installed.

configure: error: Exiting, since a maths library was not found.

If you would like to try to build Sage anyway (to help porting),

export the variable 'SAGE_PORT' to something non-empty.

make[2]: *** [/Applications/sage/local/var/lib/sage/installed/prereq] Error 1

make[1]: *** [all] Error 2

==============================

Peter

Volker Braun

unread,
Mar 23, 2015, 3:23:10 PM3/23/15
to sage-...@googlegroups.com
Something is wrong with your xcode command line tools... can you try reinstalling them?

kcrisman

unread,
Mar 23, 2015, 4:26:41 PM3/23/15
to sage-...@googlegroups.com

it just tells us that you are running a binary distribution of Sage built by Karl.


Which is odd, because I only make the 10.7 binary, which you shouldn't need to run. 

Peter Metcalf

unread,
Mar 23, 2015, 5:45:04 PM3/23/15
to sage-...@googlegroups.com
Thanks Volker

after 2 hours of searching the web and trying various things there seems to be no obvious way of
reinstalling the xcode command line tools, or of uninstalling xcode and starting fresh

I know this is off topic for sage-devel but if anybody has done this please let me know

Peter


--
You received this message because you are subscribed to a topic in the Google Groups "sage-devel" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sage-devel/afAAsmZ2AoI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sage-devel+...@googlegroups.com.
To post to this group, send email to sage-...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

----------------------------------

Peter Metcalf


Associate Professor in Structural Biology
School of Biological Sciences
University of Auckland
Private Bag 92019 
Auckland 1010

cell 021 141 1783
skype ID pmet007

Courier address:

Room 121, Level 1
Thomas Building 110
3a Symonds Street
Auckland Central 1010










Volker Braun

unread,
Mar 23, 2015, 6:28:57 PM3/23/15
to sage-...@googlegroups.com
"xcode-select --install" usually works.

There is no reasonable way of uninstalling the command line tools.

To unsubscribe from this group and all its topics, send an email to sage-devel...@googlegroups.com.
To post to this group, send email to sage...@googlegroups.com.

Peter Metcalf

unread,
Mar 23, 2015, 6:33:43 PM3/23/15
to sage-...@googlegroups.com
OK - thanks

I reinstalled the command line tools and then the whole of Xcode from 

but still get errors with
sage -f python

I’ve attached the config log file below

Peter





On 24/03/2015, at 8:23 am, Volker Braun <vbrau...@gmail.com> wrote:

--
You received this message because you are subscribed to a topic in the Google Groups "sage-devel" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sage-devel/afAAsmZ2AoI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sage-devel+...@googlegroups.com.
To post to this group, send email to sage-...@googlegroups.com.
config.log

Francois Bissey

unread,
Mar 23, 2015, 8:33:28 PM3/23/15
to sage-...@googlegroups.com
From config.log

as: error: unable to locate xcodebuild, please make sure the path to the Xcode folder is set correctly!
as: error: You can set the path to the Xcode folder using /usr/bin/xcode-select -switch

I am at eResearchNZ2015 with a NeSI t-shirt are you here as well?

François

> On 24/03/2015, at 11:33, Peter Metcalf <peter....@auckland.ac.nz> wrote:
>
> <config.log>

Volker Braun

unread,
Mar 23, 2015, 8:49:24 PM3/23/15
to sage-...@googlegroups.com
You are still using the compiler shipped inside the mac app. Download the source tarball (sage-6.5.tar.gz), unpack in your home directory, and run "make".

Configured with: ../src/configure --prefix=/Users/karl.crisman/Downloads/sage-6.5/local --with-local-prefix=/Users/karl.crisman/Downloads/sage-6.5/local --with-gmp=/Users/karl.crisman/Downloads/sage-6.5/local --with-mpfr=/Users/karl.crisman/Downloads/sage-6.5/local --with-mpc=/Users/karl.crisman/Downloads/sage-6.5/local --with-system-zlib --disable-multilib --disable-nls --enable-languages=c,c++,fortran --disable-libitm --without-isl --without-cloog  

To unsubscribe from this group and all its topics, send an email to sage-devel...@googlegroups.com.
To post to this group, send email to sage...@googlegroups.com.

Peter Metcalf

unread,
Mar 24, 2015, 2:07:04 AM3/24/15
to sage-...@googlegroups.com

All good now - thanks very much for your help

Peter


To unsubscribe from this group and all its topics, send an email to sage-devel+...@googlegroups.com.
To post to this group, send email to sage-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages