···1-commit 7ed4745a092a203f92fc37ab5894e92117db0c94
2-Author: Austin Seipp <aseipp@pobox.com>
3-Date: Sat May 4 15:23:35 2019 -0500
4-5- flow: fix a build failure with Clang/libcxx on Linux
6-7- 11bd7d7da introduced a hack on Linux to work around a missing symbol in
8- libstdc++'s _pic library on Ubuntu. Unfortunately, this causes the build
9- to fail when using Clang, as it doesn't believe this symbol is part of
10- its headers in c++11 mode.
11-12- Unfortunately there's no good way to distinguish libcxx from libstdc++
13- with the preprocessor, so we merely gate it by only checking for clang,
14- iff we are on Linux.
15-16- With this change, Clang 8.x can build FoundationDB on Linux using libcxx
17- as the standard C++ library.
18-19- Signed-off-by: Austin Seipp <aseipp@pobox.com>
20-21-diff --git a/flow/Platform.cpp b/flow/Platform.cpp
22-index 3d3f1ac0..9f21dfd4 100644
23---- a/flow/Platform.cpp
24-+++ b/flow/Platform.cpp
25-@@ -2841,13 +2841,26 @@ void setupSlowTaskProfiler() {
26- #endif
27- }
28-29--#ifdef __linux__
30-+#if defined(__linux__) && !defined(__clang__)
31- // There's no good place to put this, so it's here.
32- // Ubuntu's packaging of libstdc++_pic offers different symbols than libstdc++. Go figure.
33- // Notably, it's missing a definition of std::istream::ignore(long), which causes compilation errors
34- // in the bindings. Thus, we provide weak versions of their definitions, so that if the
35- // linked-against libstdc++ is missing their definitions, we'll be able to use the provided
36- // ignore(long, int) version.
37-+//
38-+// Note that this hack is DISABLED when we use Clang. It is only needed when we statically link
39-+// to the _pic libraries, but only official FDB Linux binaries are built this way using GCC. If we
40-+// don't use the _pic libraries, then this hack is entirely unneeded -- likely the case when using
41-+// Clang on Linux.
42-+//
43-+// Doing this allows us to use LLVM's libc++ with Clang on Linux -- otherwise, providing
44-+// a weak symbol definition for an internal (non-public) class member fails (due to that member
45-+// being non-existant on libc++.) See upstream GitHub issue #1533 for more information.
46-+//
47-+// TODO FIXME: Obliterate this when the official build environment is upgraded beyond Ubuntu 14.04.
48-+// (This problem should be fixed in later LTS releases.)
49-+
50- #include <istream>
51- namespace std {
52- typedef basic_istream<char, std::char_traits<char>> char_basic_istream;
···1-commit 8076537a52bb026941f13f5542395aac69ef0825
2-Author: Austin Seipp <aseipp@pobox.com>
3-Date: Sat May 4 17:34:51 2019 -0500
4-5- cmake: add workarounds for NixOS-specific deficiencies [NixOS]
6-7- The NixOS debug builder hook adds '-Wa,--compress-debug-sections' to the
8- link flags (it actually adds it to the compiler flags, but the compiler
9- is used for linking, so...). This makes the compiler angry when -Werror
10- is passed, because it's unused at link-time (-Wa applies to the
11- assembler). Suppress this warning with -Wno-unused-command-line-argument
12-13- NB: we *could* use -Wno-error=unused-command-line-argument, but that
14- still results in warnings anyway, just not fatal ones. We'd like to
15- remove them all for the sake of the build output.
16-17- Signed-off-by: Austin Seipp <aseipp@pobox.com>
18-19-diff --git a/cmake/ConfigureCompiler.cmake b/cmake/ConfigureCompiler.cmake
20-index 03af9c10..7d059375 100644
21---- a/cmake/ConfigureCompiler.cmake
22-+++ b/cmake/ConfigureCompiler.cmake
23-@@ -119,6 +119,11 @@ else()
24- else()
25- add_compile_options(-Werror)
26- endif()
27-+ if (CLANG)
28-+ # aseipp: NixOS hack
29-+ add_compile_options(-Wno-unused-command-line-argument)
30-+ add_link_options(-Wno-unused-command-line-argument)
31-+ endif()
32- add_compile_options($<$<BOOL:${GCC}>:-Wno-pragmas>)
33- add_compile_options(-Wno-error=format
34- -Wunused-variable
···524 '';
525526 foomatic_filters = throw "'foomatic_filters' has been renamed to/replaced by 'foomatic-filters'"; # Converted to throw 2022-02-22
0000527 foxitreader = throw "foxitreader has been removed because it had vulnerabilities and was unmaintained"; # added 2023-02-20
528 fscryptctl-experimental = throw "The package fscryptctl-experimental has been removed. Please switch to fscryptctl"; # Added 2021-11-07
529 fsharp41 = throw "fsharp41 has been removed, please use dotnet-sdk_5 or later";
···524 '';
525526 foomatic_filters = throw "'foomatic_filters' has been renamed to/replaced by 'foomatic-filters'"; # Converted to throw 2022-02-22
527+ foundationdb51 = throw "foundationdb51 is no longer maintained, use foundationdb71 instead"; # added 2023-06-06
528+ foundationdb52 = throw "foundationdb52 is no longer maintained, use foundationdb71 instead"; # added 2023-06-06
529+ foundationdb60 = throw "foundationdb60 is no longer maintained, use foundationdb71 instead"; # added 2023-06-06
530+ foundationdb61 = throw "foundationdb61 is no longer maintained, use foundationdb71 instead"; # added 2023-06-06
531 foxitreader = throw "foxitreader has been removed because it had vulnerabilities and was unmaintained"; # added 2023-02-20
532 fscryptctl-experimental = throw "The package fscryptctl-experimental has been removed. Please switch to fscryptctl"; # Added 2021-11-07
533 fsharp41 = throw "fsharp41 has been removed, please use dotnet-sdk_5 or later";
···114 flask_testing = flask-testing; # added 2022-04-25
115 flask_wtf = flask-wtf; # added 2022-05-24
116 FormEncode = formencode; # added 2023-02-19
0000117 functorch = throw "functorch is now part of the torch package and has therefore been removed. See https://github.com/pytorch/functorch/releases/tag/v1.13.0 for more info."; # added 2022-12-01
118 garages-amsterdam = throw "garages-amsterdam has been renamed odp-amsterdam."; # added 2023-01-04
119 garminconnect-ha = garminconnect; # added 2022-02-05
···114 flask_testing = flask-testing; # added 2022-04-25
115 flask_wtf = flask-wtf; # added 2022-05-24
116 FormEncode = formencode; # added 2023-02-19
117+ foundationdb51 = throw "foundationdb51 is no longer maintained, use foundationdb71 instead"; # added 2023-06-06
118+ foundationdb52 = throw "foundationdb52 is no longer maintained, use foundationdb71 instead"; # added 2023-06-06
119+ foundationdb60 = throw "foundationdb60 is no longer maintained, use foundationdb71 instead"; # added 2023-06-06
120+ foundationdb61 = throw "foundationdb61 is no longer maintained, use foundationdb71 instead"; # added 2023-06-06
121 functorch = throw "functorch is now part of the torch package and has therefore been removed. See https://github.com/pytorch/functorch/releases/tag/v1.13.0 for more info."; # added 2022-12-01
122 garages-amsterdam = throw "garages-amsterdam has been renamed odp-amsterdam."; # added 2023-01-04
123 garminconnect-ha = garminconnect; # added 2022-02-05