Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 642418 - [Cygwin Prefix] bootstrapping app-arch/xz-utils-5.2.3 fails due to x86_64-pc-cygwin-windres not understanding -isystem
Summary: [Cygwin Prefix] bootstrapping app-arch/xz-utils-5.2.3 fails due to x86_64-pc-...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Other
: Normal major
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-27 16:13 UTC by Sven Eden
Modified: 2018-01-17 15:32 UTC (History)
0 users

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


Attachments
Remove CPPFLAGS from $(RC) calls (fix_prefix_bootstrap.patch,1.77 KB, patch)
2017-12-27 16:31 UTC, Sven Eden
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Eden 2017-12-27 16:13:36 UTC
While bootstrapping stage3 app-arch/xz-utils-5.2.3 fails with x86_64-pc-cygwin-windres showing it's usage information.

The reason for this is, that the system infuses "-isystem /gentoo/usr/include", which is important for the correct system headers to be used, but x86_64-pc-cygwin-windres does not understand it.

All produced Makefiles consist of the line:

CPPFLAGS = -isystem /gentoo/usr/include

However, CPPFLAGS are irrelevant for the windows resource compiler, so it should not be called with CPPFLAGS added.

The solution is to patch the Makefile.am files to not add CPPFLAGS to the call to the resource compiler.


Reproducible: Always

Steps to Reproduce:
1. Use bootstrap-prefix.sh

Actual Results:  
Stage 3 app-arch/xz-utils fails

Expected Results:  
Stage 3 app-arch/xz-utils succeeds
Comment 1 Sven Eden 2017-12-27 16:31:27 UTC
Created attachment 511762 [details, diff]
Remove CPPFLAGS from $(RC) calls

The cleanest way would be to patch the four Makefile.am files that use $(RC), but then we'd need to build automake-1.15 first.

So this patch instead patches the relevant Makefile.in files, so configure has to do the job alone.

Result: app-arch/xz-utils bootstraps just fine.
Comment 2 Michael Haubenwallner (RETIRED) gentoo-dev 2017-12-27 21:41:25 UTC
Well, windres still is able to include other .rc files and does this using the C preprocessor AFAICT. So CPPFLAGS actually is valid here.

For the moment I've already added a workaround:
https://gitweb.gentoo.org/repo/gentoo.git/commit?id=34c88b53b7b7940f643248dedae5961d2f6d718a

Finally, either we better get windres to accept -isystem, or fix the real problem we need -isystem for (the right order for adding CPPFLAGS in various Makefiles), like described in https://gitweb.gentoo.org/repo/proj/prefix.git/commit?id=345944686caf4b029c869767ca40d38bee556c61
Comment 3 Michael Haubenwallner (RETIRED) gentoo-dev 2018-01-17 15:32:37 UTC
bootstrap snapshot has been bumped since, should be fixed now.