RSS/Atom feed Twitter
Site is read-only, email is disabled

OS X GIMP configure can't find JPEG library

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

4 of 7 messages available
Toggle history

Please log in to manage your subscriptions.

OS X GIMP configure can't find JPEG library Charles Belov 31 Mar 07:56
mailman.242402.1238479004.1... 07 Oct 20:27
  OS X GIMP configure can't find JPEG library M Gagnon 31 Mar 17:09
mailman.3.1238526004.32380.... 07 Oct 20:27
  OS X GIMP configure can't find JPEG library Charles Belov 01 Apr 09:15
mailman.242566.1238591257.1... 07 Oct 20:27
  OS X GIMP configure can't find JPEG library M Gagnon 01 Apr 15:17
Charles Belov
2009-03-31 07:56:58 UTC (over 15 years ago)

OS X GIMP configure can't find JPEG library

Okay, so I've built all (so far as I can tell) the ports I need using MacPorts, thanks again to the folks on this list. So I cd in OS X Terminal to the gimp-2.6.6-dev (my copy of gimp-2.6.6) folder and run configure.

First it complains I have no TIFF library. Well, I don't use TIFF so I reran with ./configure --without-libtiff

Result:

checking for jpeg_destroy_decompress in -ljpeg... no configure: WARNING: *** XJT plug-in will not be built (JPEG library not found) ***
configure: error:
*** Checks for JPEG library failed. You can build without it by passing *** --without-libjpeg to configure but you won't be able to use JPEGs then.

???? I use JPEG images, so that will never do. So I go nosing around.

echo $PATH per MacPorts gives
/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin

I look at configure, and it's looking for /${exec_prefix}/lib where /${exec_prefix}=NONE.

jpeglib.h (which does define jpeg_destroy_decompress) is in /opt/local/include
while /opt/local/lib contains
libjpeg.a
libjpeg.dylib
libjpeg.la
libjpeg.62.dylib
libjpeg.62.0.0

I tried changing configure such that exec_prefix=/opt/local and re-ran in but got the same error.

Anyone know what's up?

Charles Belov

M Gagnon
2009-03-31 17:09:35 UTC (over 15 years ago)

OS X GIMP configure can't find JPEG library

You will very likely need to fiddle with environment variables to help configure find it.
Especially check PKG_CONFIG_PATH

The following document (http://wiki.gimp.org/gimp/HowToCompileGimp/MacOSX), even though it was written to be used with native GTK and not macports, can probably contain
good ideas of what it can look like

-- Auria

Charles Belov
2009-04-01 09:15:10 UTC (over 15 years ago)

OS X GIMP configure can't find JPEG library

Date: Tue, 31 Mar 2009 11:09:35 -0400 From: M Gagnon
Subject: Re: [Gimp-developer] OS X GIMP configure can't find JPEG library To: gimp-developer@lists.XCF.Berkeley.EDU

You will very likely need to fiddle with environment variables to help configure find it.
Especially check PKG_CONFIG_PATH

Thanks, that got me a bit further in my investigations.

PKG_CONFIG_PATH was blank. I set it to /opt/local/lib/pkgconfig with the same result. Then I noticed that among the many libraries in that directory, libjpeg.pc and libtiff.pc were not among them, although libpng.pc was.

So I ran Onyx to make sure locate was up to date and interestingly:

$ locate .pc | grep 'png' /opt/local/lib/pkgconfig/cairo-png.pc /opt/local/lib/pkgconfig/libpng.pc
/opt/local/lib/pkgconfig/libpng12.pc /opt/local/var/macports/software/cairo/1.8.6_4+macosx/opt/local/lib/pkgconfig/cairo-png.pc /opt/local/var/macports/software/libpng/1.2.35_0/opt/local/lib/pkgconfig/libpng.pc /opt/local/var/macports/software/libpng/1.2.35_0/opt/local/lib/pkgconfig/libpng12.pc $ locate .pc | grep 'jp'
$ locate .pc | grep 'tiff'
$

Yeah, no .pc files for libjpeg or libtiff.

And its apparently a feature, not a bug--I've seen posts saying that the JPEG folks never creating a .pc file for libjpeg.

So then the question is how do I point configure to one of the following directories for libjpeg?

/opt/local/var/macports/software/jpeg/6b_3/opt/local/lib/ /opt/local/lib/
/Applications/Gimp.app/Contents/Resources/ (this appears to be the resource fork of Gimp.app, which was installed from the .dmg file)

I tried sticking /opt/local/lib on the end of both PATH and PKG_CONFIG_PATH and that didn't help either.

LD_LIBRARY_PATH=/opt/local/bin PATH=/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/opt/local/lib PKG_CONFIG_PATH=/opt/local/lib/pkgconfig:/opt/local/lib

All to no avail. Any further ideas? Charles Belov

M Gagnon
2009-04-01 15:17:38 UTC (over 15 years ago)

OS X GIMP configure can't find JPEG library

Indeed, I pointed out PKG_CONFIG_PATH for other dependencies -- libjpeg doesn't use pkg-config.

LD_LIBRARY_PATH=/opt/local/bin

First of all, this environment variable is Linux-specific =) The mac equivalent would be DYLD_LIBRARY_PATH See
http://developer.apple.com/DOCUMENTATION/Darwin/Reference/ManPages/man1/dyld.1.html

PATH=/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/opt/local/lib

PATH is for executables; so it's quite unlikely you will have executables in /opt/local/lib.
/opt/local/bin makes much more sense

So setting DYLD_LIBRARY_PATH should help; otherwise, check config.log/configure.log (not sure about the name) to see precisely what's happening. Then you can pass additional flags to gcc using e.g. CFLAGS="..."

-- Auria