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

[PATCH]: Recursor 4.1.0 alpha 1 fails to build on FreeBSD #5662

Merged
merged 2 commits into from Sep 1, 2017

Conversation

Projects
None yet
6 participants
@RvdE
Contributor

RvdE commented Aug 31, 2017

This fixes compilation on FreeBSD, which requires an extra include file and defines a slightly different type.

Short description

Here's the log wich shows the compilation errors: https://pkg.cainites.net/data/freebsd_11-1x64-system/2017-08-30_10h50m42s/logs/errors/powerdns-recursor-4.1.0a1.log

Checklist

I have:

  • read the CONTRIBUTING.md document
  • compiled and tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)
  • checked that this code was merged to master
[PATCH]: Recursor 4.1.0 alpha 1 fails to build on FreeBSD
This fixes compilation on FreeBSD, which requires an extra include file and defines a slightly different type.
@pieterlexis

This comment has been minimized.

Show comment
Hide comment
@pieterlexis

pieterlexis Sep 1, 2017

Member

Breaks on linux:

misc.cc: In function ‘int mapThreadToCPUList(pthread_t, const std::set<int>&)’:
misc.cc:1329:23: error: ‘cpuset_t’ was not declared in this scope
 #    define cpu_set_t cpuset_t
                       ^
misc.cc:1331:3: note: in expansion of macro ‘cpu_set_t’
   cpu_set_t cpuset;
   ^
misc.cc:1331:13: error: expected ‘;’ before ‘cpuset’
   cpu_set_t cpuset;
             ^
In file included from /usr/include/sched.h:41:0,
                 from /usr/include/pthread.h:23,
                 from /usr/include/x86_64-linux-gnu/c++/4.8/bits/gthr-default.h:35,
                 from /usr/include/x86_64-linux-gnu/c++/4.8/bits/gthr.h:148,
                 from /usr/include/c++/4.8/ext/atomicity.h:35,
                 from /usr/include/c++/4.8/bits/ios_base.h:39,
                 from /usr/include/c++/4.8/ios:42,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from misc.cc:35:
misc.cc:1332:13: error: ‘cpuset’ was not declared in this scope
   CPU_ZERO(&cpuset);
             ^
misc.cc:1334:21: error: ‘cpuset’ was not declared in this scope
     CPU_SET(cpuID, &cpuset);
                     ^
misc.cc:1338:40: error: ‘cpuset’ was not declared in this scope
                                 sizeof(cpuset),
                                        ^
make[2]: *** [misc.o] Error 1
Member

pieterlexis commented Sep 1, 2017

Breaks on linux:

misc.cc: In function ‘int mapThreadToCPUList(pthread_t, const std::set<int>&)’:
misc.cc:1329:23: error: ‘cpuset_t’ was not declared in this scope
 #    define cpu_set_t cpuset_t
                       ^
misc.cc:1331:3: note: in expansion of macro ‘cpu_set_t’
   cpu_set_t cpuset;
   ^
misc.cc:1331:13: error: expected ‘;’ before ‘cpuset’
   cpu_set_t cpuset;
             ^
In file included from /usr/include/sched.h:41:0,
                 from /usr/include/pthread.h:23,
                 from /usr/include/x86_64-linux-gnu/c++/4.8/bits/gthr-default.h:35,
                 from /usr/include/x86_64-linux-gnu/c++/4.8/bits/gthr.h:148,
                 from /usr/include/c++/4.8/ext/atomicity.h:35,
                 from /usr/include/c++/4.8/bits/ios_base.h:39,
                 from /usr/include/c++/4.8/ios:42,
                 from /usr/include/c++/4.8/istream:38,
                 from /usr/include/c++/4.8/fstream:38,
                 from misc.cc:35:
misc.cc:1332:13: error: ‘cpuset’ was not declared in this scope
   CPU_ZERO(&cpuset);
             ^
misc.cc:1334:21: error: ‘cpuset’ was not declared in this scope
     CPU_SET(cpuID, &cpuset);
                     ^
misc.cc:1338:40: error: ‘cpuset’ was not declared in this scope
                                 sizeof(cpuset),
                                        ^
make[2]: *** [misc.o] Error 1

@ahupowerdns ahupowerdns merged commit 59c128e into PowerDNS:master Sep 1, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@aerique aerique added the rec label Oct 6, 2017

@Kerrnel

This comment has been minimized.

Show comment
Hide comment
@Kerrnel

Kerrnel Mar 10, 2018

Needs #define cpu_set_t cpuset_t for NetBSD too

Kerrnel commented Mar 10, 2018

Needs #define cpu_set_t cpuset_t for NetBSD too

@rgacogne

This comment has been minimized.

Show comment
Hide comment
@rgacogne

rgacogne Mar 12, 2018

Member

Hi @Kerrnel, would you mind opening a new issue for this? We tend to forget comments on a closed pull request quite quickly.. Thanks!

Member

rgacogne commented Mar 12, 2018

Hi @Kerrnel, would you mind opening a new issue for this? We tend to forget comments on a closed pull request quite quickly.. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment