nix-super/src
Tuomas Tynkkynen 2cd468874f Include config.h implicitly with '-include config.h' in CFLAGS
Because config.h can #define things like _FILE_OFFSET_BITS=64 and not
every compilation unit includes config.h, we currently compile half of
Nix with _FILE_OFFSET_BITS=64 and other half with _FILE_OFFSET_BITS
unset. This causes major havoc with the Settings class on e.g. 32-bit ARM,
where different compilation units disagree with the struct layout.

E.g.:

diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc
@@ -166,6 +166,8 @@ void Settings::update()
     _get(useSubstitutes, "build-use-substitutes");
+    fprintf(stderr, "at Settings::update(): &useSubstitutes = %p\n", &nix::settings.useSubstitutes);
     _get(buildUsersGroup, "build-users-group");
diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc
+++ b/src/libstore/remote-store.cc
@@ -138,6 +138,8 @@ void RemoteStore::initConnection(Connection & conn)
 void RemoteStore::setOptions(Connection & conn)
 {
+    fprintf(stderr, "at RemoteStore::setOptions(): &useSubstitutes = %p\n", &nix::settings.useSubstitutes);
     conn.to << wopSetOptions

Gave me:

at Settings::update(): &useSubstitutes = 0xb6e5c5cb
at RemoteStore::setOptions(): &useSubstitutes = 0xb6e5c5c7

That was not a fun one to debug!
2017-02-08 21:51:02 +02:00
..
boost Force stack trace for boost format errors 2016-03-02 15:46:07 +01:00
build-remote Merge branch 'nix-copy-closure-c++' of https://github.com/shlevy/nix 2017-02-07 20:47:45 +01:00
buildenv Fix Fedora build 2016-08-30 13:56:22 +02:00
libexpr Include config.h implicitly with '-include config.h' in CFLAGS 2017-02-08 21:51:02 +02:00
libmain Include config.h implicitly with '-include config.h' in CFLAGS 2017-02-08 21:51:02 +02:00
libstore Include config.h implicitly with '-include config.h' in CFLAGS 2017-02-08 21:51:02 +02:00
libutil Include config.h implicitly with '-include config.h' in CFLAGS 2017-02-08 21:51:02 +02:00
nix exportReferencesGraph: Export more complete info in JSON format 2017-01-26 20:41:08 +01:00
nix-build Restore default signal handling in child processes 2017-02-01 13:00:21 +01:00
nix-channel Revert "Get rid of unicode quotes (#1140)" 2016-11-26 00:38:01 +01:00
nix-collect-garbage printMsg(lvlError, ...) -> printError(...) etc. 2016-09-21 16:54:53 +02:00
nix-copy-closure nix-copy-closure: Use computeFSClosure() and LegacySSHStore 2017-02-07 20:55:47 +01:00
nix-daemon Move SavingSourceAdapter to serialise.hh 2017-02-07 19:29:20 +01:00
nix-env printMsg(lvlError, ...) -> printError(...) etc. 2016-09-21 16:54:53 +02:00
nix-instantiate Allow setting the state directory as a store parameter 2016-06-02 16:02:48 +02:00
nix-prefetch-url printMsg(lvlError, ...) -> printError(...) etc. 2016-09-21 16:54:53 +02:00
nix-store Provide default implementations for a couple of Store methods 2017-02-07 19:29:21 +01:00
resolve-system-dependencies printMsg(lvlError, ...) -> printError(...) etc. 2016-09-21 16:54:53 +02:00