Opened 4 months ago

Last modified 3 months ago

#69236 assigned defect

cryfs @0.11.4: error: expected unqualified-id

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: jolan78
Priority: Normal Milestone:
Component: ports Version: 2.9.0
Keywords: Cc:
Port: cryfs

Description

cryfs fails to build on this system due to some weird interaction between boost and a system header?

https://build.macports.org/builders/ports-10.7_x86_64-builder/builds/176334/steps/install-port/logs/stdio

In file included from /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_net_cryfs/cryfs/work/cryfs-0.11.4/src/cpp-utils/process/subprocess.cpp:6:
In file included from /opt/local/libexec/boost/1.76/include/boost/process.hpp:23:
In file included from /opt/local/libexec/boost/1.76/include/boost/process/async.hpp:43:
In file included from /opt/local/libexec/boost/1.76/include/boost/process/detail/posix/async_in.hpp:19:
In file included from /opt/local/libexec/boost/1.76/include/boost/process/detail/used_handles.hpp:14:
/opt/local/libexec/boost/1.76/include/boost/process/detail/posix/handles.hpp:34:20: error: expected unqualified-id
    auto my_fd = ::dirfd(dir.get());
                   ^
/usr/include/dirent.h:88:21: note: expanded from macro 'dirfd'
#define dirfd(dirp)     ((dirp)->__dd_fd)
                        ^
In file included from /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_net_cryfs/cryfs/work/cryfs-0.11.4/src/cpp-utils/process/subprocess.cpp:6:
In file included from /opt/local/libexec/boost/1.76/include/boost/process.hpp:23:
In file included from /opt/local/libexec/boost/1.76/include/boost/process/async.hpp:43:
In file included from /opt/local/libexec/boost/1.76/include/boost/process/detail/posix/async_in.hpp:19:
In file included from /opt/local/libexec/boost/1.76/include/boost/process/detail/used_handles.hpp:14:
/opt/local/libexec/boost/1.76/include/boost/process/detail/posix/handles.hpp:118:24: error: expected unqualified-id
        auto my_fd = ::dirfd(dir);
                       ^
/usr/include/dirent.h:88:21: note: expanded from macro 'dirfd'
#define dirfd(dirp)     ((dirp)->__dd_fd)
                        ^

Is there a reason why cryfs needs to use boost 1.76, which is old? The latest version in MacPorts is 1.81 which is also old but is at least newer than 1.76 and maybe it already contains a fix for this problem.

Change History (3)

comment:1 Changed 4 months ago by ryandesign (Ryan Carsten Schmidt)

Port: cryfs added; port removed
Version: 2.9.0

comment:2 Changed 4 months ago by jolan78

No reason other than I was under the impression boost portgroup was selecting the best version for the system it was built on.

I tried the versions of boost >1.76 but none of them works with cryfs. cryfs references 1.79.0 in the cmake file I use so at least 1.78 should work.

I may dig into this later, but as I don't have access to a 10.7 system, I would have not guarantee it would fix this issue.

comment:3 in reply to:  2 Changed 3 months ago by ryandesign (Ryan Carsten Schmidt)

Replying to jolan78:

No reason other than I was under the impression boost portgroup was selecting the best version for the system it was built on.

It picks a version that was probably current at the time the portgroup was created. It cannot be changed in the portgroup without breaking all ports that do not specify a boost version. Therefore, all ports that use the portgroup should specify a boost version. Probably somebody should go through all ports that do not specify a boost version and specify the one currently in the portgroup, then change the portgroup so that it no longer specifies a default, forcing all new ports to specify the desired version.

New boost versions routinely change or remove functionality, making them not backward-compatible. That's why we have several boost versions in MacPorts. It's not about which boost version is best for the current system; it's about what boost version this particular port's software was written to require.

I tried the versions of boost >1.76 but none of them works with cryfs.

Ok, not working with later versions is a valid reason for sticking with an old one. But it looks like this project is actively maintained, so if they don't work with newer boost versions, they may be open to a bug report about that.

cryfs references 1.79.0 in the cmake file I use so at least 1.78 should work.

It looks like the commit that changes their boost version from 1.75 to 1.79 will be included in cryfs 0.12.0, in other words not yet.

Like all boost versions, boost 1.78 and 1.79 are different. A program working with one of them is no guarantee that it will work with the other one.

Some boost versions have already been deleted from MacPorts in a possibly premature effort to clean up and streamline. We don't have boost 1.79 or 1.80 in MacPorts anymore but we do have 1.78 and 1.81. Hopefully cryfs 0.12.0 works with one of those. If not, we could resurrect the port for boost 1.79.

I may dig into this later, but as I don't have access to a 10.7 system, I would have not guarantee it would fix this issue.

If you can update to a later version of boost when cryfs 0.12.0 is released, then we can re-check the buildbot logs and see if that has fixed the failure on Mac OS X 10.7.

Note: See TracTickets for help on using tickets.