diff options
author | Bjørn Forsman <bjorn.forsman@gmail.com> | 2014-04-23 21:51:21 +0200 |
---|---|---|
committer | Bjørn Forsman <bjorn.forsman@gmail.com> | 2014-04-23 21:51:21 +0200 |
commit | 83d0fd30786e42058bb205eee5901ea31571bbcd (patch) | |
tree | 4146f0a510d8a8b1f5209af11e916ee7c1dbc02b /pkgs/development/libraries/thrift | |
parent | a3b1f48c5daf373c8fdfecb9d5ffd270475da6e9 (diff) | |
download | nixpkgs-83d0fd30786e42058bb205eee5901ea31571bbcd.tar nixpkgs-83d0fd30786e42058bb205eee5901ea31571bbcd.tar.gz nixpkgs-83d0fd30786e42058bb205eee5901ea31571bbcd.tar.bz2 nixpkgs-83d0fd30786e42058bb205eee5901ea31571bbcd.tar.lz nixpkgs-83d0fd30786e42058bb205eee5901ea31571bbcd.tar.xz nixpkgs-83d0fd30786e42058bb205eee5901ea31571bbcd.tar.zst nixpkgs-83d0fd30786e42058bb205eee5901ea31571bbcd.zip |
thrift: unbreak build
Add a tiny patch (already upstream) that fixes this build error: <flex>/lib/libfl.so: undefined reference to `yylex'
Diffstat (limited to 'pkgs/development/libraries/thrift')
-rw-r--r-- | pkgs/development/libraries/thrift/default.nix | 5 | ||||
-rw-r--r-- | pkgs/development/libraries/thrift/yylex.patch | 23 |
2 files changed, 28 insertions, 0 deletions
diff --git a/pkgs/development/libraries/thrift/default.nix b/pkgs/development/libraries/thrift/default.nix index e1129d25ef4..191f9da99d1 100644 --- a/pkgs/development/libraries/thrift/default.nix +++ b/pkgs/development/libraries/thrift/default.nix @@ -15,6 +15,11 @@ stdenv.mkDerivation { enableParallelBuilding = true; + # Fixes build error: <flex>/lib/libfl.so: undefined reference to `yylex'. + # Patch exists in upstream git repo, so it can be removed on the next version + # bump. + patches = [ ./yylex.patch ]; + # Workaround to make the python wrapper not drop this package: # pythonFull.override { extraLibs = [ thrift ]; } pythonPath = []; diff --git a/pkgs/development/libraries/thrift/yylex.patch b/pkgs/development/libraries/thrift/yylex.patch new file mode 100644 index 00000000000..3700bc6a436 --- /dev/null +++ b/pkgs/development/libraries/thrift/yylex.patch @@ -0,0 +1,23 @@ +Fixes build error: + + <flex>/lib/libfl.so: undefined reference to `yylex' + +The same patch exists in upstream thrift git repo, commit +ec8daae71004b3c2346bf12b2d74e52ed0815337 +"THRIFT-2386: Thrift refuses to link yylex". +diff --git a/compiler/cpp/src/main.h b/compiler/cpp/src/main.h +index 87af5f6..27285f5 100644 +--- a/compiler/cpp/src/main.h ++++ b/compiler/cpp/src/main.h +@@ -28,8 +28,9 @@ + /** + * Defined in the flex library + */ +- +-int yylex(void); ++extern "C" { ++ int yylex(void); ++} + + int yyparse(void); + |