Skip to content
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

Fix warning due to the 'utime' function not being declared in newlib. #17

Open
wants to merge 1 commit into
base: staging
Choose a base branch
from

Conversation

Raphalex46
Copy link

This PR is part of the Unikraft Lyon Hackathon.

This warning occured while building app-sqlite :

/home/ubuntu/challenges/sqlite-warnings/apps/app-sqlite/build/libsqlite/origin/sqlite-amalgamation-3300100/sqlite3.c: In function ‘dotlockLock’:
/home/ubuntu/challenges/sqlite-warnings/apps/app-sqlite/build/libsqlite/origin/sqlite-amalgamation-3300100/sqlite3.c:34975:5: warning: implicit declaration of function ‘utime’; did you mean ‘utimes’? [-Wimplicit-function-declaration]
34975 |     utime(zLockFile, NULL);
      |     ^~~~~
      |     utimes

This is apparently due to the fact that lib-sqlite relies on lib-newlib and not on nolibc, and the utime function is not declared correctly in newlib, even though lib-sqlite clearly defines the HAVE_UTIME macro.

Copy link

@ChatrusMagnus ChatrusMagnus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to reproduce the bug and the changes remooved the warning. The code passed the Consistency test. After having added the utime.h the build slows down and freezes for a bit at the same point where there was the warning. But it works and maybe it's just normal that the build slows down in that point.
Reviewed-by: Federico [email protected]

@razvand razvand self-assigned this Oct 21, 2022
@StefanJum
Copy link
Member

@Raphalex46 hi, thank you for this.
I was not able to reproduce the warning, Did you build nginx with everything on the staging branch (unikraft core, lib-nginx, lib-pthread-embedded, lib-lwip and lib-newlib)?

@Raphalex46
Copy link
Author

@StefanJum Hi,

I'm sorry but I really can't tell you, this was done a while ago for the Unikraft hackathon and I really don't remember the exact setup at the time, and I can't really test this at the moment either.

@StefanJum
Copy link
Member

@StefanJum Hi,

I'm sorry but I really can't tell you, this was done a while ago for the Unikraft hackathon and I really don't remember the exact setup at the time, and I can't really test this at the moment either.

It's fine, don't worry. I will keep looking at different setups to see if the warning pops up. If you remember anything at any time let me know.

@razvand razvand added the enhancement New feature or request label Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

4 participants