skipping incompatible libraries

zampano
Posts: 10
Joined: Sun Feb 17, 2019 9:53 pm

skipping incompatible libraries

Postby zampano » Mon Feb 18, 2019 9:26 pm

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.

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: skipping incompatible libraries

Postby ESP_Angus » Mon Feb 18, 2019 10:18 pm

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

zampano
Posts: 10
Joined: Sun Feb 17, 2019 9:53 pm

Re: skipping incompatible libraries

Postby zampano » Tue Feb 19, 2019 9:06 pm

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

ESP_igrr
Posts: 2067
Joined: Tue Dec 01, 2015 8:37 am

Re: skipping incompatible libraries

Postby ESP_igrr » Wed Feb 20, 2019 3:41 am

Can you also try running

file /opt/esp-idf-sdk/components/esp32/lib/libcore.a

and see what it says?

zampano
Posts: 10
Joined: Sun Feb 17, 2019 9:53 pm

Re: skipping incompatible libraries

Postby zampano » Wed Feb 20, 2019 8:02 am

file /opt/esp-idf-sdk/components/esp32/lib/libcore.a

shows

libcore.a: current ar archive

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: skipping incompatible libraries

Postby ESP_Angus » Wed Feb 20, 2019 10:28 pm

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 ?

zampano
Posts: 10
Joined: Sun Feb 17, 2019 9:53 pm

Re: skipping incompatible libraries

Postby zampano » Thu Feb 21, 2019 7:54 pm

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

zampano
Posts: 10
Joined: Sun Feb 17, 2019 9:53 pm

Re: skipping incompatible libraries

Postby zampano » Sun Mar 03, 2019 7:45 pm

Cloning the sdk from https://github.com/espressif/esp-idf.git it works.

Many thanks.

Who is online

Users browsing this forum: Baidu [Spider] and 131 guests