Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 68745 - Can't compile (error) rsbac-dev-sources-2.6.7-r6 with GCC-3.4.2
Summary: Can't compile (error) rsbac-dev-sources-2.6.7-r6 with GCC-3.4.2
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Guillaume Destuynder (RETIRED)
URL:
Whiteboard:
Keywords:
: 68744 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-10-24 13:54 UTC by Rumen Yotov
Modified: 2004-11-06 07:27 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rumen Yotov 2004-10-24 13:54:09 UTC
Hi,
Had successfully compiled rsbav-dev-sources till 2.6.7-r3 version (GCC-3.3.4).
Now tring to compile 2.6.7-r6. Compile breaks on rsbac code.
Just to verify where it breaks, disabled all PaX and RSBAC - compiles OK, added PaX - again compiles OK. Added rsbac-default config - again error (even more in ADF - can't switch this off, core of rsbac IMO).
Done all this using GCC-3.4.2-r2 with vanilla spec (not hardened), as not to include hardened gcc problems.
PS: could try with hardened-GCC but don't expect much success.
Thanks
Rumen

error logs:
...SKIP...
  CC      rsbac/adf/reg/reg_main.o
  LD      rsbac/adf/reg/built-in.o
  CC [M]  rsbac/adf/reg/reg_sample1.o
  CC [M]  rsbac/adf/reg/reg_sample3.o
  CC [M]  rsbac/adf/reg/kproc_hide.o
In file included from rsbac/adf/reg/kproc_hide.c:21:
include/linux/file.h:36: error: conflicting types for '__fput'
include/rsbac/fs.h:36: error: previous declaration of '__fput' was here
include/linux/file.h:36: error: conflicting types for '__fput'
include/rsbac/fs.h:36: error: previous declaration of '__fput' was here
make[3]: *** [rsbac/adf/reg/kproc_hide.o] Error 1
make[2]: *** [rsbac/adf/reg] Error 2
make[1]: *** [rsbac/adf] Error 2
make: *** [rsbac] Error 2
...END...


Reproducible: Always
Steps to Reproduce:
1.
2.
3.




Gentoo Base System version 1.5.3
Portage 2.0.51-r2 (default-linux/x86/2004.2/gcc34/2.6, gcc-vanilla,
glibc-2.3.4.20041006-r0, 2.6.7-hardened-r9 i686)
=================================================================
System uname: 2.6.7-hardened-r9 i686 AMD Athlon(tm) XP 2200+
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.15.92.0.2-r1
Headers:  sys-kernel/linux26-headers-2.6.8.1-r1
Libtools: sys-devel/libtool-1.5.2-r5
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=i686 -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config
/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/ /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=i686 -O2 -pipe -fomit-frame-pointer"
DISTDIR="/var/portage/distfiles"
FEATURES="autoaddcvs ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="http://gentoo.itdnet.net/gentoo
http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/
http://ftp.easynet.nl/mirror/gentoo/ http://gentoo.oregonstate.edu
http://ftp.snt.utwente.nl/pub/os/linux/gentoo"
MAKEOPTS="-j2"
PKGDIR="/var/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/var/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://gentoo.internet-bg.net/gentoo-portage"
USE="3dnow X X509 aalib acl acpi apache2 avi berkdb bitmap-fonts bonobo caps cdr
chroot clamav crypt cups curl dedicated directfb dvd dvdr encode esd evo f77 fam
ffmpeg flac foomaticdb freetype gd gdbm gif gnome gpm gstreamer gtk gtk2 gtkhtml
guile hardened hardenedphp imagemagick imap imlib ipv6 java javascript jpeg
junit kde ldap libg++ libwww mad maildir matroska mikmod mmx motif mozilla mpeg
mpeg4 mysql ncurses nls nvidia oggvorbis opengl oss pam pdflib perl png postgres
ppds prelude python qt quicktime readline samba sdl skey slang speex spell sse
ssl svg svga tcltk tcpd tetex theora tiff transcode truetype unicode usb x86 xml
xml2 xmms xprint xv xvid zlib linguas_bg linguas_en"
Comment 1 Guillaume Destuynder (RETIRED) gentoo-dev 2004-10-25 07:15:00 UTC
Tested again and it compiles fine on my own box:
gcc version 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)
rsbac-dev-sources-2.6.7-r6


