Commit graph

10137 commits

Author SHA1 Message Date
Niklas Hambüchen
57daa860e8 autoconf: Fix C++17 detection not working on Ubuntu 16.04.
And probably many other distributions.

Until now, ./configure would fail silently printing a warning

    ./configure: line 4621: AX_CXX_COMPILE_STDCXX_17: command not found

and then continuing, later failing with a C++ #error saying that some C++11
feature isn't supported (it didn't even get to the C++17 features).

This is because older distributions don't come with the
`AX_CXX_COMPILE_STDCXX_17` m4 macro.

This commit vendors that macro accordingly.

Now ./configure complains correctly:

    configure: error: *** A compiler with support for C++17 language features is required.

On Ubuntu 16.04, ./configure completes if a newer compiler is used, e.g. with
gcc-7 from https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test
using:

    ./bootstrap.sh
    ./configure CXX=g++-7 --disable-doc-gen --with-boost=$(nix-build --no-link '<nixpkgs>' -A boost.dev)
2019-07-03 04:32:25 +02:00
Niklas Hambüchen
1f97b16b1d autoconf: Work around editline not being found on Ubuntu 16.04.
And probably other Linux distributions with long-term support releases.

Also update manual stating what version is needed;
I checked that 1.14 is the oldest version with which current nix compiles,
and added autoconf feature checks for some functions added in that release
that nix uses.
2019-07-03 04:32:25 +02:00
Niklas Hambüchen
00a450026f autoconf: Detect boost, require version, set CXXFLAGS.
This turns previous compiler errors complaining about missing files
into proper ./configure time errors telling the user which version
of boost is required.
2019-07-03 04:32:25 +02:00
Niklas Hambüchen
96cd3d6073 autoconf: Change quotes in description.
The unbalanced single-quotes cause many editor syntax highlighters
to interpret the rest of the file as a string literal, making it easier
to make syntax mistakes in absence of proper highlighting.
2019-07-03 04:32:25 +02:00
Abseil Team
e6b050212c Export of internal Abseil changes.
--
c2e2e2b21c3fe59b63279e7418c93c7289ee3e27 by Mark Barolak <mbar@google.com>:

Import of CCTZ from GitHub.

PiperOrigin-RevId: 256220326

--
3996b01f0c3eb60f72825b154dce8019b6215f1d by Derek Mauro <dmauro@google.com>:

Add GCC 4.9 test script. This will become our new minumum version and
GCC 4.8 will be removed soon.

PiperOrigin-RevId: 256160891

--
2c13aa44bc8e497ebae9abe8b8adf73c2152622d by Abseil Team <absl-team@google.com>:

[Trivial] tweak flat_hash_map.h doc comment

The comment is probably right both ways, but the lack of an "if" here seemed jarring to me.

PiperOrigin-RevId: 256089069

--
16bc03b9b30fbf08d7dc61025fa8ec4b57077be8 by Abseil Team <absl-team@google.com>:

Fix symbolization for elf files whose SYMTAB section is stripped, but have a DYNSYM section.

Previously, if we did not find a SYMTAB section, we would bail out of symbolization early, rather than checking the DYNSYM section.

PiperOrigin-RevId: 256061954

--
4c60ee329b1eeb0b0d10c4f76f282e5fbae2c5b2 by Derek Mauro <dmauro@google.com>:

Update to LLVM r363242 and Bazel 0.27.0

PiperOrigin-RevId: 256024405

--
18e1ba970d33f122026803d8ca90035b9088949d by Eric Fiselier <ericwf@google.com>:

Disable variant tests that break with P0608R3

PiperOrigin-RevId: 255975764

--
0a89858464977e86096b62476faa3b64eb94aa1d by Abseil Team <absl-team@google.com>:

Internal change

PiperOrigin-RevId: 255891019

--
9b7424cac66f5407f0ed74ed288bf3099a4fa330 by CJ Johnson <johnsoncj@google.com>:

