Add list of things to do in the future

v0.27.3
Luis Diaz Mas 8 years ago committed by Luis Diaz Mas
parent 6be5278dd2
commit ca9ef34ea0

@ -0,0 +1,120 @@
2017-08-17
Puzzle with autotools/--with-adobe (solved: seems to confined to my Mac Book Pro).
-----------------------------------------------------------------------------------
The --with-adobe code is new (added on Monday/Tuesday 2017-08-15).
It's very much "Work in Progress" and will get lots more polishing.
This builds and links on Mac and Linux (Cygwin isn't ready yet).
Autotools isn't used with Visual Studio
Default build (which compile/links xmpsdk/src) is fine (and passes test suite)
$ sudo make distclean ; make config ; ./configure ; make ; sudo make install ; make samples ; make tests
To build with the external Adobe SDK:
$ sudo make distclean ; make config ; ./configure --with-adobe ; make
Linux --with-adobe is working when I remove calls to DeleteNamespace in src/xmp.cpp.
The test suite is mostly OK. Some XMP output format has changed.
There are some test crashes to be investigated.
So, this issue only concerns linking on the Mac.
The following command works:
$ bin/exiv2 http://clanmills.com/Stonehenge.jpg is working
The following command crashes when it attempts to execute XMPsdk code
$ bin/exiv2 --verbose --version
........
config_path=/Users/rmills/.exiv2
uid=501
euid=501
gid=20
dyld: lazy symbol binding failed: Symbol not found: _WXMPMeta_Initialize_1
Referenced from: /Users/rmills/gnu/github/exiv2/src/.libs/libexiv2.26.dylib
Expected in: flat namespace
dyld: Symbol not found: _WXMPMeta_Initialize_1
Referenced from: /Users/rmills/gnu/github/exiv2/src/.libs/libexiv2.26.dylib
Expected in: flat namespace
Abort trap: 6
$
This is correct. libXMPCore.a is not in the mix.
ls -alt src/.libs/libexiv2.26.dylib
-rwxr-xr-x+ 1 rmills staff 2238124 Aug 17 11:07 src/.libs/libexiv2.26.dylib
-------
Edit src/Makefile#242 and change:
@$(LIBTOOL) --mode=link $(LINK.cc) -o ../bin/$@ $(LIBRARY) $(EXIV2OBJ) $(EXIV2COBJ) -rpath $(libdir)
to:
@$(LIBTOOL) --mode=link $(LINK.cc) -lXMPCore -o ../bin/$@ $(LIBRARY) $(EXIV2OBJ) $(EXIV2COBJ) -rpath $(libdir)
$ touch src/version.cpp src/exiv2.cpp ; make
$ ls -alt src/.libs/libexiv2.26.dylib
-rwxr-xr-x+ 1 rmills staff 4312308 Aug 17 11:17 src/.libs/libexiv2.26.dylib
-------
$ bin/exiv2
dyld: Symbol not found: __ZNSiD0Ev
Referenced from: /Users/rmills/gnu/github/exiv2/src/.libs/libexiv2.26.dylib
Expected in: flat namespace
in /Users/rmills/gnu/github/exiv2/src/.libs/libexiv2.26.dylib
Abort trap: 6
605 rmills@rmillsmbp:~/gnu/github/exiv2 $
$ c++filt _ZNSiD0Ev
std::basic_istream<char, std::char_traits<char> >::~basic_istream()
It appears that libexiv2.26.dylib isn't linked to the STL libraries.
However I think problem may be with the "flat namespace" which tells the
dynamic linker to search for library names. The search order is:
$ otool -L bin/.libs/exiv2
bin/.libs/exiv2:
/usr/local/lib/libexiv2.26.dylib (compatibility version 26.0.0, current version 26.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.60.2)
/usr/local/lib/libintl.8.dylib (compatibility version 10.0.0, current version 10.2.0)
/usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
/usr/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
/usr/local/lib/libexpat.1.dylib (compatibility version 8.0.0, current version 8.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 307.5.0)
So, when he's loading libexiv2.26.dylib, he needs a symbol from libc++.1.dylib
Amazingly, I got it to work on Wednesday morning.
I must have been confused. Something was working!
Notes (mostly to remind of painful discoveries)
-----------------------------------------------
How does the build get generated?
$ make config
This generates ./configure by reading config/configure.ac
When you use --with-adobe, CXXFLAGS and LDFLAGS are modified and ENABLE_XMP is set to 2016.
Makefile has code to execute the script xmpsdk/buildXMPsdk.sh which
downloads and builds the XMPsdk to create libCore.a (which we need) and libFiles.a
config/config.mk.in is converted into config/config.mk and included in xmpsdk/src/Makefile
This is really ugly. config.mk also messes with CPPFLAGS and LDFLAGS
To get -lXMPCore into the mix, set XMPSDK_LIBS in config/config.mk.in
XMPSDK_LIBS = -lXMPCore
508 rmills@rmillsmbp:~/gnu/github/exiv2 $ finder Makefile | xargs grep -H config.mk | grep include
./contrib/organize/Makefile:include $(top_srcdir)/config/config.mk
./doc/Makefile:include $(top_srcdir)/config/config.mk
./samples/Makefile:include $(top_srcdir)/config/config.mk
./src/Makefile:include $(top_srcdir)/config/config.mk
./xmpsdk/src/Makefile:include $(top_srcdir)/config/config.mk
509 rmills@rmillsmbp:~/gnu/github/exiv2 $
Features to Add to the CMake code
-----------------------------------------------------------------------------------
* Auto usage of ccache on Linux and Mac.
* Remove the trick to compile the documentation using the configure script. Native documentation generation on CMake.
Loading…
Cancel
Save