OpenVPN/openvpn3-linux
9
20
Fork
You've already forked openvpn3-linux
9

Broken build because of deprecated include of <ciso646> #55

Closed
opened 2025年05月22日 08:10:18 +02:00 by cspiel1 · 7 comments

The issue #53 is not fully fixed. It mentions also the deprecated include of . And this still breaks the build with gcc 15.

I use: g++ (GCC) 15.1.1 20250425

The I tried to build without the unit tests like mentioned.

meson setup -Dunit_tests=disabled -Dtest_programs=disabled -Dselinux=disabled -Dselinux_policy=disabled build
...
 User defined options
 selinux : disabled
 selinux_policy: disabled
 test_programs : disabled
 unit_tests : disabled
$ meson compile -C build
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: /usr/bin/ninja -C /home/cspiel/src/openvpn3-linux/build
ninja: Entering directory `/home/cspiel/src/openvpn3-linux/build'
[9/110] Compiling C++ object libnetcfgmgr.a.p/src_netcfg_proxy-netcfg-device.cpp.o
FAILED: libnetcfgmgr.a.p/src_netcfg_proxy-netcfg-device.cpp.o 
c++ -Ilibnetcfgmgr.a.p -I. -I.. -I../openvpn3-core -I../vendor/asio/asio/include -Isrc -I../src -I/usr/include/gio-unix-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-6 -I/usr/include/libnl3 -I/usr/include/uuid -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Werror -std=c++17 -O0 -g -Wno-non-virtual-dtor -DOVPN_TINYXML2_HAS_ERROR_NAME -DOVPN_TINYXML2_HAS_ERROR_STR -fPIC -DPROTOBUF_USE_DLLS -DNOMINMAX -pthread -MD -MQ libnetcfgmgr.a.p/src_netcfg_proxy-netcfg-device.cpp.o -MF libnetcfgmgr.a.p/src_netcfg_proxy-netcfg-device.cpp.o.d -o libnetcfgmgr.a.p/src_netcfg_proxy-netcfg-device.cpp.o -c ../src/netcfg/proxy-netcfg-device.cpp
In file included from /usr/include/absl/hash/internal/hash.h:33,
 from /usr/include/absl/hash/hash.h:89,
 from /usr/include/absl/container/internal/hash_function_defaults.h:56,
 from /usr/include/absl/container/hash_container_defaults.h:19,
 from /usr/include/absl/container/flat_hash_map.h:43,
 from /usr/include/google/protobuf/descriptor.h:47,
 from /usr/include/google/protobuf/generated_message_reflection.h:26,
 from src/dco/dco-keyconfig.pb.h:26,
 from ../src/netcfg/proxy-netcfg-device.cpp:37:
/usr/include/c++/15.1.1/ciso646:46:4: error: #warning "<ciso646> is deprecated in C++17, use <version> to detect implementation-specific macros" [-Werror=cpp]
 46 | # warning "<ciso646> is deprecated in C++17, use <version> to detect implementation-specific macros"
 | ^~~~~~~
cc1plus: all warnings being treated as errors
[16/110] Compiling C++ object src/ovpn3cli/libcommandscollection.a.p/commands_session_session-start.cpp.o
ninja: build stopped: subcommand failed.
The issue https://codeberg.org/OpenVPN/openvpn3-linux/issues/53 is not fully fixed. It mentions also the deprecated include of <ciso646>. And this still breaks the build with gcc 15. I use: `g++ (GCC) 15.1.1 20250425` The I tried to build without the unit tests like mentioned. ``` meson setup -Dunit_tests=disabled -Dtest_programs=disabled -Dselinux=disabled -Dselinux_policy=disabled build ... User defined options selinux : disabled selinux_policy: disabled test_programs : disabled unit_tests : disabled ``` ``` $ meson compile -C build INFO: autodetecting backend as ninja INFO: calculating backend command to run: /usr/bin/ninja -C /home/cspiel/src/openvpn3-linux/build ninja: Entering directory `/home/cspiel/src/openvpn3-linux/build' [9/110] Compiling C++ object libnetcfgmgr.a.p/src_netcfg_proxy-netcfg-device.cpp.o FAILED: libnetcfgmgr.a.p/src_netcfg_proxy-netcfg-device.cpp.o c++ -Ilibnetcfgmgr.a.p -I. -I.. -I../openvpn3-core -I../vendor/asio/asio/include -Isrc -I../src -I/usr/include/gio-unix-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-6 -I/usr/include/libnl3 -I/usr/include/uuid -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Werror -std=c++17 -O0 -g -Wno-non-virtual-dtor -DOVPN_TINYXML2_HAS_ERROR_NAME -DOVPN_TINYXML2_HAS_ERROR_STR -fPIC -DPROTOBUF_USE_DLLS -DNOMINMAX -pthread -MD -MQ libnetcfgmgr.a.p/src_netcfg_proxy-netcfg-device.cpp.o -MF libnetcfgmgr.a.p/src_netcfg_proxy-netcfg-device.cpp.o.d -o libnetcfgmgr.a.p/src_netcfg_proxy-netcfg-device.cpp.o -c ../src/netcfg/proxy-netcfg-device.cpp In file included from /usr/include/absl/hash/internal/hash.h:33, from /usr/include/absl/hash/hash.h:89, from /usr/include/absl/container/internal/hash_function_defaults.h:56, from /usr/include/absl/container/hash_container_defaults.h:19, from /usr/include/absl/container/flat_hash_map.h:43, from /usr/include/google/protobuf/descriptor.h:47, from /usr/include/google/protobuf/generated_message_reflection.h:26, from src/dco/dco-keyconfig.pb.h:26, from ../src/netcfg/proxy-netcfg-device.cpp:37: /usr/include/c++/15.1.1/ciso646:46:4: error: #warning "<ciso646> is deprecated in C++17, use <version> to detect implementation-specific macros" [-Werror=cpp] 46 | # warning "<ciso646> is deprecated in C++17, use <version> to detect implementation-specific macros" | ^~~~~~~ cc1plus: all warnings being treated as errors [16/110] Compiling C++ object src/ovpn3cli/libcommandscollection.a.p/commands_session_session-start.cpp.o ninja: build stopped: subcommand failed. ```
Author
Copy link