Please make sure that your current kernel is symlinked to /usr/src/linux (and not the old one), and do "make mrproper ; make menuconfig (select options if you want and save configuration, i tried all defaults); make"
Comment 2 Rumen Yotov 2004-10-25 13:49:35 UTC
Hi,
Done some patching and compiling. No positive results so far.
Notes: after compile error - backup .config; do make mrproper; restore .config; make menuconfig; make (next try). linux symlink point to linux-2.6.7-rsbac-r6 dir.
Steps:
1.Compile with GCC-3.3.4 - can't emerge old gcc - skip go on;
2.patch with kproc_hide.c.diff patch - compile error see below:
...BEGIN...
  CC      rsbac/adf/pax/pax_main.o
  LD      rsbac/adf/pax/built-in.o
  CC      rsbac/adf/rc/rc_syscalls.o
  CC      rsbac/adf/rc/rc_main.o
  LD      rsbac/adf/rc/built-in.o
  CC      rsbac/adf/reg/reg_main.o
  LD      rsbac/adf/reg/built-in.o
  CC      rsbac/adf/res/res_main.o
  LD      rsbac/adf/res/built-in.o
  LD      rsbac/adf/built-in.o
  CC      rsbac/data_structures/aci_data_structures.o
  CC      rsbac/data_structures/gen_lists.o
  CC      rsbac/data_structures/rc_data_structures.o
In file included from rsbac/data_structures/rc_data_structures.c:22:
include/rsbac/fs.h:37: error: conflicting types for '__fput'
include/linux/file.h:36: error: previous declaration of '__fput' was here
include/rsbac/fs.h:37: error: conflicting types for '__fput'
include/linux/file.h:36: error: previous declaration of '__fput' was here
rsbac/data_structures/rc_data_structures.c: In function `stats_rc_proc_info':
rsbac/data_structures/rc_data_structures.c:149: warning: the address of `rsbac_is_initialized', will 
always evaluate as `true'
rsbac/data_structures/rc_data_structures.c: In function `rsbac_stats_rc':
rsbac/data_structures/rc_data_structures.c:1543: warning: the address of `rsbac_is_initialized', will 
always evaluate as `true'
make[2]: *** [rsbac/data_structures/rc_data_structures.o] Error 1
make[1]: *** [rsbac/data_structures] Error 2
make: *** [rsbac] Error 2
...END...
2.Disable sample-reg in rsbac-config: error again;
3.Restore fs.h file: error;
4.Restore kproc_hide.c file include order: error;
...SKIP...
  CC      rsbac/adf/res/res_main.o
  LD      rsbac/adf/res/built-in.o
  LD      rsbac/adf/built-in.o
  CC      rsbac/data_structures/aci_data_structures.o
  CC      rsbac/data_structures/gen_lists.o
  CC      rsbac/data_structures/rc_data_structures.o
In file included from rsbac/data_structures/rc_data_structures.c:22:
include/rsbac/fs.h:36: error: conflicting types for '__fput'
include/linux/file.h:36: error: previous declaration of '__fput' was here
include/rsbac/fs.h:36: error: conflicting types for '__fput'
include/linux/file.h:36: error: previous declaration of '__fput' was here
rsbac/data_structures/rc_data_structures.c: In function `stats_rc_proc_info':
rsbac/data_structures/rc_data_structures.c:149: warning: the address of `rsbac_is_initialized', will 
always evaluate as `true'
rsbac/data_structures/rc_data_structures.c: In function `rsbac_stats_rc':
rsbac/data_structures/rc_data_structures.c:1543: warning: the address of `rsbac_is_initialized', will 
always evaluate as `true'
make[2]: *** [rsbac/data_structures/rc_data_structures.o] Error 1
make[1]: *** [rsbac/data_structures] Error 2
make: *** [rsbac] Error 2
..END...
5.Finally switch GCC-spec to vanilla - same error.
It's getting late so that's all for now.
Rumen
Comment 3 Guillaume Destuynder (RETIRED) gentoo-dev 2004-10-25 16:15:46 UTC
Ok tried with GCC3.4
Here's how to fix it:
Edit include/rsbac/aci.h
Go to line 42
remove the word "inline"
save, compile, it should work.

