It is currently Sat Dec 15, 2018 6:59 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: compilation on Debian Wheezy
PostPosted: Tue Feb 14, 2012 4:47 pm 

Joined: Tue Oct 19, 2010 12:01 pm
Posts: 27
Hi,

openl2tp fails to compile on Debian Wheezy (gcc 4.6).

I get the following errors
Code:
usl_timer.c: In function `usl_timer_tick`:
usl_timer.c:91:6: error: variable `result` set but not used [-Werror=unused-but-set-variable]
usl_timer.c: In function `usl_timer_tick_handler`:
usl_timer.c:115:6: error: variable `result` set but not used [-Werror=unused-but-set-variable]
l2tp_tunnel.c: In function `l2tp_tunnel_check_for_peer_collision`:
l2tp_tunnel.c:1949:20: error: variable `peer` set but not used [-Werror=unused-but-set-variable]

The first 2 errors can be ignored by adding -Wno-unused to CFLAGS= in ./usl/Makefile
The last error can be ignored by adding -Wno-unused to CFLAGS= in ./Makefile
After these changes the package compiles fine. I'm not sure if these are appropriate fixes; they're a hack I use because I don't know how to fix them otherwise.


Top
 Profile  
 
 Post subject: Re: compilation on Debian Wheezy
PostPosted: Sun Feb 19, 2012 1:38 pm 
Site Admin

Joined: Sun Jul 27, 2008 1:39 pm
Posts: 122
FrankL wrote:
Hi,

openl2tp fails to compile on Debian Wheezy (gcc 4.6).

I get the following errors
Code:
usl_timer.c: In function `usl_timer_tick`:
usl_timer.c:91:6: error: variable `result` set but not used [-Werror=unused-but-set-variable]
usl_timer.c: In function `usl_timer_tick_handler`:
usl_timer.c:115:6: error: variable `result` set but not used [-Werror=unused-but-set-variable]
l2tp_tunnel.c: In function `l2tp_tunnel_check_for_peer_collision`:
l2tp_tunnel.c:1949:20: error: variable `peer` set but not used [-Werror=unused-but-set-variable]

The first 2 errors can be ignored by adding -Wno-unused to CFLAGS= in ./usl/Makefile
The last error can be ignored by adding -Wno-unused to CFLAGS= in ./Makefile
After these changes the package compiles fine. I'm not sure if these are appropriate fixes; they're a hack I use because I don't know how to fix them otherwise.

Thanks for the heads up, Frank. Your workaround is fine. The compile error comes about because we compile OpenL2TP treating compiler warnings as errors (deliberately). Gcc 4.6 is doing more checks about unused variables. We'll fix the code to prevent these warnings.


Top
 Profile  
 
 Post subject: Re: compilation on Debian Wheezy
PostPosted: Mon Apr 23, 2012 11:56 pm 

Joined: Tue Oct 19, 2010 12:01 pm
Posts: 27
I've noticed that with the current version of Debian Wheezy, the provided init.d script no longer results in the l2tp_ppp kernel module being loaded.

I've narrowed it down to commenting out the line exporting modprobe options
Code:
if [ "x$VERBOSE" = "xno" ]; then
    MODPROBE_OPTIONS="$MODPROBE_OPTIONS -q"
#    export MODPROBE_OPTIONS
fi


I've got no idea why, but this fixes the problem on my machine.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group