-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
undefined reference to flock, flockfile (IDFGH-409) #2565
Comments
Does fcntl() work for file locking? It seems to link without problems. |
On desktop platforms, flock creates a lock which works between processes. Here in ESP-IDF we have only one process, so an implentation of flock would be a no-op. flockfile, on the other hand, can be used to lock between threads (tasks in FreeRTOS), and is certainly useful. It is not exposed at the moment but we will certainly provide this definition. fcntl locking is also between processes, as far as I understand, so it would also be a no-op in ESP-IDF. |
It is something that would be very useful for a project I'm working on. We may expect it to be done soon? |
Environment
Problem Description
Unable to use functions such as flock, flockfile. There is no compilation error, but a linker error is thrown such as "undefined reference to `flockfile' collect2: error: ld returned 1 exit status"
Expected Behaviour
Links without error and binary file generated and file locking possible.
Actual Behaviour
See problem description. Same behaviour is seen in both Arduino IDE and using make with ESP-IDF 3.1 installed.
Steps to reproduce
Paste following code in Arduino IDE New sketch with any ESP32 board selected.
Code to reproduce this issue
The text was updated successfully, but these errors were encountered: