Cross-compiling on Linux for Windows via x86_64-w64-mingw32-g++
Dear all, first of all, I want to thank you all for this very nice piece of software. I am currently developing a Python package to wrap the finite element library oomph-lib in Python. GiNaC is required here to generate C code which is compiled on the fly to quickly assemble the weak forms which are defined in Python. In some sense, this is similar to the finite element library FEniCS, which also uses GiNaC, but oomph-lib provides better capabilities for multi-physics and ALE methods. My Python code works perfect in Linux, but as a long time goal, I also want to produce Python Wheels for Windows. However, I have a hard time to cross-compile GiNaC and CLN for Windows (64 bit). Does anyone has some experience with that? I am aware of the precompiled Windows binary, but they seem to be a bit out of date... I am grateful for any input. Best regards, Christian
Hi Christian, On 28.07.21 02:41, c.diddens--- via GiNaC-list wrote:
My Python code works perfect in Linux, but as a long time goal, I also want to produce Python Wheels for Windows. However, I have a hard time to cross-compile GiNaC and CLN for Windows (64 bit).
Does anyone has some experience with that? I am aware of the precompiled Windows binary, but they seem to be a bit out of date...
I cannot offer direct help since I do not use Windows, sorry. But for what it's worth, a number of fixes went into CLN and GiNaC for fixing cross-compilation, MinGW, linker issues, CMake, etc. These fixes aren't released in one of the tarballs yet (should be soon). So, if you've been using the released tarballs, it is worth trying from the git main branch. All my best, -richard. -- Richard B. Kreckel <https://in.terlu.de/~kreckel/>
Dear Christian, I had compiled the latest static GiNaC/CLN libs on Win10 using MinGW. If these are of any use for you feel free to download them from here: https://leeds365-my.sharepoint.com/:f:/g/personal/pmtvk_leeds_ac_uk/EkzKaM0i... I am not familiar with Windows enough, but after a sufficient installation of MinGW/MSYS I had used the usual linux sequence of commands to produce the static libraries. Best wishes, Vladimir -- Vladimir V. Kisil http://www.maths.leeds.ac.uk/~kisilv/ Book: Geometry of Mobius Maps https://doi.org/10.1142/p835 Soft: Geometry of cycles http://moebinv.sourceforge.net/ Jupyter notebooks: https://github.com/vvkisil/MoebInv-notebooks
On Wed, 28 Jul 2021 00:41:13 +0000, c.diddens--- via GiNaC-list <ginac-list@ginac.de> said:
CD> Dear all, CD> first of all, I want to thank you all for this very nice piece CD> of software. I am currently developing a Python package to wrap CD> the finite element library oomph-lib in Python. GiNaC is CD> required here to generate C code which is compiled on the fly to CD> quickly assemble the weak forms which are defined in Python. In CD> some sense, this is similar to the finite element library CD> FEniCS, which also uses GiNaC, but oomph-lib provides better CD> capabilities for multi-physics and ALE methods. CD> My Python code works perfect in Linux, but as a long time goal, CD> I also want to produce Python Wheels for Windows. However, I CD> have a hard time to cross-compile GiNaC and CLN for Windows (64 CD> bit). CD> Does anyone has some experience with that? I am aware of the CD> precompiled Windows binary, but they seem to be a bit out of CD> date... CD> I am grateful for any input. CD> Best regards, CD> Christian _______________________________________________
Dear Vladimir, dear Richard, thanks so much for the quick help! With the provided pre-compiled libaries, I was able to link against GiNaC with x86_64-w64-mingw32-g++. The first tests with a simple DLL file providing some GiNaC functionality is working fine. Hence, the basics to create a Python wheel are all set! Thanks once more for this nice piece of software. Initially I was considering to use the python package scipy to handle the just-in-time compilation of the finite element equations, but GiNaC is so much faster. Best regards, Christian Am Mittwoch, den 28.07.2021, 08:10 +0000 schrieb Vladimir V. Kisil:
Dear Christian,
I had compiled the latest static GiNaC/CLN libs on Win10 using MinGW. If these are of any use for you feel free to download them from here:
https://leeds365-my.sharepoint.com/:f:/g/personal/pmtvk_leeds_ac_uk/EkzKaM0i...
I am not familiar with Windows enough, but after a sufficient installation of MinGW/MSYS I had used the usual linux sequence of commands to produce the static libraries.
Best wishes, Vladimir
participants (3)
-
c.diddens@utwente.nl
-
Richard B. Kreckel
-
Vladimir V. Kisil