[Xorp-hackers] Unable to compile on Gentoo stage3 x86 virtual machine

David Davidson ddavidson72 at gmx.com
Wed Mar 21 15:44:21 PDT 2012


Hi,

 Thank you so much for your work and dedication to the XORP project! I am so pleased with this work and I wanted to say that I think it's the best routing software one can get in the free world, and it rivals commercial routing in a big way, hands-down. My hat is off to those developers and maintainers that are supporting this project and again, many kind thanks for working on this exciting project.

 I am hoping that somebody will be able to give me some help or point me in the right direction to get a problem fixed that I am seeing. I am trying to get XORP v.1.8.5 compiled on a recent Gentoo GNU/Linux virtual machine instance but I am unable to get it compiled. I am running the following command from the root of the source release:


 scons prefix=/usr sysconfdir=/etc/xorp localstatedir=/var/lib/xorp


 I am getting the following error message and then compilation terminates:

 ################################################
 g++ -o obj/i686-pc-linux-gnu/policy/backend/lex.yy_policy_backend_parser.os -c -O2 -g3 -Werror -W -Wall -Wwrite-strings -Wcast-qual -Wpointer-arith -Wcast-align -Woverloaded-virtual -ftemplate-depth-25 -pipe -DXORP_BUILDINFO -fPIC -DXRL_PF=120 -DXORP_VERSION=1.8.5 -Iobj/i686-pc-linux-gnu -I. -I. policy/backend/lex.yy_policy_backend_parser.cc
 cc1plus: warnings being treated as errors
 backend.l: In function 'int yy_policy_backend_parserlex()':
 backend.l:96:5: error: ignoring return value of 'size_t fwrite(const void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result
 scons: *** [obj/i686-pc-linux-gnu/policy/backend/lex.yy_policy_backend_parser.os] Error 1
 scons: building terminated because of errors.
 ################################################


 Please notice that this seems to be a warning and because the compiler is set to treat warnings as errors, the compile fails. If I manually hack the SConstruct and remove the -Werror flags manually, then the compilation succeeds.

 I have done some extensive looking for resolving the "fwrite" warnings / errors but I have not been able to come up with a solution and I am hoping somebody could help point me in the right direction or maybe give me some kind of patch that I could keep for myself that would allow this to succeed.

 I have also tried this with the GIT clone and I end up with the same result.

 So here are a few more notes:

 1. This is Gentoo GNU/Linux installed from the x86 stage3 tarball from 3/13/2012. The file is: stage3-i686-20120313.tar.bz2
 2. This is a deblobed kernel! I have set the "deblob" use flag which applies the deblob scripting against the kernel tree. This removes non-free firmware from the kernel tree.
 3. This is kernel version "kernel-3.2.1-gentoo-r2-libre" and where libre is appended because of the deblob.
 4. The uname is as follows:
 Linux XORP9000 3.2.1-gentoo-r2-libre #1 SMP Tue Mar 20 23:59:55 Local time zone must be set--see zic i686 Pentium(R) Dual-Core CPU E6700 @ 3.20GHz GenuineIntel GNU/Linux
 5. The GCC version is: gcc (Gentoo 4.5.3-r2 p1.1, pie-0.4.7) 4.5.3
 6. Last but not least, I should mention that this is an x86 fully virtualized virtual machine running under Xen hvmloader emulation (this is NOT paravirtualized).


 When I compiled this kernel, I also receive a warning concerning the value of "fwrite" and the attribute "warn_unused_result" but the kernel compile succeeds without any problems because this is only treated as a warning.

 The output of the kernel warning is as follows; this is seen after running "make menuconfig" on this source tree:
 ################################################
 HOSTCC scripts/kconfig/lxdialog/menubox.o
 HOSTCC scripts/kconfig/lxdialog/textbox.o
 HOSTCC scripts/kconfig/lxdialog/util.o
 HOSTCC scripts/kconfig/lxdialog/yesno.o
 HOSTCC scripts/kconfig/mconf.o
 HOSTCC scripts/kconfig/zconf.tab.o
 scripts/kconfig/zconf.tab.c: In function 'header_print_comment':
 scripts/kconfig/confdata.c:540:10: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result
 scripts/kconfig/zconf.tab.c: In function 'kconfig_print_comment':
 scripts/kconfig/confdata.c:467:10: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result
 HOSTLD scripts/kconfig/mconf
 scripts/kconfig/mconf Kconfig
 #
 # configuration written to .config
 #
 ################################################

 Here again, despite the warning, the kernel compile succeeds and this kernel seems to work great. Even if I decide not to use the deblobing, I still see this fwrite warning, but again, the kernel compile succeeds without any problems.

 Some googling on this turns up that this might be a compiler flag problem, but others turn up patches for various different softwares. I am not certain which way to go about fixing it, and I am certainly not a developer, nor am I a compiler expert, so I am hoping that somebody with a little more expertise can point me in the right direction and help me to know what I should do to go about getting this to succeed without hacking up the SConstruct and disabling the warnings being treated as errors. I worry that there might be something else that I would be missing by not stopping on perhaps other warnings.

 Other websites suggest that this is a dependencies problem for other different softwares, but I think that I have everything I need to get XORP running.

 In the end, I plan on using this image on a GNS3 QEMU guest for networking labs. I know that there might already be images out there that will do this, but I want my own home-grown one for me, and then I want to run it under Gentoo GNU/Linux.

 Using the GIT tree, [git clone git://github.com/greearb/xorp.ct.git], I still get the same error message. I have attached the build log from the command:

 scons prefix=/usr sysconfdir=/etc/xorp localstatedir=/var/lib/xorp 2>&1 | tee build.log

 Please let me know your thoughts on this. I really appreciate your help and thoughts about this.

 Thank you again for working on and developing XORP! I really love this project and wanted to say thank you again for this exciting work. This is really a breath of fresh air, a wonderful blessing and a much better alternative and choice instead of using commercial routing platforms. I have been using XORP for a few years and I am really pleased with it and want to thank you again for your work and commitment with this software. Many kind thanks again!




 Best Regards,


 David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20120321/523094f8/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gentoo_compile_problem_build.log
Type: application/octet-stream
Size: 240496 bytes
Desc: Attachment: gentoo_compile_problem_build.log
Url : http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20120321/523094f8/attachment-0001.obj 


More information about the Xorp-hackers mailing list