Skip to content

Commit

Permalink
Plugin: Fix MacOS Build and test errors
Browse files Browse the repository at this point in the history
- Build scripts now to g++13 with classic linker
- Catch2 picked fix catchorg/Catch2#2837

With the new macOS linker the build fails with a weird error.
Turned out, we need gcc13 together with the classic linker to successfully build on the github runner.
  • Loading branch information
hbeni committed May 13, 2024
1 parent f228464 commit 7786c55
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/make-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

- name: Build and run CATCH2 tests
run: |
make -C client/mumble-plugin/ CC=g++-11 test
make -C client/mumble-plugin/ CC=g++-13 CFLAGS+=-ld_classic test
- name: Build Plugin
run: |
Expand Down Expand Up @@ -126,7 +126,7 @@ jobs:

- name: Build and run CATCH2 tests
run: |
make -C client/mumble-plugin/ DEBUG+="-g3 -Og -DDEBUG" CC=g++-11 test
make -C client/mumble-plugin/ DEBUG+="-g3 -Og -DDEBUG" CC=g++-13 CFLAGS+=-ld_classic test
- name: Build Plugin
run: |
Expand Down
4 changes: 2 additions & 2 deletions client/mumble-plugin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ plugin-win-dllresource:
$(mingwprefix)windres dllResource.rc dllResource.o

# shortcut for building natively on macOS
plugin-macOS: CC=g++-11
plugin-macOS: CC=g++-13
plugin-macOS: outname=fgcom-mumble-macOS.bundle
plugin-macOS: openssl-macOS
make CC=$(CC) outname=$(outname) plugin
make CC=$(CC) outname=$(outname) CFLAGS+=-ld_classic plugin

# OpenSSL
# The sources are located under lib/openssl as git submodule, and supposed to point to the latest stable head
Expand Down
3 changes: 3 additions & 0 deletions client/mumble-plugin/test/catch2/catch_amalgamated.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@
// See e.g.:
// https://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/TargetConditionals.h.auto.html
#ifdef __APPLE__
# ifndef __has_extension
# define __has_extension(x) 0
# endif
# include <TargetConditionals.h>
# if (defined(TARGET_OS_OSX) && TARGET_OS_OSX == 1) || \
(defined(TARGET_OS_MAC) && TARGET_OS_MAC == 1)
Expand Down

0 comments on commit 7786c55

Please sign in to comment.