#1057 closed defect (fixed)
ipp-2.4-cr0: libjpeg doesn't build on Mac OS X 10.5.2 PowerPC
| Reported by: | Michael Wood-Vasey | Owned by: | jhoblitt |
|---|---|---|---|
| Priority: | lowest | Milestone: | |
| Component: | misc | Version: | 2.4 |
| Severity: | minor | Keywords: | |
| Cc: | jester@… |
Description (last modified by )
jpeg-6b doesn't build on my Mac OS X 10.5.2 PowerPC. ltconfig can't identify the host type. I tried the fink version instead and copying to the ipp-2.4.darwin/include and ipp-2.4.darwin/lib directories but then the psLib configure didn't find or like the header file.
[wwoodvas@serenity psLib] configure --prefix=/Volumes/data/PS1/code/ipp-2.4.darwin --bindir=/Volumes/data/PS1/code/ipp-2.4.darwin/bin --libdir=/Volumes/data/PS1/code/ipp-2.4.darwin/lib --mandir=/Volumes/data/PS1/code/ipp-2.4.darwin/man --includedir=/Volumes/data/PS1/code/ipp-2.4.darwin/include --sysconfdir=/Volumes/data/PS1/code/ipp-2.4.darwin/etc --datadir=/Volumes/data/PS1/code/ipp-2.4.darwin/share --with-jpeg-include=/Volumes/data/PS1/code/ipp-2.4.darwin/include --with-jpeg-lib=/Volumes/data/PS1/code/ipp-2.4.darwin/lib/
[...]
checking GSL cflags... -I/sw/include
checking GSL ldflags... -L/sw/lib -lgsl -lgslcblas -lm
checking jpeglib.h usability... no
checking jpeglib.h presence... no
checking for jpeglib.h... no
configure: error: libjpeg headers not found. Obtain libjpeg from http://www.ijg.org/ or use --with-jpeg to specify location.
But
[wwoodvas@serenity psLib] ls /Volumes/data/PS1/code/ipp-2.4.darwin/include/jpeglib.h
Attachments (2)
Change History (17)
by , 18 years ago
comment:1 by , 18 years ago
Also needed to copy
jconfig.h
jerror.h
jmorecfg.h
into ipp-2.4.darwin/include directory since the default Makefile for jpeg-6b doesn't do this.
comment:2 by , 18 years ago
Oh, right. That's because the full sequence is
make
make install
make install-libs
(which implicitly 'make install-headers' as well).
comment:3 by , 18 years ago
| Summary: | libjpeg doesn't build on Mac OS X 10.5.2 PowerPC → ipp-2.4-cr0: libjpeg doesn't build on Mac OS X 10.5.2 PowerPC |
|---|
comment:4 by , 18 years ago
| Cc: | added |
|---|---|
| Version: | unspecified → 2.4 |
comment:5 by , 18 years ago
ltmain.sh isn't enough by itself. Please try the version I'm about to attach.
by , 18 years ago
| Attachment: | ipp-jpegsrc.v6b.tar.gz added |
|---|
libjpeg w/ gnuconf & libtool bits upgraded
comment:6 by , 18 years ago
Didn't work:
[wwoodvas@serenity psconfig] vi tagsets/ipp-2.4.libs
[wwoodvas@serenity psconfig] grep jpeg tagsets/ipp-2.4.libs
lib libjpeg NONE jpeg ipp-jpegsrc.v6b.tar.gz jpeg-6b Y --enable-shared NONE install-lib
# lib libjpeg NONE jpeg jpegsrc.v6b.tar.gz jpeg-6b Y --enable-shared NONE install-lib
inc jpeglib.h NONE NONE NONE NONE N NONE NONE NONE
[wwoodvas@serenity psconfig] pschecklibs -build -force libjpeg
examining C libraries based on tagsets/ipp-2.4.libs
psconfig version: ipp-2.4
bindir: /Volumes/data/PS1/code/ipp-2.4.darwin/bin
libdir: /Volumes/data/PS1/code/ipp-2.4.darwin/lib
incdir: /Volumes/data/PS1/code/ipp-2.4.darwin/include
mandir: /Volumes/data/PS1/code/ipp-2.4.darwin/man
setting architecture to: darwin
searching for libraries in: /sw/lib /Volumes/data/PS1/code/ipp-2.4.darwin/lib /Volumes/data/PS1/code/ipp-2.4.darwin/lib /Volumes/data/PS1/code/ipp-2.4.darwin/lib/mysql /lib /usr/lib /usr/X11R6/lib /usr/local/lib
searching for programs in: /Volumes/data/PS1/code/ipp-2.4.darwin/bin /scisoft/wx/bin /scisoft/tk/bin /scisoft/tcl/bin /scisoft/saord/bin /scisoft/bin /scisoft/skycatgaia/bin /scisoft/aXe/bin /scisoft/eclipse/bin /Volumes/data/PS1/code/ipp-2.4.darwin/bin /Users/wwoodvas/products/Darwin/idlutils/v4_10_6/bin /sw/bin /sw/sbin /usr/bin /bin /usr/sbin /sbin /usr/local/bin /usr/X11/bin /usr/X11R6/bin /usr/local/bin /Users/wwoodvas/local/bin
[...]
/Users/wwoodvas/localshare/eups/bin
extract libjpeg from ipp-jpegsrc.v6b.tar.gz
tar xvzf ipp-jpegsrc.v6b.tar.gz
jpeg-6b/
jpeg-6b/README
jpeg-6b/install.doc
[...]
jpeg-6b/testimg.bmp
jpeg-6b/testimg.jpg
jpeg-6b/testprog.jpg
jpeg-6b/testimgp.jpg
tardir: jpeg-6b
configure --prefix=/Volumes/data/PS1/code/ipp-2.4.darwin --bindir=/Volumes/data/PS1/code/ipp-2.4.darwin/bin --libdir=/Volumes/data/PS1/code/ipp-2.4.darwin/lib --mandir=/Volumes/data/PS1/code/ipp-2.4.darwin/man --includedir=/Volumes/data/PS1/code/ipp-2.4.darwin/include --sysconfdir=/Volumes/data/PS1/code/ipp-2.4.darwin/etc --datadir=/Volumes/data/PS1/code/ipp-2.4.darwin/share --enable-shared
checking for gcc... cc
checking whether the C compiler (cc ) works... yes
checking whether the C compiler (cc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking how to run the C preprocessor... cc -E
checking for function prototypes... yes
checking for stddef.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for size_t... yes
checking for type unsigned char... yes
checking for type unsigned short... yes
checking for type void... yes
checking for working const... yes
checking for inline... inline
checking for broken incomplete types... ok
checking for short external names... ok
checking to see if char is signed... yes
checking to see if right shift is signed... yes
checking to see if fopen accepts b spec... yes
checking for a BSD compatible install... /usr/bin/install -c
checking for ranlib... ranlib
checking host system type... powerpc-apple-darwin9.2.2
checking whether we are using GNU C... yes
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... none
checking whether ln -s works... yes
checking for ld used by GCC... /usr/libexec/gcc/powerpc-apple-darwin9/4.0.1/ld
checking if the linker (/usr/libexec/gcc/powerpc-apple-darwin9/4.0.1/ld) is GNU ld... no
checking whether the linker (/usr/libexec/gcc/powerpc-apple-darwin9/4.0.1/ld) supports shared libraries... no
checking for BSD-compatible nm... /usr/bin/nm -p
checking command to parse /usr/bin/nm -p output... no
checking how to hardcode library paths into programs... unsupported
checking for /usr/libexec/gcc/powerpc-apple-darwin9/4.0.1/ld option to reload object files... -r
checking dynamic linker characteristics... no
checking if libtool supports shared libraries... no
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking for objdir... .libs
creating libtool
checking libjpeg version number... 62
creating ./config.status
creating Makefile
creating jconfig.h
make
./libtool --mode=compile cc -O2 -I. -c ./jcapimin.c
./libtool: line 208: s,.*/g: No such file or directory
./libtool: line 615: -e: command not found
* Warning: inferring the mode of operation is deprecated.
* Future versions of Libtool will require --mode=MODE be specified.
./libtool: line 926: -e: command not found
./libtool: line 926: -e: command not found
./libtool: line 926: -e: command not found
./libtool: line 926: -e: command not found
./libtool: line 954: -e: command not found
./libtool: line 978: -e: command not found
: compile: cannot determine name of library object from `'
make: * [jcapimin.lo] Error 1
Makefile jcinit.c jddctmgr.c jmorecfg.h makljpeg.st
README jcmainct.c jdhuff.c jpegint.h maktjpeg.st
ansi2knr.1 jcmarker.c jdhuff.h jpeglib.h makvms.opt
ansi2knr.c jcmaster.c jdinput.c jpegtran.1 rdbmp.c
cderror.h jcomapi.c jdmainct.c jpegtran.c rdcolmap.c
cdjpeg.c jconfig.bcc jdmarker.c jquant1.c rdgif.c
cdjpeg.h jconfig.cfg jdmaster.c jquant2.c rdjpgcom.1
change.log jconfig.dj jdmerge.c jutils.c rdjpgcom.c
cjpeg.1 jconfig.doc jdphuff.c jversion.h rdppm.c
cjpeg.c jconfig.h jdpostct.c libjpeg.doc rdrle.c
ckconfig.c jconfig.mac jdsample.c libtool rdswitch.c
coderules.doc jconfig.manx jdtrans.c ltconfig rdtarga.c
config.guess jconfig.mc6 jerror.c ltmain.sh structure.doc
config.log jconfig.sas jerror.h makcjpeg.st testimg.bmp
config.status jconfig.st jfdctflt.c makdjpeg.st testimg.jpg
config.sub jconfig.vc jfdctfst.c makeapps.ds testimg.ppm
configure jconfig.vms jfdctint.c makefile.ansi testimgp.jpg
djpeg.1 jconfig.wat jidctflt.c makefile.bcc testorig.jpg
djpeg.c jcparam.c jidctfst.c makefile.cfg testprog.jpg
example.c jcphuff.c jidctint.c makefile.dj transupp.c
filelist.doc jcprepct.c jidctred.c makefile.manx transupp.h
install-sh jcsample.c jinclude.h makefile.mc6 usage.doc
install.doc jctrans.c jmemansi.c makefile.mms wizard.doc
jcapimin.c jdapimin.c jmemdos.c makefile.sas wrbmp.c
jcapistd.c jdapistd.c jmemdosa.asm makefile.unix wrgif.c
jccoefct.c jdatadst.c jmemmac.c makefile.vc wrjpgcom.1
jccolor.c jdatasrc.c jmemmgr.c makefile.vms wrjpgcom.c
jcdctmgr.c jdcoefct.c jmemname.c makefile.wat wrppm.c
jchuff.c jdcolor.c jmemnobs.c makelib.ds wrrle.c
jchuff.h jdct.h jmemsys.h makeproj.mac wrtarga.c
problem building libjpeg : failure in make
comment:7 by , 18 years ago
I think it's because the 'libtool' script now assumes that $SED is defined, e.g., lines 207--209:
---
# The name of this program:
progname=echo "$progpath" | $SED $basename
modename="$progname"
---
and then 265--269
---
# Sed substitution that helps us do robust quoting. It backslashifies
# metacharacters that are still active within double-quoted strings.
Xsed="${SED}"' -e 1s/X'
sed_quote_subst='s/\([
`
"$
]\)/
\1/g'
---
so then Xsed is just ' -e ls/X' and thus we get the "-e command not found" messages.
Yep, putting
---
SED="sed"
---
at the top of the file leads to successful compilation.
But, that just brings us to the next error during the 'make':
[...]
./libtool --mode=link cc -o libjpeg.la jcapimin.lo jcapistd.lo jctrans.lo jcparam.lo jdatadst.lo jcinit.lo jcmaster.lo jcmarker.lo jcmainct.lo jcprepct.lo jccoefct.lo jccolor.lo jcsample.lo jchuff.lo jcphuff.lo jcdctmgr.lo jfdctfst.lo jfdctflt.lo jfdctint.lo jdapimin.lo jdapistd.lo jdtrans.lo jdatasrc.lo jdmaster.lo jdinput.lo jdmarker.lo jdhuff.lo jdphuff.lo jdmainct.lo jdcoefct.lo jdpostct.lo jddctmgr.lo jidctfst.lo jidctflt.lo jidctint.lo jidctred.lo jdsample.lo jdcolor.lo jquant1.lo jquant2.lo jdmerge.lo jcomapi.lo jutils.lo jerror.lo jmemmgr.lo jmemnobs.lo \
-rpath /Volumes/data/PS1/code/ipp-2.4.darwin/lib -version-info 62
mkdir .libs
./libtool: line 5759: test: : integer expression expected
./libtool: line 5759: test: : integer expression expected
using piecewise archive linking...
./libtool: line 5781: test: : integer expression expected
./libtool: line 5781: test: : integer expression expected
./libtool: line 5781: test: : integer expression expected
./libtool: line 5781: test: : integer expression expected
./libtool: line 5781: test: : integer expression expected
[...]
./libtool: line 5781: test: : integer expression expected
./libtool: line 5781: test: : integer expression expected
./libtool: line 5781: test: : integer expression expected
ar cru .libs/libjpeg. jcapimin.;: .libs/libjpeg.
ar: jcapimin.: No such file or directory
ar cru .libs/libjpeg. jcapistd.;: .libs/libjpeg.
ar: jcapistd.: No such file or directory
ar cru .libs/libjpeg. jctrans.;: .libs/libjpeg.
ar: jctrans.: No such file or directory
[...]
./libtool --mode=compile cc -O2 -I. -c ./rdswitch.c
cc -O2 -I. -c ./rdswitch.c
./libtool --mode=compile cc -O2 -I. -c ./cdjpeg.c
cc -O2 -I. -c ./cdjpeg.c
./libtool --mode=link cc -o cjpeg cjpeg.lo rdppm.lo rdgif.lo rdtarga.lo rdrle.lo rdbmp.lo rdswitch.lo cdjpeg.lo libjpeg.la
cc -o cjpeg cjpeg. rdppm. rdgif. rdtarga. rdrle. rdbmp. rdswitch. cdjpeg. ./.libs/libjpeg.
powerpc-apple-darwin9-gcc-4.0.1: cjpeg.: No such file or directory
powerpc-apple-darwin9-gcc-4.0.1: rdppm.: No such file or directory
powerpc-apple-darwin9-gcc-4.0.1: rdgif.: No such file or directory
powerpc-apple-darwin9-gcc-4.0.1: rdtarga.: No such file or directory
powerpc-apple-darwin9-gcc-4.0.1: rdrle.: No such file or directory
powerpc-apple-darwin9-gcc-4.0.1: rdbmp.: No such file or directory
powerpc-apple-darwin9-gcc-4.0.1: rdswitch.: No such file or directory
powerpc-apple-darwin9-gcc-4.0.1: cdjpeg.: No such file or directory
make: * [cjpeg] Error 1
---
comment:8 by , 18 years ago
It looks like the "integer expected" message is coming because "max_cmd_len" is expected in "libtool":
[wwoodvas@serenity jpeg-6b] grep max_cmd_len libtool
test "$len" -le "$max_cmd_len" test "$max_cmd_len" -le -1; then
test "$len" -le "$max_cmd_len" test "$max_cmd_len" -le -1; then test "$len" -le "$max_cmd_len"; }; then
test "$len" -le "$max_cmd_len" test "$max_cmd_len" -le -1; then test "$len" -le "$max_cmd_len"; then
---
but is not defined anywhere in "libtool" (or anywhere else).
comment:9 by , 18 years ago
Hmm, there is something different going on between ppc and x86 osx than as this works on x86. I'll post a new package shortly.
comment:10 by , 18 years ago
Michael, are you planning to use powerpcs in a production-type environment?
comment:11 by , 18 years ago
| Priority: | high → lowest |
|---|
I have no plans to use Mac OS X PowerPC in a production setting. I will continue to use them as development machines, but I'm happy to step around whatever little gotchas remain in libjpeg. There are far more important things to work on.
comment:12 by , 18 years ago
Also worth noting, the stock libjpeg package builds on both x86 & ppc osx just fine when gnu libtool is NOT present. We've had trouble with libtool on osx in the past. What version do you have installed (libtool --version)?
comment:13 by , 18 years ago
| Cc: | added |
|---|
I was having a problem installing jpeg-6b on my PPC with 10.5.2. I found this recipe on http://wiki.roboteducation.org/MacOSX_Setup :
Install libraries to save and send your images as jpeg.
If you have fink or macports try installing libjpeg that way
(e.g. fink install libjpeg libjpeg-bin libjpeg-shlibs)
Otherwise follow these instructions to install libjpeg from source.
- download libjpeg http://www.ijg.org/files/jpegsrc.v6b.tar.gz
- untar that (tar -xvzf jpegsrc.v6b.tar.gz)
- cd jpeg-6b/
- ln -s
which glibtool./libtool - export MACOSX_DEPLOYMENT_TARGET=10.5 (for tcsh or csh use setenv MAXOSX_DEPLOYMENT_TARGET 10.4)
- ./configure --enable-shared --prefix=/usr/local/
- if /usr/local/ /usr/local/include /usr/local/lib don't exist create them:
- sudo mkdir /usr/local/
- sudo mkdir /usr/local/lib/
- sudo mkdir /usr/local/include/
- make
- sudo make install-lib
- sudo make install-headers
- export MACOSX_DEPLOYMENT_TARGET=
In point 4 i used:
ln -s /usr/bin/glibtool libtool
Which seems to work fine!
comment:14 by , 18 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
OSX instructions migrated to wiki as:
http://kiawe.ifa.hawaii.edu/IPPwiki/index.php/Libjpeg_on_OSX
comment:15 by , 17 years ago
| Description: | modified (diff) |
|---|
The link above should be Libjpeg_on_OSX on svn trac.

Updated ltmain.sh for libtool configuration