Boost logo

Boost Testing :

Subject: Re: [Boost-testing] [filesystem][v3] Compilation failure
From: Belcourt, K. Noel (kbelco_at_[hidden])
Date: 2011-10-26 17:05:14


Hi Beman,

On Oct 26, 2011, at 6:25 AM, Beman Dawes wrote:

> On Tue, Oct 25, 2011 at 3:08 PM, Belcourt, Kenneth
> <kbelco_at_[hidden]> wrote:
>> 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:
>
> # ifdef BOOST_POSIX_API
> // 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.

These macros both seem to be defined on this system:

sass8000(110 ^H)% find . -type f -exec grep -i AT_FDCWD {} \;
#define AT_FDCWD 0xffd19553

sass8000(111 ^H)% find . -type f -exec grep -i AT_SYMLINK_NOFOLLOW {} \;
#define AT_SYMLINK_NOFOLLOW 0x1000

but sadly fchmodat itself is missing.

> The Sun docs show fchmodat() as being supported. See
> http://download.oracle.com/docs/cd/E19963-01/html/821-1463/
> chmod-2.html
>
> So there most be something weird about <sys/stat.h>.

Our compiler and OS is quite a bit older than the documentation you
reference.

sass8000(109 ^H)% uname -a
SunOS sass8000 5.10 Generic_137137-09 sun4u sparc SUNW,Sun-Fire

> 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?

Not exactly sure how to fix. I'd just disable it for Sun systems like
ours, or older.

#if __SUNPRO_CC <= 0x5100

-- Noel


Boost-testing list run by mbergal at meta-comm.com