0.6.1 does not build on OS X
|Assignee:||Andreas Huggel||% Done:|
Downloaded 0.6.1 tarball & uncompressed. cd into it, ./configure, then make. After a number of warning messages (see today's other issue), the compilation failed with:
g++ canonmn.so datasets.so exif.so fujimn.so ifd.so image.so iptc.so makernote.so metadatum.so nikonmn.so sigmamn.so tags.so types.so value.so -shared -fPIC -o libexiv2.so
g++: unrecognized option `-shared'
ld: Undefined symbols:
make1: * [libexiv2.so] Error 1
make: * [all] Error 2
Perhaps this is useful:
white:~/Desktop/exiv2-0.6.1 tlunde$ g++ --version
g++ (GCC) 3.3 20030304 (Apple Computer, Inc. build 1495)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#1 Updated by Thomas Lunde about 13 years ago
Shared libraries are different on OS X than many other flavors of unix. Here are couple of references on how others dealt with this:
(reporting success with a shared library build; the configure script for octave should have the relevant options)
(reporting a method to force static usage on OS X)
http://lists.gnu.org/archive/html/bug-gmp/2002-10/msg00013.html (this is dated info; it was as of OS X 10.2 and I'm running 10.3; the shared lib situation has somewhat improved)
#2 Updated by Thomas Lunde about 13 years ago
Forcing a static build by manually changing config.mk (after running ./configure) to read:
STATIC_LIBS = 1
instead of the
SHARED_LIBS = 1
which configure produces does allow the build to complete & appears to create usable binaries (although obviously at the cost of memory, diskspace, etc.).
Sorry that my gnu-auto* fu isn't good enough to know how to appropriately patch the autoconf stuff.
#3 Updated by Thomas Lunde about 13 years ago
Using one of the suggestions in the links and replacing:
LDFLAGS_SHARED = $(LDFLAGS) -shared -fPIC
LDFLAGS_SHARED = $(LDFLAGS) -flat_namespace -undefined suppress -bundle -fPIC
in config.mk allows the build to get farther, but it stops with:
g++ -Wall -O2 addmoddel.o -L. -L/usr/local/lib -lexiv2 -o addmoddel
ld: can't locate file for: -lexiv2
make1: * [addmoddel] Error 1
make: * [all] Error 2