Opened 2 years ago

Last modified 3 months ago

#65247 assigned defect

OpenVPN3 build fails on older OS versions: require_free.hpp:59:14: error: expected expression

Reported by: iAmInActions (iAmInAction) Owned by: mascguy (Christopher Nielsen)
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: Cc: Lord-Kamina (Gregorio Litenstein), i0ntempest
Port: openvpn3 asio

Description

I have been trying to compile OpenVPN3 on my PowerBook G4 that is running leopard. The build gets to 28% and then just fails throwing the generic "command execution failed" error. Looking into the logs it says that the file net/if_utun.h is missing. Running whereis and locate on that file name returns 0 results meaning it actually is missing and not just causing a false alarm like with SDL2.

Any ideas where I could get this file?

Attachments (1)

main.log (795.9 KB) - added by iAmInActions (iAmInAction) 2 years ago.
The build log provided by the MacPorts application

Download all attachments as: .zip

Change History (12)

Changed 2 years ago by iAmInActions (iAmInAction)

Attachment: main.log added

The build log provided by the MacPorts application

comment:1 Changed 2 years ago by iAmInActions (iAmInAction)

I have found the folder containing the missing file in the darwin sources and I'm going to place it in MacPorts include directory and try compiling again. I don't think that it will work as it seems to be a different version than the port wants but if it works it should be an easy fix.

comment:2 Changed 2 years ago by iAmInActions (iAmInAction)

Update: using the gcc10 port that has been made for leopard and by placing this folder (https://github.com/apple/darwin-xnu/tree/main/bsd/net) into /opt/local/include i have managed to successfully build openvpn3. This issue is therefore not related to the openvpn3 port directly but rather to the dependencies (or shall I say lack there of). Once the gcc10 leopard port goes out of beta it would be probably a good idea to add it as well as the darwin sources as dependencies for leopard.

comment:3 Changed 2 years ago by jmroot (Joshua Root)

Owner: set to i0ntempest
Status: newassigned

comment:4 Changed 2 years ago by jmroot (Joshua Root)

Cc: Lord-Kamina added
Keywords: powerpc leopard removed
Port: asio added
Summary: OpenVPN3 build fails under leopardOpenVPN3 build fails on older OS versions

Seems to be an incompatibility with the require macro on 10.12 and older.

In file included from /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_net_openvpn3/openvpn3/work/openvpn3-3.7/test/ovpncli/cli.cpp:63:
In file included from /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_net_openvpn3/openvpn3/work/openvpn3-3.7/cmake/../client/ovpncli.cpp:30:
In file included from /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_net_openvpn3/openvpn3/work/openvpn3-3.7/cmake/../openvpn/io/io.hpp:28:
In file included from /opt/local/include/asio.hpp:19:
In file included from /opt/local/include/asio/associated_executor.hpp:24:
In file included from /opt/local/include/asio/system_executor.hpp:20:
In file included from /opt/local/include/asio/execution.hpp:19:
In file included from /opt/local/include/asio/execution/any_executor.hpp:31:
In file included from /opt/local/include/asio/execution/blocking.hpp:25:
In file included from /opt/local/include/asio/prefer.hpp:23:
/opt/local/include/asio/traits/require_free.hpp:59:14: error: expected expression
    decltype(require(declval<T>(), declval<Property>()))
             ^
/usr/include/AssertMacros.h:1307:47: note: expanded from macro 'require'
                #define require(assertion, exceptionLabel)  __Require(assertion, exceptionLabel)
                                                            ^
/usr/include/AssertMacros.h:669:5: note: expanded from macro '__Require'
                  do                                                                      \
                  ^

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

comment:5 Changed 2 years ago by i0ntempest

I've opened an issue https://github.com/OpenVPN/openvpn3/issues/185 about another build error on old macOS in openvpn3 repo, and upstream is unwilling to support macOS versions that are this old. This one is probably similar.

comment:6 Changed 2 years ago by jmroot (Joshua Root)

The comments in AssertMacros.h actually discuss exactly this kind of problem, and there is a mechanism to avoid it: simply define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES to 0 before the header is included. It's not immediately clear where it's being pulled in, however—could be in openvpn3, or asio, or somewhere else?

comment:7 Changed 14 months ago by mascguy (Christopher Nielsen)

Cc: mascguy added

comment:8 in reply to:  6 Changed 14 months ago by mascguy (Christopher Nielsen)

Cc: i0ntempest added; mascguy removed
Owner: changed from i0ntempest to mascguy

Replying to jmroot:

The comments in AssertMacros.h actually discuss exactly this kind of problem, and there is a mechanism to avoid it: simply define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES to 0 before the header is included. It's not immediately clear where it's being pulled in, however—could be in openvpn3, or asio, or somewhere else?

Great point, I'll add this to my to-fix list.

comment:9 Changed 10 months ago by i0ntempest

Summary: OpenVPN3 build fails on older OS versionsOpenVPN3 build fails on older OS versions: require_free.hpp:59:14: error: expected expression

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

Oops, has duplicate #68833.

comment:11 Changed 3 months ago by barracuda156

Related (not a duplicate): #70231

Note: See TracTickets for help on using tickets.