NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.88k stars 13.94k forks source link

enblend-enfuse: build error on staging-next #149763

Closed fabianhjr closed 2 years ago

fabianhjr commented 2 years ago

Describe the bug

Build error on current staging-next ( #148396 )

Steps To Reproduce

Checkout current staging-next and attempt to build (via a dependent like digikam for example)

Additional context

include/boost/config/compiler/gcc.hpp:323: note: this is the location of the previous definition
minimizer.cc: In constructor 'Minimizer::Minimizer(size_t)':
minimizer.cc:29:53: error: 'numeric_limits' is not a member of 'std'
   29 |     f_goal_(boost::none), absolute_error_(sqrt(std::numeric_limits<double>::epsilon()))
      |                                                     ^~~~~~~~~~~~~~
minimizer.cc:29:68: error: expected primary-expression before 'double'
   29 |     f_goal_(boost::none), absolute_error_(sqrt(std::numeric_limits<double>::epsilon()))
      |                                                                    ^~~~~~
minimizer.cc: In member function 'Minimizer* Minimizer::set_absolute_error(double)':
minimizer.cc:93:65: error: 'numeric_limits' is not a member of 'std'
   93 |         absolute_error_ = std::max(an_absolute_error, sqrt(std::numeric_limits<double>::epsilon()));
      |                                                                 ^~~~~~~~~~~~~~
minimizer.cc:93:80: error: expected primary-expression before 'double'
   93 |         absolute_error_ = std::max(an_absolute_error, sqrt(std::numeric_limits<double>::epsilon()));
      |                                                                                ^~~~~~
minimizer.cc: In member function 'virtual double Minimizer::absolute_error() const':
minimizer.cc:128:59: error: 'numeric_limits' is not a member of 'std'
  128 |     return absolute_error_ ? *absolute_error_ : sqrt(std::numeric_limits<double>::epsilon());
      |                                                           ^~~~~~~~~~~~~~
minimizer.cc:128:74: error: expected primary-expression before 'double'
  128 |     return absolute_error_ ? *absolute_error_ : sqrt(std::numeric_limits<double>::epsilon());
      |                                                                          ^~~~~~
minimizer.cc: In constructor 'MinimizerMultiDimensionNoDerivative::MinimizerMultiDimensionNoDerivative(const gsl_multimin_function&, const array_type&, const array_type&)':
minimizer.cc:362:31: error: 'numeric_limits' is not a member of 'std'
  362 |     characteristic_size_(std::numeric_limits<double>::max())
      |                               ^~~~~~~~~~~~~~
minimizer.cc:362:46: error: expected primary-expression before 'double'
  362 |     characteristic_size_(std::numeric_limits<double>::max())
      |                                              ^~~~~~
minimizer.cc: In constructor 'MinimizerMultiDimensionNoDerivative::MinimizerMultiDimensionNoDerivative(const gsl_multimin_function&, const array_type&)':
minimizer.cc:382:31: error: 'numeric_limits' is not a member of 'std'
  382 |     characteristic_size_(std::numeric_limits<double>::max())
      |                               ^~~~~~~~~~~~~~
minimizer.cc:382:46: error: expected primary-expression before 'double'
  382 |     characteristic_size_(std::numeric_limits<double>::max())
      |                                              ^~~~~~
g++ -DHAVE_CONFIG_H -I. -I..    -DENFUSE_SOURCE   -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -I../src/dynamic_loader -I../src/layer_selection -g -O2 -O2 -DNDEBUG -c -o enfuse-error_message.o `test -f 'error_message.cc' || echo './'`error_message.cc
g++ -DHAVE_CONFIG_H -I. -I..    -DENFUSE_SOURCE   -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -I../src/dynamic_loader -I../src/layer_selection -g -O2 -O2 -DNDEBUG -c -o enfuse-filenameparse.o `test -f 'filenameparse.cc' || echo './'`filenameparse.cc
make[4]: *** [Makefile:827: enblend-minimizer.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[4]: Leaving directory '/build/enblend-enfuse-4.2/src'
make[3]: *** [Makefile:1096: all-recursive] Error 1
make[3]: Leaving directory '/build/enblend-enfuse-4.2/src'
make[2]: *** [Makefile:520: all] Error 2
make[2]: Leaving directory '/build/enblend-enfuse-4.2/src'
make[1]: *** [Makefile:432: all-recursive] Error 1
make[1]: Leaving directory '/build/enblend-enfuse-4.2'
make: *** [Makefile:372: all] Error 2
error: builder for '/nix/store/zlr7bmh11d6m8hjzfanvnm9jyvm5s0zl-enblend-enfuse-4.2.drv' failed with exit code 2;

Removing enblend-enfuse as a hugin and digikam dependency seems to build.

diff --git a/pkgs/applications/graphics/digikam/default.nix b/pkgs/applications/graphics/digikam/default.nix
index 141f966253d..645a0b00cb7 100644
--- a/pkgs/applications/graphics/digikam/default.nix
+++ b/pkgs/applications/graphics/digikam/default.nix
@@ -45,7 +45,6 @@
 , x265

 # For panorama and focus stacking
-, enblend-enfuse
 , hugin
 , gnumake

@@ -121,7 +120,7 @@ mkDerivation rec {

   preFixup = ''
     qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
-    qtWrapperArgs+=(--prefix PATH : ${lib.makeBinPath [ gnumake hugin enblend-enfuse ]})
+    qtWrapperArgs+=(--prefix PATH : ${lib.makeBinPath [ gnumake hugin ]})
     qtWrapperArgs+=(--suffix DK_PLUGIN_PATH : ${placeholder "out"}/${qtbase.qtPluginPrefix}/${pname})
     substituteInPlace $out/bin/digitaglinktree \
       --replace "/usr/bin/perl" "${perl}/bin/perl" \
diff --git a/pkgs/applications/graphics/hugin/default.nix b/pkgs/applications/graphics/hugin/default.nix
index ec2ac709f86..437cd1e8a77 100644
--- a/pkgs/applications/graphics/hugin/default.nix
+++ b/pkgs/applications/graphics/hugin/default.nix
@@ -9,7 +9,6 @@
 , autopanosiftc
 , boost
 , cairo
-, enblend-enfuse
 , exiv2
 , fftw
 , flann
@@ -90,7 +89,6 @@ stdenv.mkDerivation rec {
     for p in $out/bin/*; do
       wrapProgram "$p" \
         --suffix PATH : ${autopanosiftc}/bin \
-        --suffix PATH : ${enblend-enfuse}/bin \
         --suffix PATH : ${gnumake}/bin \
         --suffix PATH : ${perlPackages.ImageExifTool}/bin
     done

Notify maintainers

No direct maintainer, tagging @hrdinka since they are affected via hugin (pkgs/applications/graphics/hugin/default.nix); digikam has no current maintainer but is also affected.

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.15.6, NixOS, 22.05 (Quokka)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.4`
 - channels(root): `"nixos-22.05pre336298.bc5d68306b4, nixos-small-22.05pre337082.499bd17576c"`
 - channels(fabian): `"home-manager, nixos-19.03-19.03.173691.34c7eb7545d, nixos-19.09-19.09.2522.75f4ba05c63, nixos-20.03-20.03.3330.1db42b7fe38, nixos-20.09-20.09.4407.1c1f5649bb9, nixos-21.05-21.05.4448.4a8751d694b, nixos-21.11-21.11.334139.1bd4bbd49be"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
r-burns commented 2 years ago

Yep, looks like this is another boost issue. Should be fixed by https://github.com/NixOS/nixpkgs/pull/148668.

The default boost (i.e. unversioned attr) is being bumped from 1.69 to 1.75 on staging-next. Unfortunately this is causing a lot of confusing undeclared/undefined errors where projects haven't included what they used and their transitive includes get mucked up.

The proper upstream fix in this case would probably be to add the missing #include <limits>. For now I'm just sticking to pinning the boost version to get staging-next stabilized ASAP.

vcunat commented 2 years ago

Confirmed: https://hydra.nixos.org/eval/1730887?filter=enblend-enfuse