Skip to content

Arduino library.properties dot_a_linkage does not (quite) work #1049

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

Closed
timr49 opened this issue Jan 29, 2018 · 4 comments
Closed

Arduino library.properties dot_a_linkage does not (quite) work #1049

timr49 opened this issue Jan 29, 2018 · 4 comments
Labels
Status: Stale Issue is stale stage (outdated/stuck)

Comments

@timr49
Copy link
Contributor

timr49 commented Jan 29, 2018

Hardware:

Board: Sparkfun ESP32 Thing
Core Installation/update date: 30/Jan/2018
IDE name: Arduino IDE
Flash Frequency: 80Mhz
Upload Speed: 921600

Description:

From "Arduino IDE 1.5: Library specification" https://github.com/arduino/arduino/wiki/arduino-ide-1.5:-library-specification ...
"... dot_a_linkage - (available from IDE 1.6.0 / arduino-builder 1.0.0-beta13) when set to true, the library will be compiled using a .a (archive) file. First, all source files are compiled into .o files as normal. Then instead of including all .o files in the linker command directly, all .o files are saved into a .a file, which is then included in the linker command. 1.5 format library folder structure is required."

If this option is used with the ESP32 Arduino IDE, the linker fails with:

.../arduino_build_10463/libraries/LIBRARY/LIBRARY.a: No such file or directory

Inspecting the build directory shows that the .o files have been added to the arduino.ar file

$ ar t arduino.ar
LIBRARY.cpp.o
esp32-hal-adc.c.o
...
main.cpp.o

but the linker error message (above) suggests that it is expecting to find them in a libraries/LIBRARY/LIBRARY.a file, which does not exist.

If you create either a dummy LIBRARY.a file
ar c LIBRARY.a
or a LIBRARY.a file containing the .o files
ar c LIBRARY.a *.o
in the library/LIBRARY directory and then recompile, it successfully links.

Sketch:

#include <LIBRARY.h>
void setup() {
  // put your setup code here, to run once:
}
void loop() {
  // put your main code here, to run repeatedly:
}

Debug Messages:

xtensa-esp32-elf-gcc: error: /var/folders/5k/v4z291_x3sd08tt8ldfb34km0000gn/T/arduino_build_10463/libraries/LIBRARY/LIBRARY.a: No such file or directory
Using library LIBRARY at version 1.0.0 in folder: /Users/tim/Repositories/sam/src/Arduino/libraries/LIBRARY 
exit status 1
Error compiling for board SparkFun ESP32 Thing.
@TyIsI
Copy link

TyIsI commented Mar 7, 2018

Disabling the option also fixes the problem.

This problem is also present in the ESP8266 version.

@me-no-dev is there anywhere where this bug should be reported directly?

@d-a-v
Copy link

d-a-v commented Aug 9, 2018

This is not a bug in arduino (as of today's latest build). As you mention, we have this problem in esp8266 and also a beginning of a solution for platform.txt (link).

@stale
Copy link

stale bot commented Aug 1, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: Stale Issue is stale stage (outdated/stuck) label Aug 1, 2019
@stale
Copy link

stale bot commented Aug 15, 2019

This stale issue has been automatically closed. Thank you for your contributions.

@stale stale bot closed this as completed Aug 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Stale Issue is stale stage (outdated/stuck)
Projects
None yet
Development

No branches or pull requests

3 participants