Project

General

Profile

Bug #5106

elfdump compiles using headers from the build system

Added by Gordon Ross over 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2014-08-19
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

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

Related to illumos gate - Bug #4902: 4839, 3294 introduced build breakage on older Illumos build machinesClosed2014-05-31

Actions
Related to illumos gate - Feature #5107: Eliminate "native" programs that run during the buildNew2014-08-19

Actions

History

#1

Updated by Gordon Ross over 5 years ago

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

#2

Updated by Gordon Ross over 5 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.

#3

Updated by Gordon Ross over 4 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.

#4

Updated by Electric Monk over 4 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>

#5

Updated by Electric Monk over 4 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)

Also available in: Atom PDF