install: cannot stat '../bin/.libs/exiv2.exe': No such file or directory
|Status:||Closed||Start date:||09 Aug 2015|
|Assignee:||Robin Mills||% Done:|
|Category:||build||Estimated time:||4.00 hours|
I tried to cross-compile Exiv2 using the MinGW-w64 compiler (
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
install target depends on
$(EXIV2BIN), but then it tries to install
The attached patch gets rid of
EXIV2BIN, and uses
EXIV2EXE everywhere instead.
#3 Updated by Robin Mills over 2 years ago
- Status changed from Assigned to Resolved
- % Done changed from 0 to 100
- Estimated time changed from 3.00 to 1.00
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 over 2 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-w64However 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.
#6 Updated by Robin Mills over 2 years ago
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: *** [exiv2] Error 1 make: 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 over 2 years ago
- File exiv2-r4196.zip added
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.
#8 Updated by Robin Mills over 2 years ago
- % Done changed from 100 to 30
- Estimated time changed from 1.00 to 3.00
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 over 2 years ago
- Status changed from Resolved to Closed
- % Done changed from 30 to 100
- Estimated time changed from 3.00 to 4.00
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