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

Compile error on Linux #35

Closed
thbonk opened this issue Oct 31, 2020 · 2 comments
Closed

Compile error on Linux #35

thbonk opened this issue Oct 31, 2020 · 2 comments

Comments

@thbonk
Copy link

thbonk commented Oct 31, 2020

Hello,

I'm using HAP in a project which depends on NetService. When I compile my project on Linux,
I'm getting errors like:

/home/travis/build/MiCasa-HomeKit/MiCasaPlugin/.build/checkouts/NetService/Sources/NetService/NetServiceBrowser.swift:181:66: error: cannot find 'kCFSocketReadCallBack' in scope
372        socket = CFSocketCreateWithNative(nil, fd, CFOptionFlags(kCFSocketReadCallBack), _processResult, &context)

These errors occur in several files. You can find the full log at:
https://travis-ci.org/github/MiCasa-HomeKit/MiCasaPlugin/jobs/740481068

This is my .travis.yml file:
https://github.com/MiCasa-HomeKit/MiCasaPlugin/blob/feat-%231-setup-ci-cd-pipeline/.travis.yml

Best regards
Thomas

@Bouke
Copy link
Owner

Bouke commented Nov 1, 2020

I don't fully understand why this started happening. There has been no change on my side, and master used to run fine on Linux on Swift 5.1 and 5.2. However it is now failing indeed. The apt packages installed in both tests are the same versions:

Unpacking libdaemon0:amd64 (0.14-6) ...
Unpacking libavahi-core7:amd64 (0.7-3.1ubuntu1.2) ...
Unpacking avahi-daemon (0.7-3.1ubuntu1.2) ...
Unpacking libavahi-common-dev:amd64 (0.7-3.1ubuntu1.2) ...
Unpacking libdbus-1-dev:amd64 (1.12.2-1ubuntu1.2) ...
Unpacking libavahi-client-dev:amd64 (0.7-3.1ubuntu1.2) ...
Unpacking libavahi-compat-libdnssd1:amd64 (0.7-3.1ubuntu1.2) ...
Unpacking libavahi-compat-libdnssd-dev:amd64 (0.7-3.1ubuntu1.2) ...
Unpacking libnss-mdns:amd64 (0.10-8ubuntu1) ...

See failing test and succeeding test.

@Bouke
Copy link
Owner

Bouke commented Nov 29, 2020

I've fixed this in #38. I still don't know why the variable was no longer set on Linux.

@Bouke Bouke closed this as completed Nov 29, 2020
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