Hello, I am trying to build PLplot on Windows. As I have a Cygwin environment and want to build for (native) Mingw, used the cross-compiling scheme as described on the Wiki (https://sourceforge.net/p/plplot/wiki/Building_PLplot_with_a_cross-compiler/) and mailing list (https://sourceforge.net/p/plplot/mailman/plplot-general/thread/alpine.DEB.2.11.1710051507310.4357%40enira.zlyna.ubzr/#msg36065593).
So I started with a Cygwin build: mkdir build_cygwin cd build_cygwin cmake -DCMAKE_C_COMPILER=gcc ../PLplot make all which works fine. Then a made a new build folder for the Mingw build: mkdir build_mingw cd build_mingw cmake -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc -DCMAKE_INSTALL_PREFIX=/usr/x86_64-w64-mingw32/sys-root/mingw -DCMAKE_NATIVE_BINARY_DIR=../build_cygwin ../PLplot make all It fails with the following message: [ 8%] Generating tai-utc.h Cannot open first file as readable make[2]: *** [lib/qsastime/CMakeFiles/tai-utc.h_built.dir/build.make:74: lib/qsastime/tai-utc.h] Fehler 1 make[1]: *** [CMakeFiles/Makefile2:869: lib/qsastime/CMakeFiles/tai-utc.h_built.dir/all] Fehler 2 make: *** [Makefile:156: all] Fehler 2 It looks like that tai-utc-gen.exe, which is now build with Mingw toolchain cannot deal with the given Cygwin-style path parameter. In cross-compiling mode, I would have expected that the either the needed header files are copied from the native build or the generator executables are taken from there. When I manually copy the generated header files (./lib/qsatime/tai-utc.h ./lib/qsatime/deltaT.h and ./include/plhershey-unicode.h) from build_cygwin to build_mingw, the build continues successfully. An interesting observation is that during configure of the Mingw build, cmake reports an unused variable CMAKE_NATIVE_BINARY_DIR. I played around with setting CMAKE_CROSSCOMPILING=TRUE or moving CMAKE_C_COMPILER= x86_64-w64-mingw32-gcc to a toolchain file, which is called via CMAKE_TOOLCHAIN_FILE=toolchain.cmake with no difference. Am I missing something here? Any help is greatly appreciated. Best regards, Kay-Uwe Kirstein
_______________________________________________ Plplot-general mailing list Plplot-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-general