bugGNU Octave - Bugs: bug #55955, stashing build options in binary...

 
 

bug #55955: stashing build options in binary breaks building reproducibly with -fdebug-prefix-map=

Submitted by:  Mike Miller <mtmiller>
Submitted on:  Tue 19 Mar 2019 05:33:34 PM UTC  
 
Category:  Configuration and Build System Severity:  1 - Wish
Priority:  5 - Normal Item Group:  Feature Request
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  dev Operating System:  GNU/Linux

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 19 Mar 2019 05:53:48 PM UTC, comment #1:

I think other interpreted languages would have to solve this similarly.

I see that the Debian python package explicitly filters out the '-fdebug-prefix-map' option when stashing compiler flags

https://salsa.debian.org/cpython-team/python3/blob/3.8.0a1-1/debian/rules#L212

This is essentially the approach in my patch.

Mike Miller <mtmiller>
Project Administrator
Tue 19 Mar 2019 05:33:34 PM UTC, original submission:

I tried to build Octave reproducibly, using the GCC option '-fdebug-prefix-map=/path/to/build=.' to mangle the build directory embedded in the resulting object files. See https://reproducible-builds.org/docs/build-path/ for details.

However, because Octave conveniently stashes both the full configure command line and the individual CFLAGS, CXXFLAGS, etc, in liboctinterp, and the options in mkoctfile, the build directory becomes embedded in the resulting binary anyway.

I would like to avoid this chicken and egg problem somehow. If the user is intentionally building Octave with '-fdebug-prefix-map' (or with '-ffile-prefix-map' or '-fmacro-prefix-map'), then the entire point is to prevent having the string in that option from being embedded in the binary. But I also don't want to completely remove embedding the user's compiler options in the binary.

I have a proof of concept patch that filters only these particular options out of all of the affected user variables in the subst-config-vals.sh shell script only, attaching that here.

I will continue researching the best way to handle this, and maybe ask for advice from the reproducible builds team.

Mike Miller <mtmiller>
Project Administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can add your encouragement to it.
This task has 0 encouragements so far.

Only project members can vote.

 

 

 

Follow 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2019-03-19 mtmiller Carbon-CopyRemoved 80942 => -
2019-03-19 mtmiller Attached File- => Added filter-fdebug-prefix-map-option.patch, #46583

Back to the top


Powered by Savane 3.4