Page 1 of 1
skipping incompatible libraries
Posted: Mon Feb 18, 2019 9:26 pm
by zampano
Hi,
compiling hello-world example the linker command shows a lot of errors about all the libraries. The messages are like these:
make
LD build/hello-world.elf
/usr/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: skipping incompatible /opt/esp-idf-sdk/components/esp32/lib/libcore.a when searching for -lcore
/usr/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: cannot find -lcore
/usr/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: skipping incompatible /opt/esp-idf-sdk/components/esp32/lib/librtc.a when searching for -lrtc
...
My system is:
Operating system: Arch Linux
Installed packages: esp-idf 3.1-3, gcc-xtensa-esp32-elf-bin
What could be wrong?
Many thanks.
Re: skipping incompatible libraries
Posted: Mon Feb 18, 2019 10:18 pm
by ESP_Angus
Does the build system print any warnings about incompatible toolchain versions (or any other warnings at all)? Can you please post the output of xtensa-esp32-elf-ld --version?
Thanks,
Angus
Re: skipping incompatible libraries
Posted: Tue Feb 19, 2019 9:06 pm
by zampano
Thank you for quick answer and sorry for my delay.
The requested output is:
$ xtensa-esp32-elf-ld --version
GNU ld (crosstool-NG crosstool-ng-1.22.0-80-g6c4433a) 2.25.1
Copyright (C) 2014 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
Many thanks.
Paolo
Re: skipping incompatible libraries
Posted: Wed Feb 20, 2019 3:41 am
by ESP_igrr
Can you also try running
file /opt/esp-idf-sdk/components/esp32/lib/libcore.a
and see what it says?
Re: skipping incompatible libraries
Posted: Wed Feb 20, 2019 8:02 am
by zampano
file /opt/esp-idf-sdk/components/esp32/lib/libcore.a
shows
libcore.a: current ar archive
Re: skipping incompatible libraries
Posted: Wed Feb 20, 2019 10:28 pm
by ESP_Angus
Hi zampano,
One more question (sorry for all the back and forth). Can you please post the output from this:
Code: Select all
xtensa-esp32-elf-objdump -f /opt/esp-idf-sdk/components/esp32/lib/libcore.a
Also, I don't know if this will work, but can you please try:
Code: Select all
/usr/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld --version
(This is using the path to ld printed in the warning log.)
BTW, does this look like the same path where you installed the toolchain for ESP-IDF - I think it resolves out to /usr/xtensa-esp32-elf/bin/ld ?
Re: skipping incompatible libraries
Posted: Thu Feb 21, 2019 7:54 pm
by zampano
Hi,
below the result of the two commands you asked me:
xtensa-esp32-elf-objdump -f /opt/esp-idf-sdk/components/esp32/lib/libcore.a
In archive /opt/esp-idf-sdk/components/esp32/lib/libcore.a:
misc_nvs.o: file format elf32-little
architecture: UNKNOWN!, flags 0x00000011:
HAS_RELOC, HAS_SYMS
start address 0x00000000
/usr/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld --version
GNU ld (crosstool-NG crosstool-ng-1.22.0-80-g6c4433a) 2.25.1
Copyright (C) 2014 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
Many thanks.
Paolo
Re: skipping incompatible libraries
Posted: Sun Mar 03, 2019 7:45 pm
by zampano
Cloning the sdk from
https://github.com/espressif/esp-idf.git it works.
Many thanks.