Updates the implementation of InlinedVector::insert(...) to be exception safe and adds an exception safety tests for insert(...)

PiperOrigin-RevId: 255881809

--
1288f4ba3883c510d92b09437fb8b051c19aa241 by CJ Johnson <johnsoncj@google.com>:

Updates the implementation of InlinedVector::insert(...) to be exception safe and adds an exception safety tests for insert(...)

PiperOrigin-RevId: 255875277

--
39c04f3621491eaff9e2eda619718d5b5f20fbd9 by Abseil Team <absl-team@google.com>:

Use a typedef to allow building with NVCC

Without this change NVCC fails to compile compressed_tuple.h.  NVCC is relevant
because TensorFlow uses NVCC on Ubuntu and inclues abseil.

PiperOrigin-RevId: 255850176

--
e23f0309ccad69eb508ca02c9034cd4cdd740da0 by Abseil Team <absl-team@google.com>:

Internal change

PiperOrigin-RevId: 255787167

--
054aafcebf595077054164f1da3703124ab209b4 by Abseil Team <absl-team@google.com>:

Updates the ScopedAllocatorWorks test for InlinedVector to not rely on the byte count allocated by the standard library

In doing so, removes LegacyNextCapacityFrom(...) impl function from InlinedVector

Also applies clang-format to the test file

PiperOrigin-RevId: 255760356

--
eb05fc9f78e3a163c93f1866e9fe9a8ad0d01622 by Abseil Team <absl-team@google.com>:

Internal change

PiperOrigin-RevId: 255706834

--
97abb824417604c45d9fcbb3e4ff1aa3000836f2 by Jorg Brown <jorg@google.com>:

Enhance compatibility of abseil's strings package with nvcc.

PiperOrigin-RevId: 255688500

--
efc5b9c221ee31e15d10b35d31c8f3ae6eddaa8c by Abseil Team <absl-team@google.com>:

Follow CCTZ's lead and allow GetWeekday() and GetYearDay() to be
called with any civil-time type.  A CivilSecond, for example, has
a weekday just as much as a CivilDay does.

PiperOrigin-RevId: 255659840

--
a75acbe954457919d8c6c8f4c2339b543760b375 by Derek Mauro <dmauro@google.com>:

Increase the timeout of randen_engine_test.
It seems to timeout under TSAN often enough to justify the increase.

PiperOrigin-RevId: 255628086

--
160976ba47c7c6eb57af08e21f8eb640aa51e91b by Derek Mauro <dmauro@google.com>:

Update CMake documentation
Fixes https://github.com/abseil/abseil-cpp/issues/332

PiperOrigin-RevId: 255607313
GitOrigin-RevId: c2e2e2b21c3fe59b63279e7418c93c7289ee3e27
Change-Id: Iba4ac7ed23cbcdb22965b4958601f689be92cda4
2019-07-02 17:23:45 -04:00
Vincent Ambo
892493a478 feat(tools): Add dispatcher script to transparently access tools
Initial version of tool provider via Nix. This requires two separate
steps for adding a new tool:

