Opened 2 years ago
Last modified 5 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)
Change History (12)
Changed 2 years ago by iAmInActions (iAmInAction)
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: | new → assigned |
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 leopard → OpenVPN3 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 \ ^
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 follow-up: 8 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 16 months ago by mascguy (Christopher Nielsen)
Cc: | mascguy added |
---|
comment:8 Changed 16 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 11 months ago by i0ntempest
Summary: | OpenVPN3 build fails on older OS versions → OpenVPN3 build fails on older OS versions: require_free.hpp:59:14: error: expected expression |
---|
The build log provided by the MacPorts application