Just realized that the issue is caused by googletest like already mentioned here: #53 (comment)

Still open: https://github.com/google/googletest/issues/4701

I'll close this.

Just realized that the issue is caused by googletest like already mentioned here: https://codeberg.org/OpenVPN/openvpn3-linux/issues/53#issuecomment-4147547 Still open: https://github.com/google/googletest/issues/4701 I'll close this.
Owner
Copy link

@cspiel1 Just curious, which distro are you doing this?

We're doing Fedora 42 builds with GCC-15 and currently disabling unit-tests. But you have a breakage compiling src/netcfg/proxy-netcfg-device.cpp ... and non of the main source code for openvpn3-linux should have ciso646 in the include chain, except via googletest.

Can you try do enter the build directory and do a clean build?

 $ cd build && ninja clean && ninja
@cspiel1 Just curious, which distro are you doing this? We're doing Fedora 42 builds with GCC-15 and currently disabling unit-tests. But you have a breakage compiling `src/netcfg/proxy-netcfg-device.cpp` ... and non of the main source code for openvpn3-linux should have `ciso646` in the include chain, except via googletest. Can you try do enter the build directory and do a clean build? $ cd build && ninja clean && ninja
Author
Copy link

I have ArchLinux and use the yay package management tool.

In the meanwhile I think that the cause of the issue is in abseil-cpp. And I found maybe the correct solution and opened a PR: https://github.com/abseil/abseil-cpp/pull/1891

I tried ninja clean && ninja and got the same warning.

Should we keep this issue closed?

I have ArchLinux and use the `yay` package management tool. In the meanwhile I think that the cause of the issue is in `abseil-cpp`. And I found maybe the correct solution and opened a PR: https://github.com/abseil/abseil-cpp/pull/1891 I tried `ninja clean && ninja` and got the same warning. Should we keep this issue closed?
Author
Copy link

Another solution could be to ignore the warnings for the build. Thus to remove the -Werror. I could not found where it is set, because I am not very familiar with meson.

Another solution could be to ignore the warnings for the build. Thus to remove the `-Werror`. I could not found where it is set, because I am not very familiar with meson.
Owner
Copy link

Thus to remove the -Werror. I could not found where it is set, because I am not very familiar with meson.

Just run meson configure -Dwerror=false inside your build directory or add -Dwerror=false when running the meson setup command.

I'll have a look at the apseil-cpp. This feels like it's being out-of-scope for OpenVPN 3 Linux, as it's not this project including the deprecated header.

> Thus to remove the -Werror. I could not found where it is set, because I am not very familiar with meson. Just run `meson configure -Dwerror=false` inside your build directory or add `-Dwerror=false` when running the `meson setup` command. I'll have a look at the apseil-cpp. This feels like it's being out-of-scope for OpenVPN 3 Linux, as it's not this project including the deprecated header.
Author
Copy link

The issue was caused by abseil-cpp and is already fixed with: github.com/abseil/abseil-cpp@5f3435aba0

It is still an issue of arch linux. I'll try to report it to them or open a PR.

The issue was caused by abseil-cpp and is already fixed with: https://github.com/abseil/abseil-cpp/commit/5f3435aba00bcd7f12062d2e8e1839b4eaf1a575 It is still an issue of arch linux. I'll try to report it to them or open a PR.
Owner
Copy link

I've pushed out a new commit (0f80828d73) which should resolve the unit test build failures.

I've also discussed this abseil-cpp issue with a colleague also running Arch. He does the -Dwerror=false apprach for now too.

This issue is not something which should be fixed (or, in practice, worked around) in OpenVPN 3 Linux. We are currently requiring the C++17 standard, while the abseil-cpp seems to require C++20 to be enabled. The OpenVPN 3 Core library version used (latest stable, v3.11.1) is also not C++20 compliant (it will be in v3.12). There are also still a few issues left in the OpenVPN 3 Linux addon-aws which needs to be fixed.

Getting C++20 compliant is not within the v25 scope (the next major release). The v26 release will most likely move to C++20.

So for now, until either abseil-cpp is fixed to be C++17 compliant or the v26 is released (no ETA) .... this needs to be worked around using -Dwerror=false.

I've pushed out a new commit (0f80828d73856be223cdc9878f7c096ffe58759f) which should resolve the unit test build failures. I've also discussed this abseil-cpp issue with a colleague also running Arch. He does the `-Dwerror=false` apprach for now too. This issue is not something which should be fixed (or, in practice, worked around) in OpenVPN 3 Linux. We are currently requiring the C++17 standard, while the abseil-cpp seems to require C++20 to be enabled. The OpenVPN 3 Core library version used (latest stable, v3.11.1) is also not C++20 compliant (it will be in v3.12). There are also still a few issues left in the OpenVPN 3 Linux `addon-aws` which needs to be fixed. Getting C++20 compliant is not within the `v25` scope (the next major release). The `v26` release will most likely move to C++20. So for now, until either abseil-cpp is fixed to be C++17 compliant or the `v26` is released (no ETA) .... this needs to be worked around using `-Dwerror=false`.
Sign in to join this conversation.
No Branch/Tag specified
master
releaseprep/v27.1
dev/core-update-wip
dev/cb89-inactive-fix
releaseprep/v26
dev/gh-issue-14-asio-include-dir
v27.1
v27.1_rc1
v27
v26
v25
v24.1
v24
v23
v22_dev
v21
v20
v19_beta
v19_betaRC1
v18_beta
v18_betaRC3
v18_betaRC2
v18_betaRC
v17_betaUb2204
v17_beta
v16_beta
v15_beta
v14_beta
v13_beta
v12_beta
v11_beta
v10_beta
v9_beta
v8_beta
v7_beta
v6_beta
v5_beta
v4_beta
v3_beta
v2_beta
v1_beta
Labels
Clear labels
Access Server
Issue related to connecting/integration with OpenVPN Access Server
addon-aws
openvpn3-service-aws / net.openvpn.v3.aws, AWS-VPC integration add-on
addon-devposture
openvpn3-service-devposture / net.openvpn.v3.devposture, Device Posture Check (DPC) service
Awaiting external feedback
Feedback from an external party is needed to continue investigation
build
Issue is related to the build system (meson) or general compilation issues
cli-openvpn2
OpenVPN 2 compat wrapper utility
cli-openvpn3
openvpn3 command line
cli-openvpn3-admin
openvpn3-admin command line
cli-openvpn3-as
OpenVPN Access Server profile download utility
Cloud Connexa
Issue related to connecting to the Cloud Connexa service
common
Shared code across modules
Development done
A fix has been applied to git master
distro-support
OS distribution support
duplicate
This is a duplicate issue of another issue ticket.
Enhancement
Proposal for an enhancement
GitHub
Issue transfered from GitHub
Infrastructure
Issue related to the infrastructure for builds, package repositories, etc
Investigating
The issue is being investigated by a project developer
OpenVPN 3 Core
Issue needs to be resolved in the OpenVPN 3 Core Library
openvpn3-systemd
systemd integration (openvpn3-session@.service, helper tools)
python
The openvpn3 Python module
service-backendstart
openvpn3-service-backendstart / net.openvpn.v3.backends, VPN client service starter
service-client
openvpn3-service-client / net.openvpn.v3.backends.be$PID, Backend VPN client service
service-configmgr
openvpn3-service-configmgr / net.openvpn.v3.configuration, Configuration Profile Manager
service-log
openvpn3-service-log / net.openvpn.v3.log, Log collector service
service-netcfg
openvpn3-service-netcfg / net.openvpn.v3.netcfg, Network Configuration Manager
service-sessionmgr
openvpn3-service-sessionmgr / net.openvpn.v3.sessions, VPN sessions manager
Support
Issue is a support question, not a bug
tests programs
Issue is related to code in src/tests
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
OpenVPN/openvpn3-linux#55
Reference in a new issue
OpenVPN/openvpn3-linux
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?