···11-commit 7ed4745a092a203f92fc37ab5894e92117db0c94
22-Author: Austin Seipp <aseipp@pobox.com>
33-Date: Sat May 4 15:23:35 2019 -0500
44-55- flow: fix a build failure with Clang/libcxx on Linux
66-77- 11bd7d7da introduced a hack on Linux to work around a missing symbol in
88- libstdc++'s _pic library on Ubuntu. Unfortunately, this causes the build
99- to fail when using Clang, as it doesn't believe this symbol is part of
1010- its headers in c++11 mode.
1111-1212- Unfortunately there's no good way to distinguish libcxx from libstdc++
1313- with the preprocessor, so we merely gate it by only checking for clang,
1414- iff we are on Linux.
1515-1616- With this change, Clang 8.x can build FoundationDB on Linux using libcxx
1717- as the standard C++ library.
1818-1919- Signed-off-by: Austin Seipp <aseipp@pobox.com>
2020-2121-diff --git a/flow/Platform.cpp b/flow/Platform.cpp
2222-index 3d3f1ac0..9f21dfd4 100644
2323---- a/flow/Platform.cpp
2424-+++ b/flow/Platform.cpp
2525-@@ -2841,13 +2841,26 @@ void setupSlowTaskProfiler() {
2626- #endif
2727- }
2828-2929--#ifdef __linux__
3030-+#if defined(__linux__) && !defined(__clang__)
3131- // There's no good place to put this, so it's here.
3232- // Ubuntu's packaging of libstdc++_pic offers different symbols than libstdc++. Go figure.
3333- // Notably, it's missing a definition of std::istream::ignore(long), which causes compilation errors
3434- // in the bindings. Thus, we provide weak versions of their definitions, so that if the
3535- // linked-against libstdc++ is missing their definitions, we'll be able to use the provided
3636- // ignore(long, int) version.
3737-+//
3838-+// Note that this hack is DISABLED when we use Clang. It is only needed when we statically link
3939-+// to the _pic libraries, but only official FDB Linux binaries are built this way using GCC. If we
4040-+// don't use the _pic libraries, then this hack is entirely unneeded -- likely the case when using
4141-+// Clang on Linux.
4242-+//
4343-+// Doing this allows us to use LLVM's libc++ with Clang on Linux -- otherwise, providing
4444-+// a weak symbol definition for an internal (non-public) class member fails (due to that member
4545-+// being non-existant on libc++.) See upstream GitHub issue #1533 for more information.
4646-+//
4747-+// TODO FIXME: Obliterate this when the official build environment is upgraded beyond Ubuntu 14.04.
4848-+// (This problem should be fixed in later LTS releases.)
4949-+
5050- #include <istream>
5151- namespace std {
5252- typedef basic_istream<char, std::char_traits<char>> char_basic_istream;
···11-commit 8076537a52bb026941f13f5542395aac69ef0825
22-Author: Austin Seipp <aseipp@pobox.com>
33-Date: Sat May 4 17:34:51 2019 -0500
44-55- cmake: add workarounds for NixOS-specific deficiencies [NixOS]
66-77- The NixOS debug builder hook adds '-Wa,--compress-debug-sections' to the
88- link flags (it actually adds it to the compiler flags, but the compiler
99- is used for linking, so...). This makes the compiler angry when -Werror
1010- is passed, because it's unused at link-time (-Wa applies to the
1111- assembler). Suppress this warning with -Wno-unused-command-line-argument
1212-1313- NB: we *could* use -Wno-error=unused-command-line-argument, but that
1414- still results in warnings anyway, just not fatal ones. We'd like to
1515- remove them all for the sake of the build output.
1616-1717- Signed-off-by: Austin Seipp <aseipp@pobox.com>
1818-1919-diff --git a/cmake/ConfigureCompiler.cmake b/cmake/ConfigureCompiler.cmake
2020-index 03af9c10..7d059375 100644
2121---- a/cmake/ConfigureCompiler.cmake
2222-+++ b/cmake/ConfigureCompiler.cmake
2323-@@ -119,6 +119,11 @@ else()
2424- else()
2525- add_compile_options(-Werror)
2626- endif()
2727-+ if (CLANG)
2828-+ # aseipp: NixOS hack
2929-+ add_compile_options(-Wno-unused-command-line-argument)
3030-+ add_link_options(-Wno-unused-command-line-argument)
3131-+ endif()
3232- add_compile_options($<$<BOOL:${GCC}>:-Wno-pragmas>)
3333- add_compile_options(-Wno-error=format
3434- -Wunused-variable
···11-# This builder is for FoundationDB's original, somewhat strange visual studio +
22-# make build system. In FoundationDB 6.1 and later, there's a new CMake system
33-# (which will eventually become the default version.)
44-{ gcc6Stdenv, lib, fetchurl, fetchFromGitHub
55-66-, which, m4
77-, python2, openjdk, mono, libressl
88-, ...
99-}:
1010-1111-let
1212- # hysterical raisins dictate a version of boost this old. however,
1313- # we luckily do not need to build anything, we just need the header
1414- # files.
1515- boost152 = gcc6Stdenv.mkDerivation {
1616- name = "boost-headers-1.52.0";
1717-1818- src = fetchurl {
1919- url = "mirror://sourceforge/boost/boost_1_52_0.tar.bz2";
2020- sha256 = "14mc7gsnnahdjaxbbslzk79rc0d12h1i681cd3srdwr3fzynlar2";
2121- };
2222-2323- dontConfigure = true;
2424- dontBuild = true;
2525- installPhase = "mkdir -p $out/include && cp -R boost $out/include/";
2626- };
2727-2828- makeFdb =
2929- { version
3030- , branch
3131- , sha256
3232-3333- # the revision can be inferred from the fdb tagging policy
3434- , rev ? "refs/tags/${version}"
3535-3636- # in theory newer versions of fdb support newer boost versions, but they
3737- # don't :( maybe one day
3838- , boost ? boost152
3939-4040- # if an release is unofficial/a prerelease, then make sure this is set
4141- , officialRelease ? true
4242-4343- , patches ? []
4444- }: gcc6Stdenv.mkDerivation {
4545- pname = "foundationdb";
4646- inherit version;
4747-4848- src = fetchFromGitHub {
4949- owner = "apple";
5050- repo = "foundationdb";
5151- inherit rev sha256;
5252- };
5353-5454- nativeBuildInputs = [ python2 openjdk which m4 mono ];
5555- buildInputs = [ libressl boost ];
5656-5757- inherit patches;
5858- postPatch = ''
5959- # note: this does not do anything for 6.0+
6060- substituteInPlace ./build/scver.mk \
6161- --subst-var-by NIXOS_FDB_VERSION_ID "${rev}" \
6262- --subst-var-by NIXOS_FDB_SCBRANCH "${branch}"
6363-6464- substituteInPlace ./Makefile \
6565- --replace 'shell which ccache' 'shell true' \
6666- --replace -Werror ""
6767-6868- substituteInPlace ./Makefile \
6969- --replace libstdc++_pic libstdc++
7070-7171- substituteInPlace ./build/link-validate.sh \
7272- --replace 'exit 1' '#exit 1'
7373-7474- patchShebangs .
7575- '' + lib.optionalString (lib.versionAtLeast version "6.0") ''
7676- substituteInPlace ./Makefile \
7777- --replace 'TLS_LIBS +=' '#TLS_LIBS +=' \
7878- --replace 'LDFLAGS :=' 'LDFLAGS := -ltls -lssl -lcrypto'
7979- '';
8080-8181- separateDebugInfo = true;
8282- enableParallelBuilding = true;
8383-8484- makeFlags = [ "all" "fdb_java" "fdb_python" ]
8585- # Don't compile FDBLibTLS if we don't need it in 6.0 or later;
8686- # it gets statically linked in
8787- ++ lib.optionals (lib.versionOlder version "6.0") [ "fdb_c" ]
8888- # Needed environment overrides
8989- ++ [ "KVRELEASE=1"
9090- "NOSTRIP=1"
9191- ] ++ lib.optionals officialRelease [ "RELEASE=true" ];
9292-9393- # on 6.0 and later, we can specify all this information manually
9494- configurePhase = lib.optionalString (lib.versionAtLeast version "6.0") ''
9595- export SOURCE_CONTROL=GIT
9696- export SCBRANCH="${branch}"
9797- export VERSION_ID="${rev}"
9898- '';
9999-100100- installPhase = ''
101101- mkdir -vp $out/{bin,libexec/plugins} $lib/{lib,share/java} $dev/include/foundationdb
102102-103103- '' + lib.optionalString (lib.versionOlder version "6.0") ''
104104- # we only copy the TLS library on < 6.0, since it's compiled-in otherwise
105105- cp -v ./lib/libFDBLibTLS.so $out/libexec/plugins/FDBLibTLS.so
106106- '' + ''
107107-108108- # C API
109109- cp -v ./lib/libfdb_c.so $lib/lib
110110- cp -v ./bindings/c/foundationdb/fdb_c.h $dev/include/foundationdb
111111- cp -v ./bindings/c/foundationdb/fdb_c_options.g.h $dev/include/foundationdb
112112- cp -v ./fdbclient/vexillographer/fdb.options $dev/include/foundationdb
113113-114114- # java
115115- cp -v ./bindings/java/foundationdb-client.jar $lib/share/java/fdb-java.jar
116116-117117- # python
118118- cp LICENSE ./bindings/python
119119- substitute ./bindings/python/setup.py.in ./bindings/python/setup.py \
120120- --replace 'VERSION' "${version}"
121121- rm -f ./bindings/python/setup.py.in
122122- rm -f ./bindings/python/fdb/*.pth # remove useless files
123123- rm -f ./bindings/python/*.rst ./bindings/python/*.mk
124124-125125- cp -R ./bindings/python/ tmp-pythonsrc/
126126- tar -zcf $pythonsrc --transform s/tmp-pythonsrc/python-foundationdb/ ./tmp-pythonsrc/
127127-128128- # binaries
129129- for x in fdbbackup fdbcli fdbserver fdbmonitor; do
130130- cp -v "./bin/$x" $out/bin;
131131- done
132132-133133- ln -sfv $out/bin/fdbbackup $out/bin/dr_agent
134134- ln -sfv $out/bin/fdbbackup $out/bin/fdbrestore
135135- ln -sfv $out/bin/fdbbackup $out/bin/fdbdr
136136-137137- ln -sfv $out/bin/fdbbackup $out/libexec/backup_agent
138138- '';
139139-140140- outputs = [ "out" "lib" "dev" "pythonsrc" ];
141141-142142- meta = with lib; {
143143- description = "Open source, distributed, transactional key-value store";
144144- homepage = "https://www.foundationdb.org";
145145- license = licenses.asl20;
146146- platforms = [ "x86_64-linux" ];
147147- maintainers = with maintainers; [ thoughtpolice ];
148148- };
149149- };
150150-in makeFdb
+4
pkgs/top-level/aliases.nix
···524524 '';
525525526526 foomatic_filters = throw "'foomatic_filters' has been renamed to/replaced by 'foomatic-filters'"; # Converted to throw 2022-02-22
527527+ foundationdb51 = throw "foundationdb51 is no longer maintained, use foundationdb71 instead"; # added 2023-06-06
528528+ foundationdb52 = throw "foundationdb52 is no longer maintained, use foundationdb71 instead"; # added 2023-06-06
529529+ foundationdb60 = throw "foundationdb60 is no longer maintained, use foundationdb71 instead"; # added 2023-06-06
530530+ foundationdb61 = throw "foundationdb61 is no longer maintained, use foundationdb71 instead"; # added 2023-06-06
527531 foxitreader = throw "foxitreader has been removed because it had vulnerabilities and was unmaintained"; # added 2023-02-20
528532 fscryptctl-experimental = throw "The package fscryptctl-experimental has been removed. Please switch to fscryptctl"; # Added 2021-11-07
529533 fsharp41 = throw "fsharp41 has been removed, please use dotnet-sdk_5 or later";
···114114 flask_testing = flask-testing; # added 2022-04-25
115115 flask_wtf = flask-wtf; # added 2022-05-24
116116 FormEncode = formencode; # added 2023-02-19
117117+ foundationdb51 = throw "foundationdb51 is no longer maintained, use foundationdb71 instead"; # added 2023-06-06
118118+ foundationdb52 = throw "foundationdb52 is no longer maintained, use foundationdb71 instead"; # added 2023-06-06
119119+ foundationdb60 = throw "foundationdb60 is no longer maintained, use foundationdb71 instead"; # added 2023-06-06
120120+ foundationdb61 = throw "foundationdb61 is no longer maintained, use foundationdb71 instead"; # added 2023-06-06
117121 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
118122 garages-amsterdam = throw "garages-amsterdam has been renamed odp-amsterdam."; # added 2023-01-04
119123 garminconnect-ha = garminconnect; # added 2022-02-05