From: Kirstein, Kay-U. <kay...@us...> - 2021-05-12 13:39:26
|
Hi Arjen, thanks for your fast answer. Using a cross-compiling scheme was my first natural choice as the MinGW-w64 toolchain I am using is located in my Cygwin environment and the generated PLplot libs should be also located there (there is a different sys-root for native Windows stuff, not relying on Cygwin.dll). The MinGW-tools themselves rely on the Linux-style path names, but any executable generated by them, e.g., tai-utc-gen.exe expect Windows-style path names. Anyway, I will try to perform a native Windows build outside of Cygwin, but I might need another version of the MinGW-w64 toolchain as you are pointing out. Best regards, Kay-Uwe Von: Arjen Markus <Arj...@de...> Gesendet: Mittwoch, 12. Mai 2021 08:40 An: Kirstein, Kay-Uwe <kay...@us...>; plp...@li... Betreff: RE: Cross-compiling in Cygwin Hi Kay-Uwe, I have never tried this cross-compilation, but your observation about the paths not being recognized does ring a bell. MinGW-w64/MSYS2 (to call it by its most descriptive name) comes with two environments, one very Linux-like, and therefore compatible with Cygwin in its style of path identification and one that is more Windows-like and therefore uses a Windows-style of path identification. (Don't pin me down though on the details - they always confuse me) That said, I do not have a solution/workaround for the problem. But do you really need to cross-compile? Regards, Arjen From: Kirstein, Kay-Uwe <kay...@us...> Sent: 12 May 2021 08:06 To: plp...@li... Subject: [Plplot-general] Cross-compiling in Cygwin 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/<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fp%2Fplplot%2Fwiki%2FBuilding_PLplot_with_a_cross-compiler%2F&data=04%7C01%7C%7C5799754a8da548dde6aa08d9150e3049%7C15f3fe0ed7124981bc7cfe949af215bb%7C0%7C1%7C637563972950272988%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0&sdata=48uVqrq4LeHA8%2BT7XHqaYxPruOsIsOJuvTVQwZWRveE%3D&reserved=0>) and mailing list (https://sourceforge.net/p/plplot/mailman/plplot-general/thread/alpine.DEB.2.11.1710051507310.4357%40enira.zlyna.ubzr/#msg36065593<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fp%2Fplplot%2Fmailman%2Fplplot-general%2Fthread%2Falpine.DEB.2.11.1710051507310.4357%2540enira.zlyna.ubzr%2F%23msg36065593&data=04%7C01%7C%7C5799754a8da548dde6aa08d9150e3049%7C15f3fe0ed7124981bc7cfe949af215bb%7C0%7C1%7C637563972950282943%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0&sdata=Jyy8V45v9T9FB8cbUlgACAUyJrERgLQfmg3LAV2jGi4%3D&reserved=0>). 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 DISCLAIMER: This message is intended exclusively for the addressee(s) and may contain confidential and privileged information. If you are not the intended recipient please notify the sender immediately and destroy this message. Unauthorized use, disclosure or copying of this message is strictly prohibited. The foundation 'Stichting Deltares', which has its seat at Delft, The Netherlands, Commercial Registration Number 41146461, is not liable in any way whatsoever for consequences and/or damages resulting from the improper, incomplete and untimely dispatch, receipt and/or content of this e-mail. |