Opened 7 months ago

Closed 12 days ago

Last modified 12 days ago

#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 Changed 7 months ago by jmroot (Joshua Root)

Cc: essandess added

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.

Last edited 7 months ago by jmroot (Joshua Root) (previous) (diff)

comment:2 Changed 7 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.12draco @1.5.6: error: no member named 'utimensat' in the global namespace
Version: 2.8.1

comment:3 in reply to:  1 ; Changed 12 days 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 12 days ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

In 844ca642120550004deee6f3b2fbbd76e7be4a6c/macports-ports (master):

draco: Add legacysupport for utimensat

Closes: #68438

comment:5 in reply to:  3 Changed 12 days 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.

comment:6 Changed 12 days ago by ryandesign (Ryan Carsten Schmidt)

In 18890426714feb993b2d0f906277fa1d723a4cea/macports-ports (master):

input-leap: Add legacysupport for utimensat

See: #68438

comment:7 Changed 12 days ago by ryandesign (Ryan Carsten Schmidt)

In 93fa1692c09831d6534376dad8deecc95b5ca4e6/macports-ports (master):

barrier: Add legacysupport for utimensat

See: #68438

comment:8 in reply to:  1 Changed 12 days ago by ryandesign (Ryan Carsten Schmidt)

Replying to jmroot:

It appears that [ghc-filesystem] uses utimensat in its public headers

This was fixed in ghc-filesystem nine months ago and should be in the next release, at which time we can revert the legacysupport inclusion in all these ports. See #69740.

Note: See TracTickets for help on using tickets.