-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
Linker fails on Mac OS X with "Too many open files" error (IDFGH-1764) #3989
Comments
Hi @Micrified. Please make sure that you get the same failure after you have removed the build directory ( Are you trying to create your own component or you just want an application which can be flashed? In the former case, I don't think that Note that in the case of Can you link please the exact path of the example which cannot be compiled at your end? That would be easier to use for tracking down your problem. |
Hello. So I removed the build directory and tried again - same error. Since I'm trying to build an application that can be flashed, I want What am I supposed to list in the requires section if these libraries don't exist? How come they exist if I build the exact same project on Linux? This is confusing to me a bit. The linker knows they should be there but it cannot find them for some reason. Problem with compiling BLE example Alright I ran
Just for your information, my
|
Hi @Micrified, Can you try increasing the open files limit? https://superuser.com/questions/827984/open-files-limit-does-not-work-as-before-in-osx-yosemite/1171026#1171026 |
In that case, you don't need an
Are you using the |
Hello again, Yeah, so my Install.sh / Export.sh
Yes I do use the |
I'm sorry but I have to ask again to confirm that you are talking about The given example can be compiled on Linux and MacOS as well and I cannot reproduce your issue. Could you try a newer version of ESP-IDF (either the Another thing you could try is to remove the |
Hey @dobairoland Yeah, it's that example precisely. In fact, I made a screencast showing me successfully compiling I've yet to try increasing the open-file limit suggested by @renzbagaporo. I'll do that now. Edit:
|
Hello @Micrified. Thank you checking all the ideas we gave you and making the screencast. I'm sorry we could not give you a direct and simple solution yet. Unfortunately, I still cannot reproduce the issue. We tried on macOS to build the same example using the same IDF version. Could you please give to me a verbose version of the build for the Thank you for your patience! |
Chiming in to say I'm having the same issue on macOS 10.14.6 (18G95) with exactly the same error messages. ESP-IDF based on head on release/v4.0 branch |
@dobairoland Sorry I forgot about this thread when I took a break. Here's the log file. It seems to report a successfully build. Can you explain a bit how your instructions fixed my issue? Edit: I can build my project successfully now! You can close the thread now |
I'm happy for you @Micrified! So you did reinstall the toolchain and that helped? Or did you do anything else? |
@dobairoland Thanks! I did what you asked I try, which is this: |
I'm back at this error, turns out I was using the old toolchain when it resolved itself.
|
Hi @sieren. Please create a new issue for the SPIFSS one because I believe these are unrelated. Thanks! |
After running into the same issue (too many open files), I've tried most of the options mentioned in this issue. Unfortunately, this issue does not go to the root of the cause. Instead, the conclusion is: it resolved itself. I was able to fix it, and I can pinpoint a single measure: increase the limit of open files and reboot. For increasing the limit, see https://wilsonmar.github.io/maximum-limits/ and follow the instructions for creating /Library/LaunchDaemons/limit.maxproc.plist. Then reboot. (I first tried with If this solution helps you as well, add a thumbs up. |
Yeah! Thumbs up! Thank you. |
I'm running into this issue as well (too many open files). In my case I'm trying to run the hello_world example from the esp-idf get-started guide. |
Yes, it's clearly related to ESP-IDF v4.x, either to changes in the build system or the newer toolchain (gcc etc.). Going back to ESP-IDF v3.3 and the older toolchain will solve it. |
I am running macOS Mojave version 10.14.2 (18C54) and was having the same issue but using Remember: The max files limit is reset at every reboot so make sure you add the command to your |
Hi, having the same issue in macOS Catalina. Using the sudo command works, but you need to close and re-open your terminal window to work. (or open a new terminal) Hope this helps. |
Same issue in macOS Mojave 10.14.6 Neither the sudo command nor the launchctl solution worked. For now I've dropped back to an earlier version (c191068) that doesn't suffer from this problem. |
Have you tried using a new console after using the sudo command ? |
Also there is a new version of the toolchain in the master branch (and will be available soon in v4.0 as well). Those who experience this problem could try to update to that and report back whether it solves the issue or not. |
Tried on new console, tried on reboot etc. etc. Also, this was running against the latest commit to master branch: fb3d648 |
Can you please try |
Okay, that worked :-) Some log files from building the Log for failing build: fail.log
Log for successful build: success.log
Thank you muchly for taking the time to look into this! |
Reopening this as not resolved yet. A fix has been merged on our internal branch, should push to GitHub soon. |
Running |
... to reduce the number of simultaneously open files at link time. When plugin support is enabled in the linker, BFD's (and the corresponding file handles) are cached for the plugin to use. This results in quite a large number of simultaneously open files, which hits the default limit on macOS (256 files). Since we aren't using LTO now, disable it explicitly when invoking the linker. Closes IDF-923 Closes IDFGH-1764 Closes #3989
Is there any way to re-enable LTO when not building on Mac OS? |
Environment
ESP32-DevKitC
v4
ESP32-WROOM-32
v4.0-dev-1443-g39f090a4f
CMake
xtensa-esp32-elf-gcc (crosstool-NG esp32-2019r1) 8.2.0
macOS 10.11.6
USB
Problem Description
Invoking
idf.py build
on a custom project fails to compile, citing that the following libraries could not be found:Expected Behavior
I expect this project to compile successfully. I am able to successfully build and flash this project on a machine running Ubuntu.
Actual Behavior
I can successfully compile and flash the
hello-world
program from this machine. But I cannot compile this project or the example ones for BLE (e.g. BLE server example). The linker will consistently produce this outputSteps to repropduce
idf.py build
Code to reproduce this issue
The code is quite large spanning several files. The project is structured as follows:
Files
component.mk
is empty and unchanged. The fileCMakeLists.txt
contains:Debug Logs
Other items if possible
build
folder: NoneThe text was updated successfully, but these errors were encountered: