Bug #1101

i686-w64-mingw32-g++: error: localtime.o: No such file or directory

Added by Jakub Wilk almost 2 years ago. Updated over 1 year ago.

Status:ClosedStart date:09 Aug 2015
Priority:NormalDue date:
Assignee:Robin Mills% Done:

100%

Category:buildEstimated time:1.00 hour
Target version:0.26

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. :)

EXIV2COBJ-no-libtool.diff Magnifier (242 Bytes) Jakub Wilk, 09 Aug 2015 13:15

EXIVCSRC-no-localtime.diff Magnifier (355 Bytes) Jakub Wilk, 09 Aug 2015 13:15

Associated revisions

Revision 3984
Added by Robin Mills almost 2 years ago

#1101. Thank You to Jakub for reporting this and providing a patch.

History

#1 Updated by Robin Mills almost 2 years ago

  • Category set to build
  • Status changed from New to Assigned
  • Assignee set to Robin Mills
  • Target version set to 0.26

#2 Updated by Robin Mills almost 2 years ago

  • Estimated time set to 3.00

#3 Updated by Robin Mills almost 2 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 100
  • Estimated time changed from 3.00 to 1.00

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.

#4 Updated by Robin Mills over 1 year ago

  • Status changed from Resolved to Closed

I'm going to close this one. Thanks to Jakub for this contribution.

Also available in: Atom PDF

Redmine Appliance - Powered by TurnKey Linux