openl2tp.org
http://forums.openl2tp.org/

l2tp_config_parse.c:270: Error: expected identifier before
http://forums.openl2tp.org/viewtopic.php?f=3&t=11
Page 1 of 1

Author:  DemoN [ Thu Jan 29, 2009 10:41 am ]
Post subject:  l2tp_config_parse.c:270: Error: expected identifier before

Hello.

I have a problem with `make` openl2tp-1.6 from source:

Code:
l2tp_config_parse.c:270: error: expected identifier before numeric constant
make: *** [l2tp_config_parse.o] Error 1

Code:
# gcc -v
i686-pc-linux-gnu
Conf: /var/tmp/portage/sys-devel/gcc-4.3.3/work/gcc-4.3.3/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.3.3 --includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.3.3/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.3.3 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.3.3/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.3.3/info --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.3.3/include/g++-v4 --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec --disable-fixed-point --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --enable-secureplt --disable-multilib --enable-libmudflap --disable-libssp --enable-libgomp --enable-cld --disable-libgcj --with-arch=i686 --enable-languages=c,c++,treelang,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.3.3 p1.0, pie-10.1.5'
posix
gcc version 4.3.3 (Gentoo 4.3.3 p1.0, pie-10.1.5)

Code:
# uname -a
Linux funny 2.6.25-gentoo-r1 #6 SMP Wed Sep 24 18:42:36 MSD 2008 i686 AMD Sempron(tm) Processor 3200+ AuthenticAMD GNU/Linux

Code:
[ebuild   R   ] net-dialup/ppp-2.4.4-r21  USE="pam radius -activefilter -atm -dhcp -eap-tls -gtk -ipv6 -mppe-mppc"


Code:
grep -r AUTH_NONE /usr/include/*
/usr/include/cups/http.h:  HTTP_AUTH_NONE,                      /* No authentication in use */
/usr/include/curl/curl.h:#define CURLAUTH_NONE         0       /* nothing */
/usr/include/curl/curl.h:#define CURLSSH_AUTH_NONE      0      /* none allowed, silly but complete */
/usr/include/gssrpc/auth.h:#define AUTH_NONE    0               /* no authentication */
/usr/include/libnet/libnet-headers.h:#define LIBNET_VRRP_AUTH_NONE   0x1
/usr/include/linux/ncp_fs.h:#define NCP_AUTH_NONE       0x00
/usr/include/pwdb/radius.h:#define PW_AUTH_NONE                 0
/usr/include/rpc/auth.h:#define AUTH_NONE       0               /* no authentication */


If I commented line #270 in `l2tp_config_parse.c`
Code:
     ...
     AUTH_EAP = 394,
     //AUTH_NONE = 395,
     AUTH_PEER = 396,
    ...

`make` finished successfully. :roll:

What's wrong?

Thanks.

Author:  jchapman [ Sat Feb 07, 2009 11:13 pm ]
Post subject:  Re: l2tp_config_parse.c:270: Error: expected identifier before

DemoN wrote:
Hello.

I have a problem with `make` openl2tp-1.6 from source:

Code:
l2tp_config_parse.c:270: error: expected identifier before numeric constant
make: *** [l2tp_config_parse.o] Error 1

Code:
# gcc -v
i686-pc-linux-gnu
Conf: /var/tmp/portage/sys-devel/gcc-4.3.3/work/gcc-4.3.3/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.3.3 --includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.3.3/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.3.3 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.3.3/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.3.3/info --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.3.3/include/g++-v4 --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec --disable-fixed-point --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --enable-secureplt --disable-multilib --enable-libmudflap --disable-libssp --enable-libgomp --enable-cld --disable-libgcj --with-arch=i686 --enable-languages=c,c++,treelang,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.3.3 p1.0, pie-10.1.5'
posix
gcc version 4.3.3 (Gentoo 4.3.3 p1.0, pie-10.1.5)

Code:
# uname -a
Linux funny 2.6.25-gentoo-r1 #6 SMP Wed Sep 24 18:42:36 MSD 2008 i686 AMD Sempron(tm) Processor 3200+ AuthenticAMD GNU/Linux

Code:
[ebuild   R   ] net-dialup/ppp-2.4.4-r21  USE="pam radius -activefilter -atm -dhcp -eap-tls -gtk -ipv6 -mppe-mppc"


Code:
grep -r AUTH_NONE /usr/include/*
/usr/include/cups/http.h:  HTTP_AUTH_NONE,                      /* No authentication in use */
/usr/include/curl/curl.h:#define CURLAUTH_NONE         0       /* nothing */
/usr/include/curl/curl.h:#define CURLSSH_AUTH_NONE      0      /* none allowed, silly but complete */
/usr/include/gssrpc/auth.h:#define AUTH_NONE    0               /* no authentication */
/usr/include/libnet/libnet-headers.h:#define LIBNET_VRRP_AUTH_NONE   0x1
/usr/include/linux/ncp_fs.h:#define NCP_AUTH_NONE       0x00
/usr/include/pwdb/radius.h:#define PW_AUTH_NONE                 0
/usr/include/rpc/auth.h:#define AUTH_NONE       0               /* no authentication */


If I commented line #270 in `l2tp_config_parse.c`
Code:
     ...
     AUTH_EAP = 394,
     //AUTH_NONE = 395,
     AUTH_PEER = 396,
    ...

`make` finished successfully. :roll:

What's wrong?

Thanks.

Looks like a name clash. AUTH_NONE is defined in /usr/include/rpc/auth.h on your system. Can the include of rpc/auth.h be avoided somehow?

Author:  DemoN [ Sun Feb 08, 2009 3:57 pm ]
Post subject:  Re: l2tp_config_parse.c:270: Error: expected identifier before

I made small patch :)
Code:
# diff -u openl2tp-1.6/l2tp_config_parse.c openl2tp-1.6.patched/l2tp_config_parse.c
--- openl2tp-1.6/l2tp_config_parse.c    2009-02-08 17:35:24.000000000 +0300
+++ openl2tp-1.6.patched/l2tp_config_parse.c    2009-01-29 14:09:34.000000000 +0300
@@ -126,6 +126,9 @@

/* Tokens.  */
#ifndef YYTOKENTYPE
+#ifdef AUTH_NONE
+# undef AUTH_NONE
+#endif
# define YYTOKENTYPE
    /* Put the tokens into the symbol table, so that GDB and other debuggers
       know about them.  */

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/