ecko Tux's lil' helper
Joined: 04 Jul 2010 Posts: 99
|
Posted: Tue Apr 08, 2014 9:25 pm Post subject: Cross-compiling tinyxml2, sed, lua for mingw: FAIL |
|
|
I am currently trying to cross-compile some libraries to use in a project where I want to produce an executable for the mingw target. I use crossdev mingw64, did get a working cross-compiler, I am able to use emerge -x86_64-w64-mingw32 to cross compile things, for example libpng (and zlib) compile. However, cross-compilation fails on other really simple packages:
- tinyxml2: a single .cpp file, which compiles and links when I copy it into my project folder and call the cross-compiler directly (using cmake with a toolchain file ). With emerge-x86…, cmake fails at the configure step, by throwing in -rdynamic, which notoriously does not work with mingw, then fails to pass the "gcc works" test.
- sed, which is provided by the Windows installer of mingw so it should somehow compile with the mingw port of gcc. But with emerge-x86… it fails not finding gl_msvc_invalid_parameter_handler, which looks like some windows-related stuff.
- lua, plain ANSI C known to compile on virtually every architecture around. Reports some syntax error about missing parameters in a function (but it compiles fine with the regular linux toolchain using emerge).
Because these packages are so simple and should compile easily , I wonder if something is wrong with my setup, or if I forgot some configuration step.
I followed https://forums.gentoo.org/viewtopic-t-964160-start-0.html: typed crossdev --ov-output /usr/local/portage mingw64 (mingw64 means x86_64-w64-mingw32, according to the comment of SpanKY in bug #44708 ), then changed added ARCH="amd64" to /usr/portage/profiles/embedded/make.defaults (it is reset at every emerge --sync but whatever), and this is enough to emerge libpng (and actually use the lib in my project), so I don't know what could be wrong.
Do you guys manage to cross-compile these libs, or do you copy the C/C++ files into your projects?
ecko. |
|