Boost logo

Boost Testing :

Subject: Re: [Boost-testing] [filesystem][v3] Compilation failure
From: Beman Dawes (bdawes_at_[hidden])
Date: 2011-10-26 08:25:37

On Tue, Oct 25, 2011 at 3:08 PM, Belcourt, Kenneth <kbelco_at_[hidden]> wrote:
> Hi,
> A recent change seems to have broken the Sandia Sun tester.  This tester has been stable for some time where we build process_jam_log with the gcc-3.4.6 compiler.  I'm not sure what happened but here's the diagnostic.
> gcc.compile.c++ /scratch2/kbelco/boost/boost/bin.v2/libs/filesystem/build/gcc-3.4.6/release/link-static/v3/src/operations.o
> "/usr/local/bin/g++"  -ftemplate-depth-128 -mcpu=v9 -O3 -finline-functions -Wno-inline -Wall  -DBOOST_ALL_NO_LIB=1 -DBOOST_SYSTEM_STATIC_LINK=1 -DNDEBUG  -I"/scratch2/kbelco/boost/boost" -c -o "/scratch2/kbelco/boost/boost/bin.v2/libs/filesystem/build/gcc-3.4.6/release/link-static/v3/src/operations.o" "/scratch2/kbelco/boost/boost/libs/filesystem/v3/src/operations.cpp"
> /scratch2/kbelco/boost/boost/libs/filesystem/v3/src/operations.cpp: In function `void boost::filesystem3::detail::permissions(const boost::filesystem3::path&, boost::filesystem3::perms, boost::system::error_code*)':
> /scratch2/kbelco/boost/boost/libs/filesystem/v3/src/operations.cpp:1397: error: `::fchmodat' has not been declared
> ...failed gcc.compile.c++ /scratch2/kbelco/boost/boost/bin.v2/libs/filesystem/build/gcc-3.4.6/release/link-static/v3/src/operations.o...

Here is the code involved:

    // Mac OS X Lion and some other platforms don't support fchmodat()
# if defined(AT_FDCWD) && defined(AT_SYMLINK_NOFOLLOW)
      if (::fchmodat(AT_FDCWD, p.c_str(), mode_cast(prms),
           !(prms & symlink_perms) ? 0 : AT_SYMLINK_NOFOLLOW))
# else // fallback if fchmodat() not supported
      if (::chmod(p.c_str(), mode_cast(prms)))
# endif
# else...

In other words, if the macros that are specific to fchmodat() are
defined, then the assumption is that fchmodat() is supported.

The Sun docs show fchmodat() as being supported. See

So there most be something weird about <sys/stat.h>.

It is easy enough to disable support for fchmodat(), but I'd prefer
not to disable it for all Sun users if we can figure out the specifics
of the configuration that is failing. Any ideas?


Boost-testing list run by mbergal at