Bug #1101
i686-w64-mingw32-g++: error: localtime.o: No such file or directory
100%
Description
I tried to cross-compile Exiv2 using the MinGW-w64 compiler (--host=i686-w64-mingw32
), with static libraries disabled (--disable-static
).
But building failed with:
libtool: link: i686-w64-mingw32-g++ -o ../bin/.libs/exiv2 exiv2.o actions.o utils.o localtime.o ./.libs/libexiv2.dll.a -lpsapi -lwldap32 -lws2_32 -L/usr/local/lib i686-w64-mingw32-g++: error: localtime.o: No such file or directory
Apparently that's because localtime.c
was compiled with libtool, unlike the other *.o files that are needed for the exiv2 executable.
But OTOH, localtime.c
must be compiled with libtool, because it's part of the library.
The attached two patches seems to fix it. Hopefully they don't break anything else. :)
Files
Associated revisions
History
Updated by Robin Mills about 6 years ago
- Category set to build
- Status changed from New to Assigned
- Assignee set to Robin Mills
- Target version set to 0.26
Updated by Robin Mills about 6 years ago
- Status changed from Assigned to Resolved
- % Done changed from 0 to 100
- Estimated time changed from 3.00 h to 1.00 h
Jakub
Thanks for reporting this and providing the patches. I've submitted EXIVCSRC-no-localtime.diff (with a little change) r3984. I prefer the libtool magic build - feels safer to let him perform his weird magic.
This localtime thing is magic at its worst. Something very wrong with the library standardisation process that this ugly little thing is needed (and ditto for src/getopt_win32.c with I believe is only used by Visual Studio).
Our build server (http://exiv2.dyndns.org:8080) has successfully built and run on test suite with your change on Mac/Linux/MinGW/Cygwin (all 64 bit builds by default). I confess that I never cross-compile Exiv2. Perhaps you could perform that build and let me know if you encounter an issue. http://exiv2.dyndns.org:8080/job/Exiv2-trunk/2182/
I'm optimistically going to set the status to 100% Resolved.
Updated by Robin Mills almost 6 years ago
- Status changed from Resolved to Closed
I'm going to close this one. Thanks to Jakub for this contribution.
#1101. Thank You to Jakub for reporting this and providing a patch.