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

Errors compiling applications/hub on OSX #399

Open
dpharris opened this issue Jul 10, 2020 · 16 comments
Open

Errors compiling applications/hub on OSX #399

dpharris opened this issue Jul 10, 2020 · 16 comments

Comments

@dpharris
Copy link
Collaborator

dpharris commented Jul 10, 2020

I have been having problems compiling applications/hub on OSX.

1. src/utils/FileUtils.cxx

/Users/dpharris/openmrn/src/utils/FileUtils.cxx:111:12: error: comparison of unsigned expression < 0 is always false
      [-Werror,-Wtautological-compare]
    if (nr < 0) {
        ~~ ^ ~
1 error generated.
make[4]: *** [FileUtils.o] Error 1
make[3]: *** [build-utils] Error 2
make[2]: *** [/Users/dpharris/openmrn/targets/mach.x86/lib/timestamp] Error 2
make[1]: *** [build-mach.x86] Error 2
make: *** [build-targets] Error 2
  • nr is defined as "size_t nr". I made a local fix by commenting out the offending if-block.

2. src/utils/SocketClient.hxx and .cxx ....

/Users/dpharris/openmrn/src/utils/SocketClient.hxx:630:28: error: implicit instantiation of undefined template 'std::__1::array<SocketClient::Attempt, 5>'
    std::array<Attempt, 5> strategyConfig_{{
                           ^

...

Thanks for any help.
David

@balazsracz
Copy link
Collaborator

The first one needs to be fixed by changing it to ssize_t from size_t.

The second is a stream of errors going back to one root cause, so looking at the errors indidivually makes no sense beyond the first one.
Could you try adding #include <array> to the top of SocketClient.hxx?

@dpharris
Copy link
Collaborator Author

  1. Fixed.
  2. Improved, but now:
    In file included from /Users/dpharris/openmrn/src/openlcb/TractionCvSpace.cxx:37:
    In file included from /Users/dpharris/openmrn/src/dcc/ProgrammingTrackBackend.hxx:41:
    /Users/dpharris/openmrn/src/dcc/DccOutput.hxx:189:17: error: no template named 'atomic_uint8_t' in
    namespace 'std'; did you mean 'atomic_init'?
    static std::atomic_uint8_t outputDisableReasons_;
    ~~~~~^~~~~~~~~~~~~~
    atomic_init

@dpharris
Copy link
Collaborator Author

I think I fixed this by;
replacing std::atomic_uint8_t
with: std::atomic<uint8_t>
at four (4) places in src/Dcc/DccOutput.hxx

I assume that this means that OSX does not have these definitions, or perhaps I am behind as I am on OSX 10.10.5.

@balazsracz
Copy link
Collaborator

balazsracz commented Jul 27, 2020 via email

@dpharris
Copy link
Collaborator Author

dpharris commented Jul 27, 2020 via email

@balazsracz
Copy link
Collaborator

balazsracz commented Jul 27, 2020 via email

@dpharris
Copy link
Collaborator Author

dpharris commented Jul 27, 2020 via email

@atanisoft
Copy link
Collaborator

@dpharris include/openmrn_features.h

@dpharris
Copy link
Collaborator Author

dpharris commented Jul 28, 2020 via email

@bakerstu
Copy link
Owner

bakerstu commented Jul 28, 2020 via email

@dpharris
Copy link
Collaborator Author

dpharris commented Jul 28, 2020 via email

@bakerstu
Copy link
Owner

bakerstu commented Jul 28, 2020 via email

@atanisoft
Copy link
Collaborator

I did not want OpenMRN to use pselect().

Out of curiosity, what is the benefit of pselect() over select(), is it just the sigmask? If so, what does overriding the sigmask provide as a benefit?

@balazsracz
Copy link
Collaborator

balazsracz commented Jul 28, 2020 via email

@bakerstu
Copy link
Owner

bakerstu commented Jul 28, 2020 via email

@bakerstu
Copy link
Owner

bakerstu commented Jul 28, 2020 via email

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

4 participants