Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 579042 - media-libs/sdl2-image-2.0.1: Failed compilation using mingw32 in crossdev
Summary: media-libs/sdl2-image-2.0.1: Failed compilation using mingw32 in crossdev
Status: RESOLVED DUPLICATE of bug 432620
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-04 19:03 UTC by Lucian Poston
Modified: 2016-04-13 14:15 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge.info,2.22 KB, application/x-info)
2016-04-04 19:03 UTC, Lucian Poston
Details

Note You need to log in before you can comment on or make changes to this bug.
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 ***