Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cross-compiling tinyxml2, sed, lua for mingw: FAIL
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
ecko
Tux's lil' helper
Tux's lil' helper


Joined: 04 Jul 2010
Posts: 99

PostPosted: Tue Apr 08, 2014 9:25 pm    Post subject: Cross-compiling tinyxml2, sed, lua for mingw: FAIL Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum