Skip to content

Commit

Permalink
treewide: fixup breakage due to absolute compiler path
Browse files Browse the repository at this point in the history
Some packages just can't handle them #44767.  It was tempting to try
to abstract this in some way, but I didn't do that ATM.
  • Loading branch information
vcunat committed Aug 21, 2018
1 parent b300ddd commit d0888d1
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkgs/applications/graphics/exrtools/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ stdenv.mkDerivation rec {
sha256 = "0jpkskqs1yjiighab4s91jy0c0qxcscwadfn94xy2mm2bx2qwp4z";
};

preConfigure = ''
CC=${stdenv.cc.targetPrefix}cc
CXX=${stdenv.cc.targetPrefix}c++
'';

nativeBuildInputs = [ pkgconfig ];
buildInputs = [ stdenv openexr libpng12 libjpeg ];

Expand Down
5 changes: 5 additions & 0 deletions pkgs/applications/misc/kiwix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ stdenv.mkDerivation rec {
cd ../../..
'';

preConfigure = ''
CC=${stdenv.cc.targetPrefix}cc
CXX=${stdenv.cc.targetPrefix}c++
'';

configureFlags = [
"--disable-static"
"--disable-staticbins"
Expand Down
3 changes: 3 additions & 0 deletions pkgs/applications/science/logic/aiger/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;

configurePhase = ''
CC=${stdenv.cc.targetPrefix}cc
CXX=${stdenv.cc.targetPrefix}c++
# Set up picosat, so we can build 'aigbmc'
mkdir ../picosat
ln -s ${picosat}/include/picosat/picosat.h ../picosat/picosat.h
Expand Down
5 changes: 5 additions & 0 deletions pkgs/applications/science/logic/verit/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ stdenv.mkDerivation rec {
# --disable-static actually enables static linking here...
dontDisableStatic = true;

preConfigure = ''
CC=${stdenv.cc.targetPrefix}gcc
CXX=${stdenv.cc.targetPrefix}g++
'';

makeFlags = [ "LEX=${flex}/bin/flex" ];

preInstall = ''
Expand Down
5 changes: 5 additions & 0 deletions pkgs/applications/virtualization/open-vm-tools/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ stdenv.mkDerivation rec {
sed -i 's,/sbin/shutdown,shutdown,' lib/system/systemLinux.c
'';

preConfigure = ''
CC=${stdenv.cc.targetPrefix}cc
CXX=${stdenv.cc.targetPrefix}c++
'';

configureFlags = [ "--without-kernel-modules" "--without-xmlsecurity" ]
++ lib.optional (!withX) "--without-x";

Expand Down
5 changes: 5 additions & 0 deletions pkgs/development/libraries/podofo/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ stdenv.mkDerivation rec {
# TODO(@Dridus) remove the ++ libc at next hash break
buildInputs = [ lua5 ] ++ stdenv.lib.optional stdenv.isLinux stdenv.cc.libc;

preConfigure = ''
CC=${stdenv.cc.targetPrefix}cc
CXX=${stdenv.cc.targetPrefix}c++
'';

cmakeFlags = "-DPODOFO_BUILD_SHARED=ON -DPODOFO_BUILD_STATIC=OFF";

meta = {
Expand Down
5 changes: 5 additions & 0 deletions pkgs/development/libraries/zeroc-ice/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ stdenv.mkDerivation rec {
--replace xcrun ""
'';

preConfigure = ''
CC=${stdenv.cc.targetPrefix}cc
CXX=${stdenv.cc.targetPrefix}c++
'';

makeFlags = [ "prefix=$(out)" "OPTIMIZE=yes" ];

enableParallelBuilding = true;
Expand Down
3 changes: 3 additions & 0 deletions pkgs/development/ocaml-modules/zarith/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = [ gmp ];

patchPhase = "patchShebangs ./z_pp.pl";

configurePhase = ''
CC=${stdenv.cc.targetPrefix}cc
CXX=${stdenv.cc.targetPrefix}c++
./configure -installdir $out/lib/ocaml/${ocaml.version}/site-lib
'';
preInstall = "mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib";
Expand Down
5 changes: 5 additions & 0 deletions pkgs/games/warmux/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ stdenv.mkDerivation rec {
gettext intltool libtool perl
];

preConfigure = ''
CC=${stdenv.cc.targetPrefix}cc
CXX=${stdenv.cc.targetPrefix}c++
'';

configureFlagsArray = ("CFLAGS=-include ${zlib.dev}/include/zlib.h");

patches = [ ./gcc-fix.patch ];
Expand Down
5 changes: 5 additions & 0 deletions pkgs/games/warzone2100/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ stdenv.mkDerivation rec {
--replace "which %s" "${which}/bin/which %s"
'';

preConfigure = ''
CC=${stdenv.cc.targetPrefix}cc
CXX=${stdenv.cc.targetPrefix}c++
'';

configureFlags = [ "--with-distributor=NixOS" ];

hardeningDisable = [ "format" ];
Expand Down

8 comments on commit d0888d1

@dezgeg
Copy link
Contributor

@dezgeg dezgeg commented on d0888d1 Aug 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh. Maybe we can revert?

@vcunat
Copy link
Member Author

@vcunat vcunat commented on d0888d1 Aug 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know... the impact doesn't seem that large, and I consider absolute paths OK in those variables.

@vcunat
Copy link
Member Author

@vcunat vcunat commented on d0888d1 Aug 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might consider using absolute paths only when cross-compiling, or something like that. (I guess that's the case where confusion happens most easily and it's better to use absolute paths then.)

@matthewbauer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I definitely think a revert would make sense here. Especially with 18.09 branching soon. No one realized how much of a headache it would be before it was merged. I'm not against the idea of using absolute paths, we just need to think about the potential ramifications first. This can definitely blow up runtime closure sizes.

/cc @Ericson2314

@Ericson2314
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with a revert. In general I never want to be the one to approve/disapprove of a temporary revert: I don't bear the burden of release manager and other "stability" roles.

@7c6f434c
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change what breaks Firefox source build via disallowed reference to gcc-wrapper from Firefox wrapper?

@Ericson2314
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like it. @matthewbauer made the revert PR and I approved it.

@vcunat
Copy link
Member Author

@vcunat vcunat commented on d0888d1 Aug 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know of no such roles for unstable/master.

Please sign in to comment.