Eisfunke's Lix Fork
Find a file
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
config Add config.guess, config.sub and install-sh 2013-11-25 11:26:02 +00:00
corepkgs Revert "Get rid of unicode quotes (#1140)" 2016-11-26 00:38:01 +01:00
doc/manual Drop a few more references to all-packages.nix 2017-01-03 16:42:24 +01:00
maintainers Update upload-release script 2017-01-03 11:42:56 +01:00
misc SSL_CERT_FILE -> NIX_SSL_CERT_FILE 2016-10-13 17:09:10 +02:00
mk Revert "Get rid of unicode quotes (#1140)" 2016-11-26 00:38:01 +01:00
perl Revert "Get rid of unicode quotes (#1140)" 2016-11-26 00:38:01 +01:00
scripts Merge branch 'nix-copy-closure-c++' of https://github.com/shlevy/nix 2017-02-07 20:47:45 +01:00
src Include config.h implicitly with '-include config.h' in CFLAGS 2017-02-08 21:51:02 +02:00
tests Merge pull request #981 from shlevy/build-remote-c++ 2017-01-19 18:21:55 +01:00
.dir-locals.el Add .dir-locals.el for Emacs 2016-01-28 11:12:04 +01:00
.gitignore Merge branch 'nix-copy-closure-c++' of https://github.com/shlevy/nix 2017-02-07 20:47:45 +01:00
bootstrap.sh bootstrap: Simplify & make more robust. 2011-09-06 12:11:05 +00:00
configure.ac configure.ac: We require C++14 now 2017-02-08 21:08:44 +02:00
COPYING * Change this to LGPL to keep the government happy. 2006-04-25 16:41:06 +00:00
local.mk Remove build-remote.pl.in 2017-02-07 18:49:17 +01:00
Makefile Include config.h implicitly with '-include config.h' in CFLAGS 2017-02-08 21:51:02 +02:00
Makefile.config.in Makefile.config.in: drop unused bsddiff_compat_include 2017-01-24 22:50:28 +00:00
nix.spec.in Drop unused WWW::Curl dependency 2016-12-06 17:17:29 +01:00
README.md Readme semantics. 2017-01-01 05:20:47 +05:30
release.nix release.nix: Drop nix-shell references 2017-01-27 16:13:22 +01:00
shell.nix shell.nix: Add a flag for using clang 2017-01-24 10:53:18 +01:00
version Bump 2016-01-20 16:34:37 +01:00

Nix, the purely functional package manager

Nix is a new take on package management that is fairly unique. Because of it's purity aspects, a lot of issues found in traditional package managers don't appear with Nix.

To find out more about the tool, usage and installation instructions, please read the manual, which is available on the Nix website at http://nixos.org/nix/manual.

Contributing

Take a look at the Hacking Section of the manual. It helps you to get started with building Nix from source.

License

Nix is released under the LGPL v2.1

This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit.