Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 723306 - media-gfx/enblend-4.2.0_p20161007-r1: src/minimizer.cc:29:53: error: ‘numeric_limits’ is not a member of ‘std’
Summary: media-gfx/enblend-4.2.0_p20161007-r1: src/minimizer.cc:29:53: error: ‘numeric...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Andreas K. Hüttel
URL:
Whiteboard:
Keywords: PATCH
: 724988 (view as bug list)
Depends on: 723302
Blocks:
  Show dependency tree
 
Reported: 2020-05-15 23:06 UTC by Victor Mataré
Modified: 2020-09-25 07:35 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to fix find_library lcms2 (enblend-cmake.patch,471 bytes, patch)
2020-05-15 23:36 UTC, Victor Mataré
Details | Diff
existing patch adapted against current development versino (enblend-4.2-doc-install-dir-fix.patch,2.69 KB, patch)
2020-05-15 23:37 UTC, Victor Mataré
Details | Diff
ebuild that pulls current development version (enblend-9999.ebuild,1.70 KB, text/plain)
2020-05-15 23:38 UTC, Victor Mataré
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Mataré 2020-05-15 23:06:49 UTC
/usr/bin/x86_64-pc-linux-gnu-g++ -DENFUSE_SOURCE -DHAVE_CONFIG_H -DHAVE_LIBGSL -DHAVE_LIBGSLCBLAS -DHAVE_LIBLCMS2 -DHAVE_LIBZ -DHasEXR -DHasJPEG -DHasPNG -DHasTIFF -DPOSIX_DL -I. -I/usr/include/OpenEXR -I/var/tmp/portage/media-gfx/enblend-4.2.0_p20161007-r1/work/enblend-4.2.0_p20161007/src -I/var/tmp/portage/media-gfx/enblend-4.2.0_p20161007-r1/work/enblend-4.2.0_p20161007/src/layer_selection -I/var/tmp/portage/media-gfx/enblend-4.2.0_p20161007-r1/work/enblend-4.2.0_p20161007/src/dynamic_loader -Isrc  -O2 -pipe -frecord-gcc-switches -march=znver1 -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -msse4a -mcx16 -msahf -mmovbe -maes -msha -mpclmul -mpopcnt -mabm -mno-lwp -mfma -mno-fma4 -mno-xop -mbmi -mno-sgx -mbmi2 -mno-pconfig -mno-wbnoinvd -mno-tbm -mavx -mavx2 -msse4.2 -msse4.1 -mlzcnt -mno-rtm -mno-hle -mrdrnd -mf16c -mfsgsbase -mrdseed -mprfchw -madx -mfxsr -mxsave -mxsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mclflushopt -mxsavec -mxsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-avx5124fmaps -mno-avx5124vnniw -mno-clwb -mmwaitx -mclzero -mno-pku -mno-rdpid -mno-gfni -mno-shstk -mno-avx512vbmi2 -mno-avx512vnni -mno-vaes -mno-vpclmulqdq -mno-avx512bitalg -mno-movdiri -mno-movdir64b -mno-waitpkg -mno-cldemote -mno-ptwrite --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=512 -mtune=znver1 --std=gnu++11   -fopenmp -MD -MT src/CMakeFiles/enfuse.dir/minimizer.cc.o -MF src/CMakeFiles/enfuse.dir/minimizer.cc.o.d -o src/CMakeFiles/enfuse.dir/minimizer.cc.o -c /var/tmp/portage/media-gfx/enblend-4.2.0_p20161007-r1/work/enblend-4.2.0_p20161007/src/minimizer.cc
/var/tmp/portage/media-gfx/enblend-4.2.0_p20161007-r1/work/enblend-4.2.0_p20161007/src/minimizer.cc: In constructor ‘Minimizer::Minimizer(size_t)’:
/var/tmp/portage/media-gfx/enblend-4.2.0_p20161007-r1/work/enblend-4.2.0_p20161007/src/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()))
      |                                                     ^~~~~~~~~~~~~~
/var/tmp/portage/media-gfx/enblend-4.2.0_p20161007-r1/work/enblend-4.2.0_p20161007/src/minimizer.cc:29:68: error: expected primary-expression before ‘double’
   29 |     f_goal_(boost::none), absolute_error_(sqrt(std::numeric_limits<double>::epsilon()))
      |                                                                    ^~~~~~
