sharp: Cannot build for FreeBSD 11, _LIBCPP_TRIVIAL_PAIR_COPY_CTOR is no longer supported
I’ve attempted to install sharp on FreeBSD 11. Build using node-gyp is producing the following error:
gmake: Entering directory '/home/randy/Develop/tkg/node_modules/sharp/build'
TOUCH Release/obj.target/libvips-cpp.stamp
CXX(target) Release/obj.target/sharp/src/common.o
../src/common.cc: In function 'std::tuple<vips::VImage, sharp::ImageType> sharp::OpenInput(sharp::InputDescriptor*, VipsAccess)':
../src/common.cc:225:38: error: 'to_string' is not a member of 'std'
option->set("density", std::to_string(descriptor->density).data());
^
../src/common.cc:262:38: error: 'to_string' is not a member of 'std'
option->set("density", std::to_string(descriptor->density).data());
^
gmake: *** [sharp.target.mk:151: Release/obj.target/sharp/src/common.o] Error 1
gmake: Leaving directory '/home/randy/Develop/tkg/node_modules/sharp/build'
gyp ERR! build error
gyp ERR! stack Error: `gmake` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at emitTwo (events.js:125:13)
gyp ERR! stack at ChildProcess.emit (events.js:213:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:197:12)
gyp ERR! System FreeBSD 11.1-BETA3
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
I’ve tried compiling with clang39, clang40, gcc48 and gcc5. The error above is the output from the gcc compiles.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 16 (6 by maintainers)
Commits related to this issue
- Docs: FreeBSD gcc v4/v5 needs _GLIBCXX_USE_C99 for C++11 #873 — committed to lovell/sharp by lovell 7 years ago
I’ve documented the gcc v4/v5 workaround in 6b34e8a. Let’s leave this open for a while in case others run into the same problem with the upstream
www/nodeports. Thanks for reporting this and providing help to debug/understand the problem.