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

CMAKE build fails on M2 Mac but works on Intel Mac, "Undefined symbols for architecture x86_64" #992

Open
philburk opened this issue Dec 13, 2024 · 1 comment
Labels
bug Something isn't working build build-cmake CMake build system osx Affects Mac OS X

Comments

@philburk
Copy link
Collaborator

REPRO STEPS

On an M2 Macbook:
git clone https://github.com/PortAudio/portaudio.git
mkdir pabuild
cd pabuild
cmake ../portaudio  -DPA_BUILD_EXAMPLES=ON
make

EXPECTED
Build succeeds.

ACTUAL

ld: warning: ignoring file '../libportaudio.a[3](pa_converters.c.o)': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '../libportaudio.a[2](pa_allocation.c.o)': found architecture 'arm64', required architecture 'x86_64'
Undefined symbols for architecture x86_64:
  "_main", referenced from:
      <initial-undefines>
ld: symbol(s) not found for architecture x86_64

The same instructions work on my Intel mac.

@philburk philburk added bug Something isn't working build build-cmake CMake build system osx Affects Mac OS X labels Dec 13, 2024
@ryandesign
Copy link

Unable to reproduce on an M1 Mac mini running macOS 13. Try deleting your pabuild directory and trying again; maybe it contains remnants of a previous x86_64 build attempt. Make sure you are using an arm64 terminal program and arm64 shell, not one running in x86_64 emulation via Rosetta 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working build build-cmake CMake build system osx Affects Mac OS X
Projects
None yet
Development

No branches or pull requests

2 participants