let_sgo
Posts: 16
Joined: Wed Mar 24, 2021 3:57 pm

is my gcc conflict?

Wed Sep 22, 2021 1:17 pm

i just setup SDK for pico in macos. i have some C code running on macos without problem. but it got error after i setup for pico. may be problem was arm gcc?

Code: Select all

Undefined symbols for architecture x86_64:
  "_xxx", referenced from:
      _main in 1-242e32.o
  "_xxx", referenced from:
      _main in 1-242e32.o
  "_xxx", referenced from:
      _main in 1-242e32.o
  "_rxxx", referenced from:
      _main in 1-242e32.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
above error was my c code on macos. it link mylib function. without use function without error.
what wrong with it? and how you handle difference gcc? thanks.

WestfW
Posts: 120
Joined: Tue Nov 01, 2011 9:56 pm

Re: is my gcc conflict?

Thu Sep 23, 2021 5:56 am

for architecture x86_64
It looks like you're not running the ARM C Compiler.
Did you do this, or the equivalent? (And did you install an ARM C Compiler?)

Code: Select all

export PICO_TOOLCHAIN_PATH=/usr/local/gcc-arm-8-2019-q3/bin

let_sgo
Posts: 16
Joined: Wed Mar 24, 2021 3:57 pm

Re: is my gcc conflict?

Thu Sep 23, 2021 9:52 am

Sorry for misunderstanding. This error by running my c code in macOS. When it running some function from mylib show this error. Before setup pico environment it work fine. I am so sorry may be I shouldn’t post this question here.

hippy
Posts: 10761
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: is my gcc conflict?

Thu Sep 23, 2021 2:39 pm

Installing the Pico SDK and its toolchain should not have broken any existing installation.

If it has then one option may be to uninstall the Pico SDK toolchain and reinstall the original toolchain which has become broken. That would hopefully restore things to how they were before they became broken.

Once back on a firm foundation you can then reinstall the Pico SDK and toolchain, checking that nothing breaks as you go. If it does you should be able to identify what has caused that.

Return to “SDK”