[Xorp-hackers] Compiling xorp 1.8.3 for Debian using g++-4.6

Jose Manuel dos Santos Calhariz jose.spam at netvisao.pt
Tue Jul 26 02:23:03 PDT 2011


On Mon, Jul 25, 2011 at 11:25:04AM -0700, Ben Greear wrote:
> On 07/25/2011 10:07 AM, Ben Greear wrote:
> >On 07/25/2011 10:05 AM, Jose Manuel dos Santos Calhariz wrote:
> >>On Sun, Jul 24, 2011 at 11:02:34PM +0100, Jose Manuel dos Santos Calhariz wrote:
> >>>On Sat, Jul 23, 2011 at 10:28:52AM -0700, Ben Greear wrote:
> >>>>On 07/23/2011 06:27 AM, Jose Manuel dos Santos Calhariz wrote:
> >>>>>
> >>>>>I am packaging xorp 1.8.3 for Debian.  The default compiler is now g++
> >>>>>v4.6.  This compiler is more stricter than previous versions.
> >>>>>
> >>>>>This g++ have one new warnings:
> >>>>>
> >>>>>    -Wunused-but-set-variable
> >>>>>
> >>>>>This warning when used with -Werror causes a fail to build.  The
> >>>>>position on Debian is to fix the problems on the source code instead
> >>>>>of using the flag -Wno-error=unused-but-set-variable for disabling the
> >>>>>warning.
> >>>>>
> >>>>>I am asking if this problem is solved in the git repository or if will
> >>>>>be fixed in the near future.  Maybe this is a simple fix and is enough
> >>>>>to comment out the affected variables.
> >>>>
> >>>>Some may be solved in git, and if not, patches are welcome.
> >>>
> >>>Here goes a draft of the patches.  This page explains the warning and
> >>>how to solve it http://lists.fedoraproject.org/pipermail/devel/2011-February/148523.html
> >>>
> >>>For solving the errors, I have used various strategies:
> >>>
> >>>   - Looks to be old forgotten code, so I commented the variable
> >>>   definition.
> >>>
> >>>   - Variable and the the code looks to do nothing, so I
> >>>   commented everything.
> >>>
> >>>   - The variable is not used because of a #ifdef, so I put the
> >>>   same #ifdef around the variable.
> >>>
> >>>   - The variable is not used because of a macro, so I used
> >>>   "__attribute__((__unused__))" in the definition of it.
> >>>
> >>>   - The function that calculates the value of the variable may have
> >>>side effects, so I used "__attribute__((__unused__))"
> >>>
> >>>I am not familiar with the xorp code and my c++ skills are very rusty,
> >>>so most probably I missed something.  I looked into git hub, but the
> >>>code looked to be the same in the affected areas.
> >>>
> >>>In attach follows a tar file with the patches.  The resulting code
> >>>compiles, but I have not run the compiled binary.
> >>
> >>I missed a warning/error on file contrib/olsr/face_manager.cc.  Here
> >>goes an update to one of the patches.
> >
> >Thanks for these.  It will probably be a day or two before I can review
> >and apply them, but I'll try to get on it quickly.
> 
> Ok, I found some time...
> 
> I just pushed modified versions of these patches to github.  Please see
> if that builds for you, and if not, please send me the compile
> warnings/errors.

I have looked into your patches and updated my patches for xorp 1.8.3.
They are similar now.  My patches have more comments for
documentation.  For helping if someone else needs to updated the
Debian package before the next xorp release.

The xorp compiles and runs "scons check" with g++ 4.4 on Debian stable
and g++ 4.6 on unstable.

Thank you for your prompt review.

> 
> Thanks,
> Ben
> 
> 

     Jose Calhariz

-- 
--

Por trás de toda fortuna há um crime

--Honoré de Balzac



More information about the Xorp-hackers mailing list