1. New symlink in tools/bin to point at the dispatch script.
2. Mapping of tool to Nix package set attribute in dispatch script.
2019-07-02 16:40:51 +01:00
Eelco Dolstra
7e1c85c5fb
Merge pull request #2779 from LnL7/build-exit-codes
build: add exit code for hash and check mismatches
2019-07-02 17:37:49 +02:00
Graham Christensen
68bdd83dc8
timeout: test for error code 2019-07-02 11:18:36 -04:00
Eelco Dolstra
db700f730e
Merge pull request #2974 from grahamc/invalid-name
checkStoreName: give more precise/verbose error information
2019-07-02 16:12:01 +02:00
Eelco Dolstra
7c0b0dbec8
Merge pull request #2724 from LnL7/manpage-add-fixed
nix-store: document --add-fixed
2019-07-02 15:47:40 +02:00
Eelco Dolstra
33db1d35ae
Merge pull request #2582 from LnL7/fetchgit-refs
fetchGit: allow fetching explicit refs
2019-07-02 15:44:31 +02:00
Vincent Ambo
c31a0b552b feat(git-appraise): Add Nix build configuration 2019-07-02 14:39:49 +01:00
Vincent Ambo
fe642c30f0 feat(third_party): Check in git-appraise 2019-07-02 14:19:12 +01:00
Daiderd Jordan
a3c77c1536
nix-store: document --add-fixed 2019-07-02 09:12:02 -04:00
Graham Christensen
c8205a3413
builtins.fetchGit: document absolute ref support 2019-07-02 09:05:56 -04:00
Graham Christensen
17d3ec3405
checkStoreName: give more precise/verbose error information
$ sudo ./inst/bin/nix-instantiate -E '"${./.git}"'
error: The path name '.git' is invalid: it is illegal to start the
name with a period. Path names are alphanumeric and can include the
symbols +-._?= and must not begin with a period. Note: If '.git' is a
source file and you cannot rename it on disk,
builtins.path { name = ... } can be used to give it an alternative
name.
2019-07-02 08:41:53 -04:00
Vincent Ambo
e03f063052 merge(infra): Embed infrastructure configuration into monorepo
This contains DNS and NixOS module configuration.
2019-07-02 12:48:14 +01:00
Vincent Ambo
a131b30514 refactor(infra): Move infrastructure into monorepo structure 2019-07-02 12:48:05 +01:00
Vincent Ambo
915a2f8464 fix(tazblog): Ensure build works with MonadFail changes
This updates some old code that makes assumptions via pattern matching
to instead make assumptions via a Prelude function.

This is known to be safe as it has been running fine for almost a
decade now, but the recent MonadFail changes broke the build.
2019-07-02 12:42:28 +01:00
Daiderd Jordan
a52c331edb
build: replace 100 offset for build exit codes 2019-07-02 00:12:38 +02:00
Daiderd Jordan
1ac399dd11
nix-store: document exit codes 2019-07-02 00:12:38 +02:00
Daiderd Jordan
99ee3755dd
build: add tests for --check status codes 2019-07-02 00:12:38 +02:00
Daiderd Jordan
cbf84bcce7
build: use binary mask for build status flags
If multiple builds with fail with different errors it will be reflected
in the status code.

eg.

	103 => timeout + hash mismatch
	105 => timeout + check mismatch
	106 => hash mismatch + check mismatch
	107 => timeout + hash mismatch + check mismatch
2019-07-02 00:12:38 +02:00
Daiderd Jordan
97baf32fbc
build: add exit code for hash and check mismatches
Makes it easier to identify the failure reason in other tooling, eg.
differentiate between a non-deterministic --check vs a failed build.

	$ nix-build '<nix/fetchurl.nix>' --argstr url http://example.org --argstr sha256 0000000000000000000000000000000000000000000000000000
	hash mismatch in fixed-output derivation '/nix/store/nzi9ck45rwlxzcwr25is7qlf3hs5xl83-example.org':
	  wanted: sha256:0000000000000000000000000000000000000000000000000000
	  got:    sha256:08y4734bm2zahw75b16bcmcg587vvyvh0n11gwiyir70divwp1rm
	$ echo $?
	102

	$ nix-build -E 'with import <nixpkgs> {}; runCommand "foo" {} "date +%s > $out"' --check
	warning: rewriting hashes in '/nix/store/g3k47g0399fvjmbm0p0mnad74k4w8vkz-foo'; cross fingers
	error: derivation '/nix/store/mggc8dz13ackb49qca6m23zq4fpq132q-foo.drv' may not be deterministic: output '/nix/store/g3k47g0399fvjmbm0p0mnad74k4w8vkz-foo' differs
	$ echo $?
	104