I'll include a patch for the next revision if everything is fine for you
Comment 4 Rumen Yotov 2004-10-26 10:26:18 UTC
Hi,
Following comment #3 suggestion changed (removed inline) from line#42 of aci.h file.
Rest of code is unchanged, first step - no previous patch applied.
make mrproper; copy .config; make menuconfig; make - error Uhh :-/
Gives first error (kproc_hide.c) - OK applied kproc_hide.c.diff patch from AO.
cleanup again
make ... - error:
...SKIP...
  CC      rsbac/adf/res/res_main.o
  LD      rsbac/adf/res/built-in.o
  LD      rsbac/adf/built-in.o
  CC      rsbac/data_structures/aci_data_structures.o
include/rsbac/aci.h:42: warning: 'rsbac_is_initialized' declared inline
after being called
include/rsbac/aci.h:42: warning: previous declaration of
'rsbac_is_initialized' was here
  CC      rsbac/data_structures/gen_lists.o
  CC      rsbac/data_structures/rc_data_structures.o
In file included from rsbac/data_structures/rc_data_structures.c:22:
include/rsbac/fs.h:37: error: conflicting types for '__fput'
include/linux/file.h:36: error: previous declaration of '__fput' was
here
include/rsbac/fs.h:37: error: conflicting types for '__fput'
include/linux/file.h:36: error: previous declaration of '__fput' was
here
rsbac/data_structures/rc_data_structures.c: In function
`stats_rc_proc_info':
rsbac/data_structures/rc_data_structures.c:149: warning: the address of
`rsbac_is_initialized', will always evaluate as `true'
rsbac/data_structures/rc_data_structures.c: In function
`rsbac_stats_rc':
rsbac/data_structures/rc_data_structures.c:1543: warning: the address of
`rsbac_is_initialized', will always evaluate as `true'
make[2]: *** [rsbac/data_structures/rc_data_structures.o] Error 1
make[1]: *** [rsbac/data_structures] Error 2
make: *** [rsbac] Error 2
...END...
Looking from the messages the program where function:
boolean rsbac_is_initialized(void) is assuming it's an inline function so the error.
Must be while making aci_data_structures.o file, which includes #include aci.h file. But inside aco_data_structures.h file there isn't any reference to rsbac_is_initialized function, logically it's somewhere in the include files after aci.h, even more no rsbac_data_structures.c file present.
This is where i'm now, if something new comes out i'll post.
PS: done all this w/ hardened-GCC but think this doesn't make difference. What's more there are two aci.h include files - the other one is in the kernel code under /sound/oss/aci.h and aci.c files.
May should wait for rsbac-2.6.9 and try again.
Thanks again.
Rumen
Comment 5 Guillaume Destuynder (RETIRED) gentoo-dev 2004-10-26 17:00:58 UTC
According to the error you are showing, the inline keyword hasn't been removed. Double check the header file as in comment#3, else i will make u a patch tomorrow, or probably simply patch the 2.6.7 ebuild. (afaik the fix worked for other people than me)
Comment 6 Rumen Yotov 2004-10-31 22:09:42 UTC
Hi,
Finally compiled that kernel. Seems most problems are due to stricter language checking in GCC-3.4.x.
I my case removing 'inline' didn't have such effect as the following:
1.In the kproc_hide.diff patch see below
...BEGIN...
--- linux-2.6.9-rsbac-v1.2.3/include/rsbac/fs.h	(revision 46)
+++ linux-2.6.9-rsbac-v1.2.3/include/rsbac/fs.h	(working copy)
@@ -33,7 +33,9 @@
 
 struct super_block * rsbac_get_super_block(kdev_t kdev);
 
+#ifndef __fput
 extern void __fput(struct file *);
+#endif
 
 #ifndef SHM_FS_MAGIC
 #define SHM_FS_MAGIC 0x02011994
Index: linux-2.6.9-rsbac-v1.2.3/rsbac/adf/reg/kproc_hide.c
...END...
While in include/linux/file.h __fput is:extern void FASTCALL(__fput(struct file *));
GCC gives an error on this diff.
So only changed/added FASTCALL and even w/o removing 'inline' kernel compiled.
2.Later also removed 'inline' and recompiled all OK.
This patch is from 'ao' from rsbac-ML.
Solved for me so far.
Thanks
Rumen
Comment 7 Rumen Yotov 2004-11-06 07:16:18 UTC
Think this bug is fixed.
Rumen
Comment 8 Rumen Yotov 2004-11-06 07:27:44 UTC
*** Bug 68744 has been marked as a duplicate of this bug. ***