Closed claudeha closed 4 years ago
We are definitely focusing more effort on making sure the cmake path of compiling works in the current master, and going forward we may deprecate and remove the automake stuff, since the cmake path works to generate builds for more systems. That being said, what you say sounds like the correct change.
But if you could give a go at cross compiling the current master branch using the cmake toolchain mechanism (see the comment at the top of cmake/Toolchain-mingw.cmake), and let me know success / failure, I would appreciate it as I've only tested this under Arch. You may need to edit the file if you have different paths, or want different flags, and that is expected given it's a toolchain file.
One thing the cmake mechanism provides is the CMAKE_CROSSCOMPILING_EMULATOR setting, which can be set to wine, in case PE binaries are not registered as a binary type to launch with wine, or if you need to run an emulator. Do you think that would be needed as well for the automake setup?
It fails with a separate problem:
[ 8%] Building CXX object IlmBase/IlmThread/CMakeFiles/IlmThread.dir/IlmThread.cpp.obj
In file included from /home/claude/tmp/bug544/openexr/IlmBase/IlmThread/IlmThread.cpp:45:
/home/claude/tmp/bug544/openexr/IlmBase/IlmThread/IlmThread.h:143:10: error: ‘thread’ in namespace ‘std’ does not name a type
std::thread _thread;
^~~~~~
I have successfully built it by hacking out the #include <thread>
and #include <mutex>
and replacing them with references to the header-only library https://github.com/meganz/mingw-std-threads (by editing the source code to the full paths on my system).
$ x86_64-w64-mingw32-g++ --version x86_64-w64-mingw32-g++ (GCC) 8.3-win32 20190406
Debian Buster.
I'm happy to add the $(EXEEXT) to the Makefile.am's, although you mention 6 and 8 references, I only see 2 in each file - eLut and toFloat in Half and b44ExpLogTable and dwaLookups in IlmImf, what am I missing?
I do notice that the automake-generated Makefiles already append the $(EXEEXT) to the program names, so it should be just the invocation lines in Makefile.am, right?
It's worth noting that our plan is to eliminate this build-time code-generation step from the build process entirely in the next release, because it's so fragile.
On 05/09/2019 18:08, Cary Phillips wrote:
I'm happy to add the $(EXEEXT) to the Makefile.am's, although you mention 6 and 8 references, I only see 2 in each file - eLut and toFloat in Half and b44ExpLogTable and dwaLookups in IlmImf, what am I missing?
for each program: ./invocation, CLEANFILES, right hand side of rule dependencies, noinst_PROGRAMS - I added it to all of those, seemed to do no harm, don't know if all are necessary or correct.
I do notice that the automake-generated Makefiles already append the $(EXEEXT) to the program names, so it should be just the invocation lines in Makefile.am, right?
I'm no automake expert, I just hacked this stuff to make it build (with the previous release archives). And if the autoconf build system is deprecated in favour of cmake I don't know whether it's worth to fix it before it goes away.
It's worth noting that our plan is to eliminate this build-time code-generation step from the build process entirely in the next release, because it's so fragile.
Great.
The <thread>
and <mutex>
are part of libstdc++ and c++11, which says your gcc / g++ install is not complete for mingw, I have no such issues with those headers under arch.
We've now deprecated the build-time header generation entirely, the headers are now regular source files, to avoid this very kind of issue. Hopefully this resolves the matter.
Context: cross-compiling from Debian Buster Linux x86_64 (with i686 multiarch and Wine) to Microsoft Windows x86_64 and i686 using MINGW W64.
./configure
reportschecking for suffix of executables... .exe
but this information is not used when invoking./eLut
(which is really in./eLut.exe
), thus the command is not found and the build fails.AFAICT the solution is to put in
$(EXEEXT)
in all the Makefile.am everywhere after the names of programs that are run at compile time, for example./eLut$(EXEEXT)
. My count is 8 occurrences needed inIlmBase/Half/Makefile.am
and 6 inOpenEXR/IlmImf/Makefile.am
.