2019-07-02 00:12:34 +02:00
Carlos O'Ryan
620940a411
Fix installation path for protos. 2019-07-01 14:39:09 -04:00
Vincent Ambo
b51a53c936 chore(build): Add Gemma to package set
Note that this does not actually build right now because Elm has done
a thing again to break the universe and it requires massive changes to
the application to make it work again.
2019-06-29 14:28:41 +01:00
Vincent Ambo
e2951dc9f5 merge(gemma): Integrate Gemma into monorepo 2019-06-29 14:14:35 +01:00
Vincent Ambo
60532a541b refactor(gemma): Move Gemma source into monorepo stucture 2019-06-29 14:13:58 +01:00
Vincent Ambo
545d9a2db9 docs(third_party): Add README 2019-06-29 14:12:38 +01:00
Vincent Ambo
4cefb9256a feat(build): Add top-level package index file 2019-06-29 14:12:24 +01:00
Vincent Ambo
5c3ac08fcf feat(tazblog): Add Nix build configuration 2019-06-29 14:11:56 +01:00
Vincent Ambo
207c6dac0c merge(tazblog): Integrate blog into monorepo 2019-06-29 14:02:28 +01:00
Vincent Ambo
47f2145b5b chore(tazblog): Remove files from ye olde times 2019-06-29 14:01:28 +01:00
Vincent Ambo
85dbb4cc23 chore: Keep project root under MIT license
To comply with Google's open-source patching rules :)
2019-06-28 22:56:48 +01:00
Vincent Ambo
2373c925e1 refactor: Move tazblog into monorepo structure
It's happening!
2019-06-28 22:55:39 +01:00
Vincent Ambo
b681368217 chore: Initialize tazj.in monorepo 2019-06-28 22:50:53 +01:00
Carlos O'Ryan
eab5cb57dd
Initial set of files.
The make install target is not working for .proto files, but otherwise
it seems to work.
2019-06-28 15:01:33 -04:00
Eelco Dolstra
5c8f477283
Merge pull request #2977 from aniketd/2971-cannot-disable-http2
Fix `http2 = false` having no effect.
2019-06-28 19:58:42 +02:00
Abseil Team
c964fcffac Export of internal Abseil changes.
--
c321829735accc2e6beb81e6a5a4421e5647b876 by CJ Johnson <johnsoncj@google.com>:

Updates the definition of InlinedVector::swap(InlinedVector&) to be exception safe and adds exception safety tests

PiperOrigin-RevId: 255511536

--
0d86445891748efb09430eb9ede267b54185a246 by CJ Johnson <johnsoncj@google.com>:

Updates the definition of InlinedVector::erase(...) to be exception safe and adds an exception safety test for it.

PiperOrigin-RevId: 255492671

--
f07e8fa62dfe9eb0d025b27fca8c6db43c5a328f by CJ Johnson <johnsoncj@google.com>:

Updates the implementation of InlinedVector::emplace_back(...) to be exception safe and adds exception safety tests

PiperOrigin-RevId: 255422837

--
4c3be92bfe4c1636a03cef8fd5aa802fed0d2c61 by Abseil Team <absl-team@google.com>:

Internal Change

PiperOrigin-RevId: 255422693

--
6df38ea42f00678c357a539016163f8ac4c084e6 by Gennadiy Rozental <rogeeff@google.com>:

Introduce public interfaces for setting and getting program usage messages.

PiperOrigin-RevId: 255291467

--
8f21d594aed3971d37db70226847c693eb548edb by Laramie Leavitt <lar@google.com>:

Move absl/random's copy of ABSL_ATTRIBUTE_FORCE_INLINE and
ABSL_ATTRIBUTE_NEVER_INLINE into .cc files and rename to
prevent conflicts.

https://github.com/abseil/abseil-cpp/issues/343

PiperOrigin-RevId: 255288599

--
6b7430ad0c8bd860fb9394894f5eeedd1acc9f77 by CJ Johnson <johnsoncj@google.com>:

