Bug #5106
elfdump compiles using headers from the build system
100%
Description
For an example of how this breaks things, do:
cd /usr/include mv procfs.h procfs.h.bak cd $SRC/cmd/sgs/elfdump make all
You'll get lots of errors because it can't find /usr/include/procfs.h
which this should not be using in any case.
Files
Related issues
Updated by Gordon Ross over 6 years ago
- File 0003-elfdump-build-is-using-the-wrong-procfs.h.patch 0003-elfdump-build-is-using-the-wrong-procfs.h.patch added
Here's an easy way to fix this: (attached)
0003-elfdump-build-is-using-the-wrong-procfs.h.patch
Longer term, Robert Mustacchi would prefer that we eliminate "native" programs like this one (and in libc, and probably elsewhere)
For that, see issue: https://www.illumos.org/issues/5107
5107 Eliminate "native" programs that run during the build
Updated by Gordon Ross over 6 years ago
Looks like 4902 was already open
https://www.illumos.org/issues/4902
covering (substantially) the same problem, though not exactly the same reproduction method.
Updated by Gordon Ross about 6 years ago
Fix out for review. Design notes:
Build a temporary object with the CTF type information this needs,
then rework gen_struct_layout.c to use libctf to get that info.
Also rework the Makefile.targ check so that it compares output of
gen_struct_layout with the checked in struct_layout_XXX.c and
fails the make job if they're not the same.
Updated by Electric Monk almost 6 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
git commit 1886f67eb9de99edbcda88765f2c603a30c87fc2
commit 1886f67eb9de99edbcda88765f2c603a30c87fc2 Author: Gordon Ross <gwr@nexenta.com> Date: 2015-03-09T15:21:34.000Z 5106 elfdump compiles using headers from the build system Reviewed by: Robert Mustacchi <rm@joyent.com> Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com> Reviewed by: Richard Lowe <richlowe@richlowe.net> Approved by: Dan McDonald <danmcd@omniti.com>
Updated by Electric Monk almost 6 years ago
git commit fc01d378bd20b13dcb27185d874fc628d851b161
commit fc01d378bd20b13dcb27185d874fc628d851b161 Author: Gordon Ross <gwr@nexenta.com> Date: 2015-03-12T01:35:10.000Z 5106 elfdump compiles using headers from the build system (fix noise)