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

Error when compiling: implicit declaration of function vasprintf #80

Closed
vidraj opened this issue Mar 30, 2024 · 2 comments
Closed

Error when compiling: implicit declaration of function vasprintf #80

vidraj opened this issue Mar 30, 2024 · 2 comments

Comments

@vidraj
Copy link

vidraj commented Mar 30, 2024

When compiling with -Werror=implicit-function-declaration (currently the default with modern compilers), synctex_parser.c fails to compile with

synctex_parser.c: In function '_synctex_updater_print_gz':
synctex_parser.c:8703:13: error: implicit declaration of function 'vasprintf'; did you mean 'vsprintf'? [-Werror=implicit-function-declaration]

This is due to a missing feature test macro – vasprintf is only exposed in stdio.h when _GNU_SOURCE is defined.

A fix for this error was already merged into the 2020 branch in pull request #39, but didn't make it to the other branches.

@jlaurens
Copy link
Owner

The actual branches are main for cutting edge development and 2024 for more stable features. Both seem to define _GNU_SOURCE.

@vidraj
Copy link
Author

vidraj commented Mar 30, 2024

OK, I didn't see it in the 2020.1 branch, which seemed to me like the one-version-newer. I thought I grepped for it in the main branch as well, but I must've messed up either the grepping or the branch checkouts – I apologize for that and thank you for the correction.

@vidraj vidraj closed this as completed Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants