Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BSDEthernetTap build failure on OpenBSD #2397

Closed
juanpeha opened this issue Oct 28, 2024 · 2 comments
Closed

BSDEthernetTap build failure on OpenBSD #2397

juanpeha opened this issue Oct 28, 2024 · 2 comments
Assignees

Comments

@juanpeha
Copy link

ZeroTier 1.14.2 fails to build on OpenBSD 7.6.

$ gmake
clang++ -O3 -fstack-protector -Wall -fPIE -fvisibility=hidden -fstack-protector -pthread -isystem ext -Iext/prometheus-cpp-lite-1.0/core/include -Iext/prometheus-cpp-lite-1.0/simpleapi/include -DNDEBUG -DZT_USE_X64_ASM_SALSA2012 -DZT_BUILD_PLATFORM=9 -DZT_BUILD_ARCHITECTURE=2 -DZT_SOFTWARE_UPDATE_DEFAULT="\"disable\"" -std=c++17    -c -o osdep/EthernetTap.o osdep/EthernetTap.cpp
osdep/EthernetTap.cpp:143:42: error: no matching constructor for initialization of 'BSDEthernetTap'
        return std::shared_ptr<EthernetTap>(new BSDEthernetTap(homePath,mac,mtu,metric,nwid,friendlyName,handler,arg));
                                                ^              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
osdep/BSDEthernetTap.hpp:36:2: note: candidate constructor not viable: requires 10 arguments, but 8 were provided
        BSDEthernetTap(
        ^
osdep/BSDEthernetTap.hpp:33:7: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 8 were provided
class BSDEthernetTap : public EthernetTap
      ^
1 error generated.
gmake: *** [<builtin>: osdep/EthernetTap.o] Error 1

1.14.0 is building fine, but 1.14.1 does not.

@joseph-henry joseph-henry self-assigned this Nov 12, 2024
@joseph-henry
Copy link
Contributor

Thanks for the report. Some of the arguments for the tap weren't added for OpenBSD. PR #2405 should fix it. Re-open this if not.

@juanpeha
Copy link
Author

juanpeha commented Nov 12, 2024

Thank you very much for having a look at this, looks like there's an additional issue a bit deeper as well. @joseph-henry, can't figure out how to re-open issue here. Hope you will notice this comment.

clang++ -O3 -fstack-protector -Wall -fPIE -fvisibility=hidden -fstack-protector -pthread -isystem ext -Iext/prometheus-cpp-lite-1.0/core/include -Iext/prometheus-cpp-lite-1.0/simpleapi/include -DNDEBUG -DZT_USE_X64_ASM_SALSA2012 -DZT_BUILD_PLATFORM=9 -DZT_BUILD_ARCHITECTURE=2 -DZT_SOFTWARE_UPDATE_DEFAULT="\"disable\"" -std=c++17    -c -o osdep/BSDEthernetTap.o osdep/BSDEthernetTap.cpp
osdep/BSDEthernetTap.cpp:78:2: warning: field '_pinning' will be initialized after field '_arg' [-Wreorder-ctor]
        _pinning(pinning),
        ^~~~~~~~~~~~~~~~~
        _concurrency(concurrency)
osdep/BSDEthernetTap.cpp:338:2: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
        std::unique(r.begin(),r.end());
        ^~~~~~~~~~~ ~~~~~~~~~~~~~~~~~
osdep/BSDEthernetTap.cpp:393:2: warning: ignoring return value of function declared with 'nodiscard' attribute [-Wunused-result]
        std::unique(newGroups.begin(),newGroups.end());
        ^~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
osdep/BSDEthernetTap.cpp:443:5: error: unknown type name 'cpu_set_t'
                                cpu_set_t cpuset;
                                ^
osdep/BSDEthernetTap.cpp:447:50: error: use of undeclared identifier 'cpu_set_t'; did you mean 'cpuset'?
                                int rc = pthread_setaffinity_np(self, sizeof(cpu_set_t), &cpuset);
                                                                             ^~~~~~~~~
                                                                             cpuset
osdep/BSDEthernetTap.cpp:443:15: note: 'cpuset' declared here
                                cpu_set_t cpuset;
                                          ^
3 warnings and 2 errors generated.
gmake: *** [<builtin>: osdep/BSDEthernetTap.o] Error 1

joseph-henry added a commit that referenced this issue Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants