Project

General

Profile

Bug #1102

install: cannot stat '../bin/.libs/exiv2.exe': No such file or directory

Added by Jakub Wilk over 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
build
Target version:
Start date:
09 Aug 2015
Due date:
% Done:

100%

Estimated time:
4.00 h

Description

I tried to cross-compile Exiv2 using the MinGW-w64 compiler (--host=i686-w64-mingw32).
But make install failed with:

libtool: install: /usr/bin/install -c ../bin/.libs/exiv2.exe /home/jwilk/windows/usr/local/bin/exiv2.exe
/usr/bin/install: cannot stat '../bin/.libs/exiv2.exe': No such file or directory
Makefile:277: recipe for target 'install' failed

Apparently the install target depends on $(EXIV2BIN), but then it tries to install $(EXIV2EXE).

The attached patch gets rid of EXIV2BIN, and uses EXIV2EXE everywhere instead.


Files

EXIV2EXE.diff (1.28 KB) EXIV2EXE.diff Jakub Wilk, 09 Aug 2015 14:16
exiv2-r4196.zip (1.39 MB) exiv2-r4196.zip Jakub Wilk, 29 Jan 2016 20:54

Related issues

Related to Exiv2 - Bug #1159: fff.h:33:2: error: 'BYTE' does not name a typeClosed29 Jan 2016

Actions

Associated revisions

Revision 3985 (diff)
Added by Robin Mills about 6 years ago

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

Revision 4375 (diff)
Added by Robin Mills over 5 years ago

#1102. Correction to r4365. canonmn.cpp#1238 should not have been changed. Thanks to Sridhar for bringing this to my attention.

History

#1

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
#2

Updated by Robin Mills about 6 years ago

  • Estimated time set to 3.00 h
#3

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

Submitted: r3985 Thanks for reporting this and providing the patch. As you know, I never cross-compile. Perhaps you could build/test this and let me know if you encounter an issue. Here are the instructions to run the test suite: http://dev.exiv2.org/projects/exiv2/wiki/How_do_I_run_the_test_suite_for_Exiv2

I've reviewed the code in samples/Makefile. I think that will successfully build the executables exiv2json.exe and friends. Some of the samples are build with the library (exifprint.exe) and I'm not too confident that these will be correctly cross-compiled. I'll cross-compile and investigate this today.

I'm going to optimistically change the status to Resolved/100%.

#4

Updated by Robin Mills about 6 years ago

I don't know how to get the cross-compiler to work. On Linux (ubuntu 15.04) I've installed the tools:

sudo apt-get install gcc-i686-w64-mingw32
sudo apt-get install gcc-mingw32-w64-i686
sudo apt-get install gcc-mingw-i686-dev
sudo apt-get install mingw-w64-i686-dev
sudo apt-get install binutils-mingw-w64-i686 g++-mingw-w64-i686 gcc-mingw-w64-i686
sudo apt-get install ming-w64
However when I build exiv2, it produces an ominous warning.
env CXXFLAGS=--target=i686-w64-mingw32 CFLAGS=--target=i686-w64-mingw ./configure
..
make
...
cc1plus: warning: command line option ‘-ftarget=i686-w64-mingw32’ is valid for Java but not for C++ [enabled by default]
I've tried to cross compile zlib-1.2.8 and expat which have no dependencies. No .exe or .dll has been generated. Not convinced this is working.

If you can cross-compile can you post exiv2.exe (and the expat dll) and I'll run the test suite on a MinGW/64 on the build server.

#5

Updated by Jakub Wilk about 6 years ago

This ./configure call doesn't look good. It should be:

./configure --host=i686-w64-mingw32 

(with no special CXXFLAGS or CFLAGS set)

I'll try to cross-build and run the tests later...

#6

Updated by Robin Mills almost 6 years ago

Jakub

Thanks for the tip about ./configure --host=i686-w64-mingw32 Here's what happens:

mkdir -pv ../bin 2>&1 > /dev/null
libtool: link: g++ -o ../bin/.libs/exiv2 exiv2.o actions.o utils.o  -L/home/rmills/gnu/exiv2/trunk/xmpsdk/src ./.libs/libexiv2.a -lz /usr/lib/x86_64-linux-gnu/libexpat.so -lpsapi -lwldap32 -lws2_32 -L/usr/lib/x86_64-linux-gnu -L/usr/local/lib
/usr/bin/ld: cannot find -lpsapi
/usr/bin/ld: cannot find -lwldap32
/usr/bin/ld: cannot find -lws2_32
collect2: error: ld returned 1 exit status
Makefile:253: recipe for target 'exiv2' failed
make[1]: *** [exiv2] Error 1
make[1]: Leaving directory '/home/rmills/gnu/exiv2/trunk/src'
Makefile:60: recipe for target 'all' failed
make: *** [all] Error 2
502 rmills@rmillsmbp-k1504:~/gnu/exiv2/trunk $
So, I don't have three libraries on Unix: psapi, wldap32 and ws2_32. I can easily dummy off the code that uses psapi in version.cpp. I'm not sure what we call in wldap32. ws2_32 is winsock. Not sure how to get them onto the Unix builder.

Jakub, if you have this build, I can easily run the test suite on your binaries if you zip and post them here.

#7

Updated by Jakub Wilk almost 6 years ago

The cross compiler shouldn't normally have any problem with finding these libraries.
But here, for some reason, the normal (non-cross) compiler was used for linking.
This is weird. I have no idea why this happened to you. It certainly never happened here.

Anyway, with svn r4196 (+ patch for #1159) I was able to successfully cross-build Exiv2.
I've attached the resulting binaries so that you can test them.

#8

Updated by Robin Mills almost 6 years ago

  • % Done changed from 100 to 30
  • Estimated time changed from 1.00 h to 3.00 h

Thanks for working on this Jakub. I'll test your binaries on Windows tomorrow.

I think you've solved the linking puzzle. My linux VM is linking the host libraries and not the platform libraries. I have several Linux VMs. I'll figure this out tomorrow.

Thanks for the patch for #1159. The MSVC build is failing, however I don't suspect your patch. I believe the MSVC build has been broken for a few days and haven't had time to investigate. So, I have a few things to fix on Saturday.

#9

Updated by Robin Mills almost 6 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 30 to 100
  • Estimated time changed from 3.00 h to 4.00 h

Jakub

I've fixed the MSVC build breaker r4198. There were two faults. One was introduced by r4179. However the other arrived with your patch and I changed

#include <windef.h>
to:
#include <windows.h>
Can you rebuild your cross-compilation as I may have accidentally broken that build configuration.

Thanks for providing the binaries. I ran the test suite. It mostly works OK. I see your build is 32 bit. It's occasionally crashing. I only use MinGW on the build server and always build and test 64 bits. I think there's something not in balance with the 32 bit MinGW installed on the buildserver. I'm not going to pursue this as I think the build is OK.

I tried to cross compile on another Linux VM with the usual frustration and lack of success. There's a pea-soup of symbols i686, mingw, x64 (and others). You have to align all of those correctly to install the correct versions of libexpat, libz, gcc and so on. I've concluded that I cannot support cross-compiling.

If you'd like to join the team to support cross-compiling I would be very pleased to accept your help. It would be good in v0.27 to add magic to Jenkins to cross compile (from Linux) and test (on MinGW 32/64). If you're interested in helping, I'll work with you to bring that to life.

However, at the moment, I have a about 400 hours of work scheduled for v0.26. http://dev.exiv2.org/projects/exiv2/news

Also available in: Atom PDF