You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Netatalk 3.1.16 fails to build on el7 due to missing c99 cflag:
/bin/sh ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../include -I../.. -D_U_="__attribute__((unused))" -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -c -o libacl_la-ldap_config.lo `test -f 'ldap_config.c' || echo './'`ldap_config.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../include -I../.. "-D_U_=__attribute__((unused))" -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -c ldap_config.c -fPIC -DPIC -o .libs/libacl_la-ldap_config.o
ldap_config.c: In function 'acl_ldap_freeconfig':
ldap_config.c:35:5: error: 'for' loop initial declarations are only allowed in C99 mode
for (int i = 0; ldap_prefs[i].name != NULL; i++) {
^
ldap_config.c:35:5: note: use option -std=c99 or -std=gnu99 to compile your code
make[3]: *** [libacl_la-ldap_config.lo] Error 1
make[3]: Leaving directory `/builddir/build/BUILD/netatalk-3.1.16/libatalk/acl'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/builddir/build/BUILD/netatalk-3.1.16/libatalk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/builddir/build/BUILD/netatalk-3.1.16'
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.C4y0fy (%build)
I am working around this in EPEL by forcing -gnu99 in the rpm specfile.
Since el7 is such an old distro, I'm not necessarily arguing for an upstream fix. This is more of an FYI, if the maintainers wish to do anything about it.
The text was updated successfully, but these errors were encountered:
Thanks for reporting! I'm all for making the code more portable within reason.
ldap_config.c:35:5: error: 'for' loop initial declarations are only allowed in C99 mode
for (int i = 0; ldap_prefs[i].name != NULL; i++) {
^
Seems to be as simple as declaring int i; before using it. That's what the subsequent function in this file does. I assume this would make the EL7 compiler happy?
Netatalk 3.1.16 fails to build on el7 due to missing c99 cflag:
I am working around this in EPEL by forcing -gnu99 in the rpm specfile.
Since el7 is such an old distro, I'm not necessarily arguing for an upstream fix. This is more of an FYI, if the maintainers wish to do anything about it.
The text was updated successfully, but these errors were encountered: