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

Fix kconfig-frontends compilation on Mac M1 #81

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nrodichenko
Copy link

kconfig-frontends fails to compile on M1 Mac (OSX 12.2.1, XCode CLT version 13.4.0.0.1.1651278267) with the following error: ld: symbol(s) not found for architecture x86_64

This patch adds an ncurses dependency, which fixes the linker error above.

kconfig-frontends fails to compile on M1 Mac (OSX 12.2.1, XCode CLT version 13.4.0.0.1.1651278267) with the following error:  "ld: symbol(s) not found for architecture x86_64".

This patch adds an ncurses dependency, which fixes the linker error above.
@rakmo97
Copy link

rakmo97 commented Mar 31, 2023

Hello! I'm having the error you mention (ld: symbol(s) not found for architecture x86_64). I tried installing kconfig-frontends using the change you have but I get this error:

Error: Failure while executing; `patch -g 0 -f -p1` exited with 1. Here's the output:
patching file bootstrap
patching file configure.ac
patching file 'scripts/ksync.sh'
patching file 'scripts/version.sh'
patching file 'utils/Makefile.am'
1 out of 1 hunks failed--saving rejects to 'utils/Makefile.am.rej'
patching file 'utils/tweak.in'
2 out of 2 hunks failed--saving rejects to 'utils/tweak.in.rej'

Any idea what the issue could be?

@rakmo97
Copy link

rakmo97 commented Mar 31, 2023

Nevermind on my last comment.

This branch needs to be merged ASAP because it worked for me and it seems like a lot of M1 folks are having trouble! (2021 Macbook Air with M1). This is how I got it to work (figured out by @aaronknudtson) from @nrodichenko 's branch (before it gets merged):

  1. First, I setup homebrew using the instructions here: https://medium.com/mkdir-awesome/how-to-install-x86-64-homebrew-packages-on-apple-m1-macbook-54ba295230f
    This sets up an axbrew alias for the brew command.

  2. Then, I ran
    axbrew tap nrodichenko/homebrew-px4
    cd /usr/local/homebrew/Library/Taps/nrodichenko/homebrew-px4
    git checkout patch-1
    axbrew install px4-dev

If the last command doesn't work, you may need to do axbrew untap --force PX4/px4 if you had already tapped that.
I think instead of setting up axbrew, you can run brew commands as arch -x86_64 brew [...], but I haven't tried it personally.

@mengchaoheng
Copy link

@rakmo97 @nrodichenko can you help me about PX4/PX4-Autopilot#22826

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

Successfully merging this pull request may close these issues.

3 participants