Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 579042

Summary: media-libs/sdl2-image-2.0.1: Failed compilation using mingw32 in crossdev
Product: Gentoo Linux Reporter: Lucian Poston <lucianposton>
Component: Current packagesAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED DUPLICATE    
Severity: normal CC: chewi, lucianposton
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info

Description Lucian Poston 2016-04-04 19:03:22 UTC
Created attachment 429646 [details]
emerge --info

Building with mingw32 in a crossdev prefix fails due to newbin not handling exe's. The ebuild line is:

newbin .libs/showimage showimage2

When compiled with mingw32, the binary is instead named .libs/showimage.exe
Comment 1 James Le Cuirot gentoo-dev 2016-04-13 10:38:31 UTC
I imagine there's quite a lot of packages that fail for this reason. There's 616 ebuilds in the tree that call newbin. This probably affects dobin, doexe, and newexe too.

You could add * to the end of the first argument but the second argument should have .exe too and the wildcard may match other stuff. It would be handy if the profile had a variable for the executable extension, though judging by this table, the only one you're likely to find is .exe.

https://en.wikipedia.org/wiki/Comparison_of_executable_file_formats

That being the case, another way to do it could be an eclass helper like this:

exe_extension() {
  use kernel_Winnt && echo .exe
}

Maybe the helpers should handle this automatically? There are very few instances of .exe being explicitly specified right now.

It's worth noting that the winnt profile automatically creates symlinks in post_src_install() without extensions to .exe files that don't appear to be Windows GUI executables.

I'll assign this to the toolchain project for the lack of a cross build project. Perhaps this is a discussion for gentoo-dev but does anyone care enough about Windows to take decisive action on it? I can't say I do.
Comment 2 SpanKY gentoo-dev 2016-04-13 14:15:46 UTC
sdl2-image is kind of bad form by installing out of .libs/, but the upstream code needs a bit of love so it isn't using noinst_PROGRAMS.

*** This bug has been marked as a duplicate of bug 432620 ***