Skip to content

Multiple libraries were found, compilation failed. #218

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

Open
filipgoc opened this issue May 30, 2019 · 3 comments
Open

Multiple libraries were found, compilation failed. #218

filipgoc opened this issue May 30, 2019 · 3 comments
Assignees
Labels
status: waiting for information More information must be provided before work can proceed type: imperfection Perceived defect in any part of project

Comments

@filipgoc
Copy link

filipgoc commented May 30, 2019

I'm compiling the Marlin firmware, which uses U8glib.h library

When I try to compile, I get the following error:

arduino-cli compile --fqbn arduino:avr:mega Marlin    
Build options changed, rebuilding all
Alternatives for U8glib.h: [[email protected]]
ResolveLibrary(U8glib.h)
  -> candidates: [[email protected]]

Multiple libraries were found for "U8glib.h"
Used: /Users/filipgoc/Documents/Arduino/libraries/U8glib
Error: open /dev/null: too many open files

Compilation failed.
  1. I had this working already. I successfully compiled the code and even uploaded it to Mega2560 board.
  2. Then it stopped working. I was trying to make sure I have the latest libraries, and I ran arduino-cli lib install U8glib, which worked fine.
  3. However, now I can't compile. I tried
    • restarting the computer and terminal
    • Uninstalling the U8glib from cli (lib uninstall), then I get that there is no U8glib library and thus error.
    • Uninstalling the U8glib from cli and cli reinstalling - same error (too many files...)
    • Removing the U8glib manually from Documents/Arduino/Libraries. This behaved the same as cli uninstall. Not resolved.
  4. BTW Arduino IDE compiles the same sketch with no problems.

Any troubleshooting pointers appreciated. What happened?! Why was it working and now it's not?

System

Mac OS 10.13.6; using native Terminal.app and iTerm.app; bash and zsh.

@filipgoc
Copy link
Author

PS: I can compile sketches that do not use U8glib (like blink).

@filipgoc
Copy link
Author

filipgoc commented May 30, 2019

Curious. I was able to compile when I raised the limit on how many open files terminal can have. Thanks to https://superuser.com/questions/433746/is-there-a-fix-for-the-too-many-open-files-in-system-error-on-os-x-10-7-1

ulimit -S -n 1000

So... it works, but something strange is happening.

It seems that Arduino needs to open a lot of files to resolve which library it should use when there are multiple or something. When the limit is raised, it does resolve:

ulimit -S -n 1000
[...]
Alternatives for U8glib.h: [[email protected]]
ResolveLibrary(U8glib.h)
  -> candidates: [[email protected]]

@per1234 per1234 added the bug label May 31, 2019
@rsora rsora self-assigned this Sep 12, 2019
@per1234 per1234 reopened this Mar 30, 2021
per1234 added a commit that referenced this issue Aug 9, 2021
Sync Prettier formatting check CI workflow with template
@fstasi fstasi removed the type: bug label Sep 16, 2021
@rsora rsora added the type: imperfection Perceived defect in any part of project label Sep 22, 2021
@umbynos
Copy link
Contributor

umbynos commented Oct 12, 2022

Hi @filipgoc Could you please try with the latest version of the cli? https://github.com/arduino/arduino-cli/releases/latest

@umbynos umbynos assigned umbynos and unassigned rsora Oct 12, 2022
@umbynos umbynos added the status: waiting for information More information must be provided before work can proceed label Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting for information More information must be provided before work can proceed type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

5 participants