#68438 closed defect (fixed)
draco @1.5.6: error: no member named 'utimensat' in the global namespace
Reported by: | nilason (Nicklas Larsson) | Owned by: | nilason (Nicklas Larsson) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.1 |
Keywords: | snowleopard lion mountainlion mavericks yosemite elcapitan sierra | Cc: | essandess (Steve Smith) |
Port: | draco |
Description
The new port draco
fail on build with following error:
[ 24%] Building CXX object CMakeFiles/draco_io.dir/src/draco/io/file_writer_utils.cc.o /opt/local/bin/clang++-mp-16 -DDRACO_CMAKE=1 -DDRACO_FLAGS_SRCDIR=\"/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_archivers_draco/draco/work/draco-1.5.6\" -DDRACO_FLAGS_TMPDIR=\"/tmp\" -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_archivers_draco/draco/work/draco-1.5.6 -I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_archivers_draco/draco/work/draco-1.5.6/src -I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_archivers_draco/draco/work/build -I/opt/local/include/eigen3 -I/opt/local/include/ghc -I/opt/local/include -pipe -Os -DNDEBUG -I/opt/local/include -stdlib=libc++ -arch x86_64 -mmacosx-version-min=10.7 -fPIC -Wno-implicit-const-int-float-conversion -std=gnu++14 -MD -MT CMakeFiles/draco_io.dir/src/draco/io/file_writer_utils.cc.o -MF CMakeFiles/draco_io.dir/src/draco/io/file_writer_utils.cc.o.d -o CMakeFiles/draco_io.dir/src/draco/io/file_writer_utils.cc.o -c /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_archivers_draco/draco/work/draco-1.5.6/src/draco/io/file_writer_utils.cc ... In file included from /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_archivers_draco/draco/work/draco-1.5.6/src/draco/io/file_writer_utils.cc:11: /opt/local/include/ghc/filesystem.hpp:4681:11: error: no member named 'utimensat' in the global namespace if (::utimensat((int)AT_FDCWD, p.c_str(), times, AT_SYMLINK_NOFOLLOW) != 0) { ~~^ /opt/local/include/ghc/filesystem.hpp:4681:26: error: use of undeclared identifier 'AT_FDCWD' if (::utimensat((int)AT_FDCWD, p.c_str(), times, AT_SYMLINK_NOFOLLOW) != 0) { ^ /opt/local/include/ghc/filesystem.hpp:4681:54: error: use of undeclared identifier 'AT_SYMLINK_NOFOLLOW' if (::utimensat((int)AT_FDCWD, p.c_str(), times, AT_SYMLINK_NOFOLLOW) != 0) { ^ ... 3 errors generated. make[2]: *** [CMakeFiles/draco_io.dir/src/draco/io/file_writer_utils.cc.o] Error 1
Any pointers on how to deal with that would be greatly appreciated.
Change History (8)
comment:1 follow-ups: 3 8 Changed 13 months ago by jmroot (Joshua Root)
Cc: | essandess added |
---|
comment:2 Changed 13 months ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | snowleopard lion mountainlion mavericks yosemite elcapitan sierra added |
---|---|
Summary: | draco @ 1.5.6: build fails on 10.6–10.12 → draco @1.5.6: error: no member named 'utimensat' in the global namespace |
Version: | → 2.8.1 |
comment:3 follow-up: 5 Changed 7 months ago by ryandesign (Ryan Carsten Schmidt)
Replying to jmroot:
It appears that ghc uses
utimensat
in its public headers, which means those headers can't be used without that function being available. As you've discovered, it's only available on macOS 10.13 and later. There is an implementation in legacysupport, but that means that all ghc dependents (or at least all those that include this particular header) are obliged to use legacysupport, which is unfortunate.
It's the ghc-filesystem port, not the ghc port, so that's a much smaller set of affected ports. I'll add legacysupport.
comment:4 Changed 7 months ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:5 Changed 7 months ago by ryandesign (Ryan Carsten Schmidt)
Replying to ryandesign:
It's the ghc-filesystem port, not the ghc port, so that's a much smaller set of affected ports.
And notably the "ghc" in ghc-filesystem stands for "gulraks helper classes" and has nothing to do with the Glasgow Haskell Compiler.
It appears that ghc uses
utimensat
in its public headers, which means those headers can't be used without that function being available. As you've discovered, it's only available on macOS 10.13 and later. There is an implementation in legacysupport, but that means that all ghc dependents (or at least all those that include this particular header) are obliged to use legacysupport, which is unfortunate.