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

NLS not detected: implicit declaration in ./configure #66

Closed
dmacks opened this issue Sep 30, 2021 · 2 comments
Closed

NLS not detected: implicit declaration in ./configure #66

dmacks opened this issue Sep 30, 2021 · 2 comments

Comments

@dmacks
Copy link

dmacks commented Sep 30, 2021

Describe the bug
A fink user has reported that even when libintl and libiconv are available (via fink), neon's ./configure does not detect that i18n support is available. He's running OS X 10.15 (Xcode 12.4), which has -Werror-implicit-function-declaration by default. On older Xcode, it i18n is detected properly, but I can reproduce the non-detection by passing that -W via CFLAGS.

Environment

  • neon version: 0.32.1
  • OS: OS X 10.15

Debugging output
Compare config.log with that -Werror:

configure:17472: gcc -o conftest -Os -Werror-implicit-function-declaration  -MD -I/sw/include -no-cpp-precomp -I/sw/include -I/sw/include -I/sw/include/libxml2 -I/sw/include -Wl,-dead_strip_dylibs -L/sw/lib conftest.c  -lintl  -lz -L/sw/lib -lssl -lcrypto -dynamic -Wl,-search_paths_first -lkrb5 -L/sw/lib -lproxy -L/sw/lib -lxml2 >&5
conftest.c:120:1: error: implicit declaration of function 'bindtextdomain' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
bindtextdomain();
^
1 error generated.
configure:17472: $? = 1
[...]
configure:17502: result: not found

vs without:

configure:17472: gcc -o conftest -Os  -MD -I/sw/include -no-cpp-precomp -I/sw/include -I/sw/include -I/sw/include/libxml2 -I/sw/include -Wl,-dead_strip_dylibs -L/sw/lib conftest.c  -lintl  -lz -L/sw/lib -lssl -lcrypto -dynamic -Wl,-search_paths_first -lkrb5 -L/sw/lib -lproxy -L/sw/lib -lxml2 >&5
conftest.c:120:1: warning: implicit declaration of function 'bindtextdomain' is invalid in C99 [-Wimplicit-function-declaration]
bindtextdomain();
^
1 warning generated.
configure:17472: $? = 0
configure:17502: result: -lintl

This is another case like #45, and the same type of solution works: putting in neon.m4's NE_SEARCH_LIBS:

    bindtextdomain)
      ne__prologue="#include <libintl.h>"                                       
      ne__code="bindtextdomain(\"\",\"\");"
      ;;
dmacks added a commit to fink/fink-distributions that referenced this issue Sep 30, 2021
@dmacks
Copy link
Author

dmacks commented Sep 30, 2021

@notroj notroj closed this as completed in ddd05ba Oct 4, 2021
@notroj
Copy link
Owner

notroj commented Oct 4, 2021

Thanks for the patch, merged.

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