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

Configure test fails to add -std=gnu99 on Fedora Rawhide #78

Open
opoplawski opened this issue Oct 26, 2019 · 1 comment
Open

Configure test fails to add -std=gnu99 on Fedora Rawhide #78

opoplawski opened this issue Oct 26, 2019 · 1 comment

Comments

@opoplawski
Copy link

On Fedora Rawhide (F32) I'm seeing the following:

gcc -fPIC -g -O2  -pthread -fobjc-exceptions -fno-strict-aliasing -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -std=c99 -DHAVE_CONFIG_H -Wall  -I/builddir/build/BUILD/openvpn-auth-ldap-auth-ldap-2.0.4  -I/builddir/build/BUILD/openvpn-auth-ldap-auth-ldap-2.0.4 -c auth-ldap.m -o auth-ldap.o -I. -I../src -I.. -I../src -I. -I../tests -I../tests
In file included from ./TRVPNPlugin.h:46,
                 from auth-ldap.m:44:
./TRString.h:50:58: error: unknown type name 'va_list'
   50 | - (id) initWithFormat: (const char *) format arguments: (va_list) arguments;
      |                                                          ^~~~~~~

This can be fixed by adding -std=gnu99 which configure is adding on other versions. The configure check for ISO C99 "succeeds" on F32 with:

configure:2997: checking for gcc option to accept ISO C99
configure:3146: gcc  -c -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC  conftest.c >&5
conftest.c: In function 'test_varargs':
conftest.c:80:9: warning: variable 'fnumber' set but not used [-Wunused-but-set-variable]
   80 |   float fnumber;
      |         ^~~~~~~
conftest.c:79:7: warning: variable 'number' set but not used [-Wunused-but-set-variable]
   79 |   int number;
      |       ^~~~~~
conftest.c:78:15: warning: variable 'str' set but not used [-Wunused-but-set-variable]
   78 |   const char *str;
      |               ^~~
configure:3146: $? = 0
configure:3159: result: none needed

This is with gcc 9.2.1

@isundil
Copy link

isundil commented Feb 13, 2020

Same on archlinux

Linux version 5.5.2-arch1-1 (linux@archlinux) (gcc version 9.2.0 (GCC)) #1 SMP PREEMPT Tue, 04 Feb 2020 18:56:18 +0000

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