Updates the ScopedAllocatorWorks test for InlinedVector to not rely on the byte count allocated by the standard library

In doing so, removes LegacyNextCapacityFrom(...) impl function from InlinedVector

Also applies clang-format to the test file

PiperOrigin-RevId: 255207606
GitOrigin-RevId: c321829735accc2e6beb81e6a5a4421e5647b876
Change-Id: I7438211c36c4549fca2e866658f8d579c65d7d52
2019-06-28 11:37:15 -04:00
Aniket Deshpande
ec58ba38c5
Fix http2 = false having no effect. Fixes #2971.
Setting `http2 = false` in nix config (e.g. /etc/nix/nix.conf)
had no effect, and `nix-env -vvvvv -i hello` still downloaded .nar
packages using HTTP/2.

In `src/libstore/download.cc`, the `CURL_HTTP_VERSION_2TLS` option was
being explicitly set when `downloadSettings.enableHttp2` was `true`,
but, `CURL_HTTP_VERSION_1_1` option was not being explicitly set when
`downloadSettings.enableHttp2` was `false`.

This may be because `https://curl.haxx.se/libcurl/c/libcurl-env.html` states:
"You have to set this option if you want to use libcurl's HTTP/2 support."
but, also, in the changelog, states:
"DEFAULT
Since curl 7.62.0: CURL_HTTP_VERSION_2TLS
Before that: CURL_HTTP_VERSION_1_1"

So, the default setting for `libcurl` is HTTP/2 for version >= 7.62.0.

In this commit, option `CURLOPT_HTTP_VERSION` is explicitly set to
`CURL_HTTP_VERSION_1_1` when `downloadSettings.enableHttp2` nix config
setting is `false`.

This can be tested by running `nix-env -vvvvv -i hello | grep HTTP`
2019-06-28 20:44:46 +05:30
Eelco Dolstra
6847c92788
Fix macOS build failure
Issue #2976.
2019-06-28 15:38:23 +02:00
Matthew Bauer
ec0087df0a Don’t use entire /etc/nsswitch.conf file
The default nsswitch.conf(5) file in most distros can handle many
different things including host name, user names, groups, etc. In Nix,
we want to limit the amount of impurities that come from these things.
As a result, we should only allow nss to be used for gethostbyname(3)
and getservent(3).

/cc @Ericson2314
2019-06-27 14:31:29 -04:00
Abseil Team
72e09a54d9 Export of internal Abseil changes.
--
2ee5dbb79b56539b580c3a36eec5a025d08b7022 by Eric Fiselier <ericwf@google.com>:

Unconditionally apply no-sanitize attributes.

We currently fail to apply the attributes in open-source
land because the build system doesn't define ADDRESS_SANITIZER
like we expect.

The attributes should have no effect when the sanitizers are
disabled.

PiperOrigin-RevId: 255024122

--
5a123175146de14d04013862aa378f28f8eff73c by CJ Johnson <johnsoncj@google.com>:

Updates the InputIterator-accepting member functions of InlinedVector to be cleaner/easier to read

PiperOrigin-RevId: 254994794

--
a4bdb61407a76317810785a34e49f996699ab4a4 by Abseil Team <absl-team@google.com>:

Added back c_move_backward which was previously deleted by mistake.

PiperOrigin-RevId: 254990809

--
bc427ca5f7fb88a70ba3a676bb9c7ff829c65ae9 by CJ Johnson <johnsoncj@google.com>:

Removes DestroyAndDeallocate() function from the internal details of InlinedVector because it ended up not being particularly useful

PiperOrigin-RevId: 254981201
GitOrigin-RevId: 2ee5dbb79b56539b580c3a36eec5a025d08b7022
Change-Id: I825c6c0a2fcf13ed6e60d71224037a57d7068d55
2019-06-25 16:21:15 -04:00
Eelco Dolstra
324a5dc92f
ProgressBar: Fix updating
'updateCV.notify_one()' does nothing if the update thread is not
waiting for updateCV (in particular this happens when it is sleeping
on quitCV). So also set a variable to ensure that the update isn't
lost.
2019-06-25 21:59:20 +02:00
Eelco Dolstra
88571219d9
nix-channel: Don't fetch binary-cache-url
This has been ignored since the Perl->C++ rewrite.
2019-06-25 13:27:16 +02:00
Eelco Dolstra
09dde33c19
Automatically use --no-net if there are no network interfaces
(cherry picked from commit 04a59769963fe2a28d10ba15de743fe499333c80)
2019-06-25 12:45:59 +02:00
Eelco Dolstra
5600b070a7
Add "warning" verbosity level
This ensures that "nix" shows warnings. Previously these were hidden
because they were at "info" level.

(cherry picked from commit 615a9d031d22a6aee64f8511e15685e47b6f8796)
2019-06-25 12:44:17 +02:00
Abseil Team
d65e19dfcd Export of internal Abseil changes.
--
2f187776e55fe7741882d64aa4fb04d361dcd1da by Shaindel Schwartz <shaindel@google.com>:

Fix spaces.

PiperOrigin-RevId: 254880665

--
50a2c390c1e56bec574e9418a6d0c5765f2e1d56 by CJ Johnson <johnsoncj@google.com>:

Fixes a ubsan violation bug report: https://github.com/abseil/abseil-cpp/issues/337

PiperOrigin-RevId: 254846112

--
563fee16ee0ac32a93292c3b2d1cf9543bad4758 by CJ Johnson <johnsoncj@google.com>:

In the InlinedVector copy-assignment operator, substitutes-in a call to DeallocateIfAllocated() (which was not previously available)

PiperOrigin-RevId: 254835012

--
d07f4d91b43242c5e8bd90f1e93f55f7972eed04 by Shaindel Schwartz <shaindel@google.com>:

#336

PiperOrigin-RevId: 254833534

--
1ad0fe00169a794176605a897f15fad8625339bd by Shaindel Schwartz <shaindel@google.com>:

#335

PiperOrigin-RevId: 254826748

--
436a29591c60c6ac9bb7b98e4906c0a7466611c1 by Shaindel Schwartz <shaindel@google.com>:

Import of CCTZ from GitHub.

PiperOrigin-RevId: 254820333

--
e782a5387a750319eb6ed5d9927ec2463bd68ebb by CJ Johnson <johnsoncj@google.com>:

Updates the definition of InlinedVector::resize(...) to be exception safe and adds exception safety tests

PiperOrigin-RevId: 254818993

--
6d2f8538fb06a09af47232d86b32dfc020b62133 by CJ Johnson <johnsoncj@google.com>:

Removes unnecessary transaction object from the implementation of InlinedVector::reserve(n)

PiperOrigin-RevId: 254804166

--
9a3a806702679a7442837089469cf171194da776 by Abseil Team <absl-team@google.com>:

Internal Change.

PiperOrigin-RevId: 254489023

--
ded1463ef81f3257645becc6be58df3b433ea21f by CJ Johnson <johnsoncj@google.com>:

Updates the definition of InlinedVector::reserve(size_type) to be exception safe and adds exception safety tests

PiperOrigin-RevId: 254463057
GitOrigin-RevId: 2f187776e55fe7741882d64aa4fb04d361dcd1da
Change-Id: Id41fc5a62c8d71021e803721ecdbfb3ce60ef574
2019-06-24 22:04:35 -04:00
Shaindel Schwartz
5162fc83d2
Merge pull request #336 from shields/patch-2
Improve example AbslUnparseFlag().
2019-06-24 20:52:35 -04:00
Shaindel Schwartz
0389f7bf58
Merge pull request #335 from shields/patch-1
Correctly point to documentation about supported flag types.
2019-06-24 20:50:35 -04:00