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

livekit-libwebrtc: fix builds on darwin #368147

Merged
merged 1 commit into from
Dec 25, 2024

Conversation

WeetHet
Copy link
Contributor

@WeetHet WeetHet commented Dec 25, 2024

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@niklaskorz
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 368147


x86_64-linux

❌ 2 packages failed to build:
  • livekit-libwebrtc
  • zed-editor

@niklaskorz
Copy link
Contributor

       > g++ -MMD -MF obj/rtc_base/checks/checks.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_OZONE=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DCOMPONENT_BUILD -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DWEBRTC_ENABLE_PROTOBUF=0 -DWEBRTC_STRICT_FIELD_TRIALS=0 -DWEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE -DRTC_USE_LIBAOM_AV1_ENCODER -DRTC_ENABLE_VP9 -DRTC_DAV1D_IN_INTERNAL_DECODER_FACTORY -DWEBRTC_HAVE_SCTP -DWEBRTC_USE_H264 -DWEBRTC_LIBRARY_IMPL -DWEBRTC_ENABLE_SYMBOL_EXPORT -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=0 -DWEBRTC_POSIX -DWEBRTC_LINUX -DABSL_ALLOCATOR_NOTHROW=1 -I../.. -Igen -I../../third_party/abseil-cpp -Wall -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -Wno-comments -Wno-packed-not-aligned -Wno-missing-field-initializers -Wno-unused-parameter -Wno-psabi -fno-ident -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC -pipe -pthread -m64 -msse3 -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -O2 -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fvisibility=hidden -fvisibility=default -Wno-error=c++11-narrowing-const-reference -Wno-narrowing -Wno-class-memaccess -std=gnu++2a -fno-exceptions -fvisibility-inlines-hidden -Wnon-virtual-dtor -Woverloaded-virtual -c ../../rtc_base/checks.cc -o obj/rtc_base/checks/checks.o
       > cc1plus: error: '-Wno-error=c++11-narrowing-const-reference': no option '-Wc++11-narrowing-const-reference'

@WeetHet WeetHet force-pushed the libwebrtc-build-fix branch from 929e2cc to f456056 Compare December 25, 2024 18:19
@WeetHet WeetHet force-pushed the libwebrtc-build-fix branch from f456056 to 3082f67 Compare December 25, 2024 18:22
@github-actions github-actions bot added 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux and removed 10.rebuild-linux: 1-10 labels Dec 25, 2024
@WeetHet
Copy link
Contributor Author

WeetHet commented Dec 25, 2024

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review
---

aarch64-darwin

✅ 2 packages built:
  • livekit-libwebrtc
  • zed-editor

@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label Dec 25, 2024
@ofborg ofborg bot requested a review from niklaskorz December 25, 2024 21:53
@ofborg ofborg bot added the 11.by: package-maintainer This PR was created by the maintainer of the package it changes label Dec 25, 2024
@niklaskorz
Copy link
Contributor

niklaskorz commented Dec 25, 2024

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 368147

Edit: makes sense there's no output now, as the package definition is unchanged for Linux 👍

@niklaskorz
Copy link
Contributor

niklaskorz commented Dec 25, 2024

Probably worth mentioning why this fix is needed at all: recent merge of staging-next included LLVM 19 for darwin, which added a new default warning / error. This PR disables this new default warning again for libwebrtc.

# Required for dynamically linking to ffmpeg libraries and exposing symbols
./0001-shared-libraries.patch
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
Copy link
Contributor

@niklaskorz niklaskorz Dec 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think stdenv.hostPlatform.isClang might be more correct (but also I'm not sure this currently builds on Linux using clang, or Darwin using GCC, at all, so it probably doesn't matter)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep it like this for now.

@GaetanLepage
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 368147


x86_64-darwin

✅ 2 packages built:
  • livekit-libwebrtc
  • zed-editor

aarch64-darwin

✅ 2 packages built:
  • livekit-libwebrtc
  • zed-editor

@GaetanLepage GaetanLepage merged commit 138326d into NixOS:master Dec 25, 2024
41 of 43 checks passed
@WeetHet WeetHet deleted the libwebrtc-build-fix branch December 26, 2024 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: darwin Running or building packages on Darwin 10.rebuild-darwin: 1-10 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux 11.by: package-maintainer This PR was created by the maintainer of the package it changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants