Opened 23 months ago
Closed 23 months ago
#66488 closed defect (fixed)
lerc fails to build on Mountain Lion
Reported by: | RobK88 | Owned by: | Veence (Vincent) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.0 |
Keywords: | Cc: | dgilman (David Gilman), reneeotten (Renee Otten), chillin- | |
Port: | lerc |
Description
I am unable to upgrade lerc from v 3.0 to v4.0 on my Mac running Mountain Lion. The port fails to build.
bash-3.2$ port outdated The following installed ports are outdated: lerc 3.0_0 < 4.0.0_0 bash-3.2$ sudo port clean lerc ---> Cleaning lerc bash-3.2$ sudo port -v upgrade lerc ---> Computing dependencies for lerc. ---> Fetching archive for lerc ---> lerc-4.0.0_0.darwin_12.x86_64.tbz2 doesn't seem to exist in /opt/local/var/macports/incoming/verified ---> Attempting to fetch lerc-4.0.0_0.darwin_12.x86_64.tbz2 from http://packages.macports.org/lerc % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 ---> Attempting to fetch lerc-4.0.0_0.darwin_12.x86_64.tbz2 from http://ywg.ca.packages.macports.org/mirror/macports/packages/lerc % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 ---> Attempting to fetch lerc-4.0.0_0.darwin_12.x86_64.tbz2 from http://mirror.fcix.net/macports/packages/lerc % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 ---> Fetching distfiles for lerc ---> Verifying checksums for lerc ---> Checksumming lerc-4.0.0.tar.gz ---> Extracting lerc ---> Extracting lerc-4.0.0.tar.gz Executing: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_lerc/lerc/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/lerc/lerc-4.0.0.tar.gz' | /usr/bin/gnutar --no-same-owner -xf - ---> Configuring lerc Executing: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_lerc/lerc/work/build" && /opt/local/bin/cmake -G "CodeBlocks - Unix Makefiles" -DCMAKE_BUILD_TYPE=MacPorts -DCMAKE_INSTALL_PREFIX="/opt/local" -DCMAKE_INSTALL_NAME_DIR="/opt/local/lib" -DCMAKE_SYSTEM_PREFIX_PATH="/opt/local;/usr" -DCMAKE_C_COMPILER="$CC" -DCMAKE_CXX_COMPILER="$CXX" -DCMAKE_OBJC_COMPILER="$CC" -DCMAKE_OBJCXX_COMPILER="$CXX" -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DCMAKE_POLICY_DEFAULT_CMP0060=NEW -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_MAKE_PROGRAM=/usr/bin/make -DCMAKE_MODULE_PATH="/opt/local/share/cmake/Modules" -DCMAKE_PREFIX_PATH="/opt/local/share/cmake/Modules" -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON -DCMAKE_INSTALL_RPATH="/opt/local/lib" -Wno-dev -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.8" -DCMAKE_OSX_SYSROOT="/" /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_lerc/lerc/work/lerc-4.0.0 -- The C compiler identification is AppleClang 5.1.0.5030040 -- The CXX compiler identification is AppleClang 5.1.0.5030040 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/clang - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/clang++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring done -- Generating done CMake Warning: Manually-specified variables were not used by the project: CMAKE_OBJCXX_COMPILER CMAKE_OBJC_COMPILER CMAKE_POLICY_DEFAULT_CMP0025 CMAKE_POLICY_DEFAULT_CMP0060 -- Build files have been written to: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_lerc/lerc/work/build ---> Building lerc Executing: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_lerc/lerc/work/build" && /usr/bin/make -j2 -w all VERBOSE=ON make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_lerc/lerc/work/build' /opt/local/bin/cmake -S/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_lerc/lerc/work/lerc-4.0.0 -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_lerc/lerc/work/build --check-build-system CMakeFiles/Makefile.cmake 0 /opt/local/bin/cmake -E cmake_progress_start /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_lerc/lerc/work/build/CMakeFiles /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_lerc/lerc/work/build//CMakeFiles/progress.marks /usr/bin/make -f CMakeFiles/Makefile2 all make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_lerc/lerc/work/build' /usr/bin/make -f CMakeFiles/Lerc.dir/build.make CMakeFiles/Lerc.dir/depend make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_lerc/lerc/work/build' cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_lerc/lerc/work/build && /opt/local/bin/cmake -E cmake_depends "Unix Makefiles" /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_lerc/lerc/work/lerc-4.0.0 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_lerc/lerc/work/lerc-4.0.0 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_lerc/lerc/work/build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_lerc/lerc/work/build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_lerc/lerc/work/build/CMakeFiles/Lerc.dir/DependInfo.cmake --color= make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_lerc/lerc/work/build' /usr/bin/make -f CMakeFiles/Lerc.dir/build.make CMakeFiles/Lerc.dir/build make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_lerc/lerc/work/build' [ 6%] Building CXX object CMakeFiles/Lerc.dir/src/LercLib/BitStuffer2.cpp.o /usr/bin/clang++ -DLERC_EXPORTS -pipe -Os -DNDEBUG -I/opt/local/include -stdlib=libc++ -arch x86_64 -mmacosx-version-min=10.8 -fPIC -std=gnu++1y -MD -MT CMakeFiles/Lerc.dir/src/LercLib/BitStuffer2.cpp.o -MF CMakeFiles/Lerc.dir/src/LercLib/BitStuffer2.cpp.o.d -o CMakeFiles/Lerc.dir/src/LercLib/BitStuffer2.cpp.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_lerc/lerc/work/lerc-4.0.0/src/LercLib/BitStuffer2.cpp [ 13%] Building CXX object CMakeFiles/Lerc.dir/src/LercLib/BitMask.cpp.o /usr/bin/clang++ -DLERC_EXPORTS -pipe -Os -DNDEBUG -I/opt/local/include -stdlib=libc++ -arch x86_64 -mmacosx-version-min=10.8 -fPIC -std=gnu++1y -MD -MT CMakeFiles/Lerc.dir/src/LercLib/BitMask.cpp.o -MF CMakeFiles/Lerc.dir/src/LercLib/BitMask.cpp.o.d -o CMakeFiles/Lerc.dir/src/LercLib/BitMask.cpp.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_lerc/lerc/work/lerc-4.0.0/src/LercLib/BitMask.cpp [ 20%] Building CXX object CMakeFiles/Lerc.dir/src/LercLib/Huffman.cpp.o /usr/bin/clang++ -DLERC_EXPORTS -pipe -Os -DNDEBUG -I/opt/local/include -stdlib=libc++ -arch x86_64 -mmacosx-version-min=10.8 -fPIC -std=gnu++1y -MD -MT CMakeFiles/Lerc.dir/src/LercLib/Huffman.cpp.o -MF CMakeFiles/Lerc.dir/src/LercLib/Huffman.cpp.o.d -o CMakeFiles/Lerc.dir/src/LercLib/Huffman.cpp.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_lerc/lerc/work/lerc-4.0.0/src/LercLib/Huffman.cpp [ 26%] Building CXX object CMakeFiles/Lerc.dir/src/LercLib/Lerc.cpp.o /usr/bin/clang++ -DLERC_EXPORTS -pipe -Os -DNDEBUG -I/opt/local/include -stdlib=libc++ -arch x86_64 -mmacosx-version-min=10.8 -fPIC -std=gnu++1y -MD -MT CMakeFiles/Lerc.dir/src/LercLib/Lerc.cpp.o -MF CMakeFiles/Lerc.dir/src/LercLib/Lerc.cpp.o.d -o CMakeFiles/Lerc.dir/src/LercLib/Lerc.cpp.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_lerc/lerc/work/lerc-4.0.0/src/LercLib/Lerc.cpp [ 33%] Building CXX object CMakeFiles/Lerc.dir/src/LercLib/Lerc1Decode/BitStuffer.cpp.o /usr/bin/clang++ -DLERC_EXPORTS -pipe -Os -DNDEBUG -I/opt/local/include -stdlib=libc++ -arch x86_64 -mmacosx-version-min=10.8 -fPIC -std=gnu++1y -MD -MT CMakeFiles/Lerc.dir/src/LercLib/Lerc1Decode/BitStuffer.cpp.o -MF CMakeFiles/Lerc.dir/src/LercLib/Lerc1Decode/BitStuffer.cpp.o.d -o CMakeFiles/Lerc.dir/src/LercLib/Lerc1Decode/BitStuffer.cpp.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_lerc/lerc/work/lerc-4.0.0/src/LercLib/Lerc1Decode/BitStuffer.cpp /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_lerc/lerc/work/lerc-4.0.0/src/LercLib/Lerc.cpp:1541:64: error: no template named 'greater' in namespace 'std'; did you mean 'isgreater'? std::sort(noDataCandVec.begin(), noDataCandVec.end(), std::greater<double>()); ~~~~~^~~~~~~ isgreater /usr/bin/../lib/c++/v1/cmath:478:1: note: 'isgreater' declared here isgreater(_A1 __x, _A2 __y) _NOEXCEPT ^ /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_lerc/lerc/work/lerc-4.0.0/src/LercLib/Lerc.cpp:1541:59: error: no matching function for call to 'isgreater' std::sort(noDataCandVec.begin(), noDataCandVec.end(), std::greater<double>()); ^~~~~~~~~~~~~~~~~~~~ /usr/bin/../lib/c++/v1/cmath:478:1: note: candidate function template not viable: requires 2 arguments, but 0 were provided isgreater(_A1 __x, _A2 __y) _NOEXCEPT ^ /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_lerc/lerc/work/lerc-4.0.0/src/LercLib/Lerc.cpp:1568:64: error: no template named 'greater' in namespace 'std'; did you mean 'isgreater'? std::sort(noDataCandVec.begin(), noDataCandVec.end(), std::greater<double>()); ~~~~~^~~~~~~ isgreater /usr/bin/../lib/c++/v1/cmath:478:1: note: 'isgreater' declared here isgreater(_A1 __x, _A2 __y) _NOEXCEPT ^ /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_lerc/lerc/work/lerc-4.0.0/src/LercLib/Lerc.cpp:1568:59: error: no matching function for call to 'isgreater' std::sort(noDataCandVec.begin(), noDataCandVec.end(), std::greater<double>()); ^~~~~~~~~~~~~~~~~~~~ /usr/bin/../lib/c++/v1/cmath:478:1: note: candidate function template not viable: requires 2 arguments, but 0 were provided isgreater(_A1 __x, _A2 __y) _NOEXCEPT ^ [ 40%] Building CXX object CMakeFiles/Lerc.dir/src/LercLib/Lerc1Decode/CntZImage.cpp.o /usr/bin/clang++ -DLERC_EXPORTS -pipe -Os -DNDEBUG -I/opt/local/include -stdlib=libc++ -arch x86_64 -mmacosx-version-min=10.8 -fPIC -std=gnu++1y -MD -MT CMakeFiles/Lerc.dir/src/LercLib/Lerc1Decode/CntZImage.cpp.o -MF CMakeFiles/Lerc.dir/src/LercLib/Lerc1Decode/CntZImage.cpp.o.d -o CMakeFiles/Lerc.dir/src/LercLib/Lerc1Decode/CntZImage.cpp.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_lerc/lerc/work/lerc-4.0.0/src/LercLib/Lerc1Decode/CntZImage.cpp 4 errors generated. make[2]: *** [CMakeFiles/Lerc.dir/src/LercLib/Lerc.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_lerc/lerc/work/build' make[1]: *** [CMakeFiles/Lerc.dir/all] Error 2 make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_lerc/lerc/work/build' make: *** [all] Error 2 make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_lerc/lerc/work/build' Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_lerc/lerc/work/build" && /usr/bin/make -j2 -w all VERBOSE=ON Exit code: 2 Error: Failed to build lerc: command execution failed Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_lerc/lerc/main.log for details. Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug. bash-3.2$
Attachments (1)
Change History (11)
Changed 23 months ago by RobK88
comment:1 follow-up: 9 Changed 23 months ago by RobK88
FYI -- Until the port is fixed, the workaround is simple -- specify a newer compiler when installing or upgrading lerc.
bash-3.2$ sudo port clean lerc Password: ---> Cleaning lerc bash-3.2$ sudo port upgrade lerc configure.compiler=macports-clang-7.0 ---> Computing dependencies for lerc ---> Fetching archive for lerc ---> Attempting to fetch lerc-4.0.0_0.darwin_12.x86_64.tbz2 from http://packages.macports.org/lerc ---> Attempting to fetch lerc-4.0.0_0.darwin_12.x86_64.tbz2 from http://ywg.ca.packages.macports.org/mirror/macports/packages/lerc ---> Attempting to fetch lerc-4.0.0_0.darwin_12.x86_64.tbz2 from http://mirror.fcix.net/macports/packages/lerc ---> Fetching distfiles for lerc ---> Verifying checksums for lerc ---> Extracting lerc ---> Configuring lerc ---> Building lerc ---> Staging lerc into destroot ---> Installing lerc @4.0.0_0 ---> Cleaning lerc ---> Deactivating lerc @3.0_0 ---> Cleaning lerc ---> Activating lerc @4.0.0_0 ---> Cleaning lerc ---> Scanning binaries for linking errors ---> No broken files found. ---> No broken ports found. bash-3.2$
comment:2 Changed 23 months ago by jmroot (Joshua Root)
Cc: | dgilman reneeotten added; vince@… removed |
---|---|
Keywords: | mountain-lion removed |
Owner: | set to Veence |
Status: | new → assigned |
Fails to build on everything < 10.14, in fact. std::greater
is very old so the compiler is unlikely to be the problem. A missing #include <functional>
perhaps?
comment:3 Changed 23 months ago by jmroot (Joshua Root)
comment:4 Changed 23 months ago by RobK88
@jmroot - Joshua, Thanks for the fix by adding the missing #include
statements.
I am curious. Why do you think, the code compiled without these #include
statements using a newer compiler such as clang-7.0?
comment:5 Changed 23 months ago by jmroot (Joshua Root)
Standard library headers can include other headers internally, so it's possible to get a header included without explicitly asking for it. But you can't rely on this happening since it's an implementation detail that can easily change between stdlib implementations and different versions of the same stdlib.
comment:6 Changed 23 months ago by RobK88
Thanks for the info. I learnt something new today. I always thought stdlib was governed by a standard and was not implementation dependent. Now I know better.
comment:7 Changed 23 months ago by jmroot (Joshua Root)
It is governed by a standard, but the standard doesn't specify every implementation detail. The standard requires that if you #include <functional>
then std::greater
is defined. It doesn't require it to be undefined otherwise. In fact if it required that no header pull in definitions from any other header, that would be pretty much impossible to comply with.
comment:8 Changed 23 months ago by chillin-
Cc: | chillin- added |
---|
comment:9 Changed 23 months ago by chillin-
Replying to RobK88:
FYI -- Until the port is fixed, the workaround is simple -- specify a newer compiler when installing or upgrading lerc.
$ sudo port -vsN upgrade lerc configure.compiler=macports-clang-7.0 ---> Computing dependencies for cmake-bootstrap.... ---> Dependencies to be installed: clang-7.0 cmake-bootstrap llvm-7.0 Error: The following dependencies were not installed because all of them have unmet dependencies (likely due to a dependency cycle): clang-7.0 cmake-bootstrap llvm-7.0 Error: Problem while installing cmake-bootstrap Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
That's ok. I'll just wait.
comment:10 Changed 23 months ago by dgilman (David Gilman)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
main.log