/var/tmp/portage/media-gfx/enblend-4.2.0_p20161007-r1/work/enblend-4.2.0_p20161007/src/minimizer.cc: In member function ‘Minimizer* Minimizer::set_absolute_error(double)’:
/var/tmp/portage/media-gfx/enblend-4.2.0_p20161007-r1/work/enblend-4.2.0_p20161007/src/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()));
      |                                                                 ^~~~~~~~~~~~~~
/var/tmp/portage/media-gfx/enblend-4.2.0_p20161007-r1/work/enblend-4.2.0_p20161007/src/minimizer.cc:93:80: error: expected primary-expression before ‘double’
   93 |         absolute_error_ = std::max(an_absolute_error, sqrt(std::numeric_limits<double>::epsilon()));
      |                                                                                ^~~~~~
/var/tmp/portage/media-gfx/enblend-4.2.0_p20161007-r1/work/enblend-4.2.0_p20161007/src/minimizer.cc: In member function ‘virtual double Minimizer::absolute_error() const’:
/var/tmp/portage/media-gfx/enblend-4.2.0_p20161007-r1/work/enblend-4.2.0_p20161007/src/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());
      |                                                           ^~~~~~~~~~~~~~
/var/tmp/portage/media-gfx/enblend-4.2.0_p20161007-r1/work/enblend-4.2.0_p20161007/src/minimizer.cc:128:74: error: expected primary-expression before ‘double’
  128 |     return absolute_error_ ? *absolute_error_ : sqrt(std::numeric_limits<double>::epsilon());
      |                                                                          ^~~~~~
/var/tmp/portage/media-gfx/enblend-4.2.0_p20161007-r1/work/enblend-4.2.0_p20161007/src/minimizer.cc: In constructor ‘MinimizerMultiDimensionNoDerivative::MinimizerMultiDimensionNoDerivative(const gsl_multimin_function&, const array_type&, const array_type&)’:
/var/tmp/portage/media-gfx/enblend-4.2.0_p20161007-r1/work/enblend-4.2.0_p20161007/src/minimizer.cc:362:31: error: ‘numeric_limits’ is not a member of ‘std’
  362 |     characteristic_size_(std::numeric_limits<double>::max())
      |                               ^~~~~~~~~~~~~~
/var/tmp/portage/media-gfx/enblend-4.2.0_p20161007-r1/work/enblend-4.2.0_p20161007/src/minimizer.cc:362:46: error: expected primary-expression before ‘double’
  362 |     characteristic_size_(std::numeric_limits<double>::max())
      |                                              ^~~~~~
/var/tmp/portage/media-gfx/enblend-4.2.0_p20161007-r1/work/enblend-4.2.0_p20161007/src/minimizer.cc: In constructor ‘MinimizerMultiDimensionNoDerivative::MinimizerMultiDimensionNoDerivative(const gsl_multimin_function&, const array_type&)’:
/var/tmp/portage/media-gfx/enblend-4.2.0_p20161007-r1/work/enblend-4.2.0_p20161007/src/minimizer.cc:382:31: error: ‘numeric_limits’ is not a member of ‘std’
  382 |     characteristic_size_(std::numeric_limits<double>::max())
      |                               ^~~~~~~~~~~~~~
/var/tmp/portage/media-gfx/enblend-4.2.0_p20161007-r1/work/enblend-4.2.0_p20161007/src/minimizer.cc:382:46: error: expected primary-expression before ‘double’
  382 |     characteristic_size_(std::numeric_limits<double>::max())
      |                                              ^~~~~~
ninja: build stopped: subcommand failed.


This could be fixed by patching it to include the <limits> header. But it's being triggered only because portage appends --std=gnu++11, effectively downgrading from c++14, which is the default in GCC 9.3. So removing the --std=gnu++11 from the compiler flags is another option.

Reproducible: Always
Comment 1 Victor Mataré 2020-05-15 23:18:01 UTC
Sorry, I was assuming that the release version is at least somewhere near what they have in mercurial, but it seems like a lot has happened since 2016 ;-)

So yeah, looks like upstream is a little behind on their releases. Can we have a -9999 version that pulls directly from https://github.com/ukoethe/vigra/commit/dc730be49fc8def4304a651fa525e43b7754955e please?
Comment 2 Victor Mataré 2020-05-15 23:19:24 UTC
Sorry, wrong URL. Of course we're not pulling vigra.

Correct URL:
http://hg.code.sf.net/p/enblend/code
Comment 3 Victor Mataré 2020-05-15 23:36:52 UTC
Created attachment 639484 [details, diff]
patch to fix find_library lcms2
Comment 4 Victor Mataré 2020-05-15 23:37:54 UTC
Created attachment 639486 [details, diff]
existing patch adapted against current development versino
Comment 5 Victor Mataré 2020-05-15 23:38:56 UTC
Created attachment 639488 [details]
ebuild that pulls current development version

Attached an ebuild with fixed patches that pulls from upstream mercurial
Comment 6 foufou33 2020-05-17 21:37:10 UTC
tried the ebuild and patches it still fails with :
/usr/lib/ccache/bin/x86_64-pc-linux-gnu-g++ -DCMS_NO_REGISTER_KEYWORD -DENFUSE_SOURCE -DHAVE_CONFIG_H -DHAVE_LIBGSL -DHAVE_LIBGSLCBLAS -DHAVE_LIBLCMS2 -DHAVE_LIBZ -DHasEXR -DHasJPEG -DHasPNG -DHasTIFF -DPOSIX_DL -I. -I/usr/include/OpenEXR -I/var/tmp/portage/media-gfx/enblend-9999/work/enblend-9999/src -I/var/tmp/portage/media-gfx/enblend-9999/work/enblend-9999/src/layer_selection -I/var/tmp/portage/media-gfx/enblend-9999/work/enblend-9999/src/dynamic_loader -Isrc  -march=native -O2 -pipe   -fopenmp -std=gnu++17 -MD -MT src/CMakeFiles/enfuse.dir/enfuse.cc.o -MF src/CMakeFiles/enfuse.dir/enfuse.cc.o.d -o src/CMakeFiles/enfuse.dir/enfuse.cc.o -c /var/tmp/portage/media-gfx/enblend-9999/work/enblend-9999/src/enfuse.cc
In file included from /usr/include/vigra/convolution.hxx:41,
                 from /var/tmp/portage/media-gfx/enblend-9999/work/enblend-9999/src/openmp_vigra.h:32,
                 from /var/tmp/portage/media-gfx/enblend-9999/work/enblend-9999/src/enfuse.h:47,
                 from /var/tmp/portage/media-gfx/enblend-9999/work/enblend-9999/src/enfuse.cc:187:
/usr/include/vigra/stdconvolution.hxx:796:13: error: ISO C++17 does not allow dynamic exception specifications
  796 |             throw(PreconditionViolation)
      |             ^~~~~
ninja: build stopped: subcommand failed.

https://github.com/ukoethe/vigra/commit/dc730be49fc8def4304a651fa525e43b7754955e 
solved the problem (patched the 2 files in /usr/include/vigra)
Comment 7 Victor Mataré 2020-05-17 23:19:27 UTC
Sorry, forgot to link to the bug for that: https://bugs.gentoo.org/show_bug.cgi?id=723302
Comment 8 Andreas Sturmlechner gentoo-dev 2020-07-10 21:16:47 UTC
*** Bug 724988 has been marked as a duplicate of this bug. ***
Comment 9 Larry the Git Cow gentoo-dev 2020-07-10 21:23:59 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=98d7c17a5ef2d3ee26265dba57b6ec1b5178394e

commit 98d7c17a5ef2d3ee26265dba57b6ec1b5178394e
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2020-07-10 21:22:14 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2020-07-10 21:23:45 +0000

    media-gfx/enblend: Fix build with GCC-10
    
    Thanks-to: Walter Hüttenmeyer <walter.huettenmeyer@gmail.com>
    Closes: https://bugs.gentoo.org/723306
    Package-Manager: Portage-2.3.103, Repoman-2.3.23
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 media-gfx/enblend/enblend-4.2.0_p20161007-r1.ebuild      |  3 ++-
 .../enblend/files/enblend-4.2.0_p20161007-gcc-10.patch   | 16 ++++++++++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)
Comment 10 Andreas Sturmlechner gentoo-dev 2020-07-10 21:26:57 UTC
(In reply to Victor Mataré from comment #5)
> Created attachment 639488 [details]
> ebuild that pulls current development version
> 
> Attached an ebuild with fixed patches that pulls from upstream mercurial
Thanks for your contribution; however a live ebuild can not be considered as a fix for normal issues.