Comments (5)
Sorry guys, maybe I didn't give the correct context. What triggers the unreproducibility is recording the CFLAGS
used at build time in neomutt's binary. This is done in auto.def
:
###############################################################################
# Generate conststrings.c
set conststrings "\
unsigned char cc_cflags\[\] = {[text2c [expr {
[get-define want-include-path-in-cflags]
? [get-define CFLAGS]
: [lkill [get-define CFLAGS] {{x} {string equal -length 2 $x {-I}}}]
}]]};\n\
unsigned char configure_options\[\] = {[text2c $conf_options]};\n"
if {[catch {set fd [open conststrings.c w]
puts $fd $conststrings
close $fd} msg]} {
user-error "Cannot write conststrings.c: $msg"
}
###############################################################################
And used in version.c
:
rstrip_in_place((char *) configure_options);
fprintf(fp, "\n\n%sConfigure options:%s %s\n", col_bold, col_end, (char *) configure_options);
rstrip_in_place((char *) cc_cflags);
fprintf(fp, "\n%sCompilation CFLAGS:%s %s\n", col_bold, col_end, (char *) cc_cflags);
fprintf(fp, "\n%s%s%s\n", col_bold, _("Compile options:"), col_end);
print_compile_options(CompOpts, fp);
Since we use -ffile-prefix-map
to allow builds to be reproducible, it is recorded in the binary together with other CFLAGS
, but since it can be a bit arbitrary (depending on the build path used) it makes the binary unreproducible.
The proposal here is to only remove -ffile-prefix-map=<some-path>
from the CFLAGS
recorded in the binary, not at all changing the CFLAGS
itself during build time.
There is already something like this in auto.def
:
# Misc
include-path-in-cflags=1 => "Remove include paths from CFLAGS in the output of neomutt -v"
So the proposal would be something like:
include-ffile-prefix-map-in-cflags=1 => "Remove -ffile-prefix-map from CFLAGS in the output of neomutt -v"
from neomutt.
he isn't. these are very much part of the build configuration.
from neomutt.
We don't set that cflag ourselves, but we honour whatever cflags the host environment sets. So I guess if you want a reproducible build, you want to make sure that cflags isn't set. I don't think we should try to outsmart whoever builds neomutt by removing cflags.
from neomutt.
given the purpose of -ffile-prefix-map, i'd be a tad surprised if it caused the build to be non-reproducible. if anything, the specified files are incomplete.
from neomutt.
@charles2910 I guess you're also concerned about paths in the configure options section of -v?
Configure options: CC=clang17 CXX=clang++17 --disable-nls --pgp --disable-idn2 --fmemopen --gpgme --lmdb --ssl --pcre2 --with-ssl=/usr/local --with-ncurses=/usr
from neomutt.
Related Issues (20)
- save-hook only works once?
- index_format: conditional right justification does not work HOT 5
- external filters in format strings are not called HOT 8
- Periodical crashing with segfault 11 on macOS 12.7.1. HOT 1
- Latest release hangs on startup (macOS 12.7.4) HOT 8
- Newline in attribution no longer properly handled HOT 2
- Compose Menu - top bar not updated after attaching files from file browser HOT 3
- Subject with non-printable characters or new line is shown with `?` HOT 30
- `Today` conditional date broken HOT 4
- Lag on half-down/half-up scrolling on macOS HOT 5
- Do we need to handle <stddef.h> specially? HOT 1
- conditional format strings broken in 2024-04-25 HOT 8
- Duplicate gpg keys in key selection menu for message encryption HOT 18
- segfault while opening a mailbox in from the sidebar HOT 2
- Doubts about paranoic defensive programming style HOT 3
- C dialect HOT 2
- tag-prefix doesn't work in attach HOT 5
- Doubts about some `*const` pointers HOT 5
- How to use the notmuch command <modify-labels> to tag emails with tags containing spaces?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neomutt.