Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 344663

Summary: media-libs/svgalib-1.9.25-r1 - svgalib-1.9.25/kernel/svgalib_helper/main.c:174: error: ‘inode’ redeclared as different kind of symbol
Product: Gentoo Linux Reporter: Rene Hertell <bugs.gentoo.org>
Component: [OLD] LibraryAssignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed>
Status: RESOLVED FIXED    
Severity: normal CC: bircoph, kiorky
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 405411    
Bug Blocks:    
Attachments: The build-log
The environmet
Working patch for svga-lib

Description Rene Hertell 2010-11-08 10:09:42 UTC
After a kernel-update to 2.6.35, and a moduls-rebuild rebuild, the media-libs/svgalib-1.9.25-r1 package fails to compile.

Attached (hopefully) all logs and info
Comment 1 Rene Hertell 2010-11-08 10:10:11 UTC
Portage 2.1.8.3 (default/linux/x86/10.0, gcc-4.3.4, glibc-2.11.2-r3, 2.6.32-gentoo-r7 i686)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.32-gentoo-r7-i686-VIA_Nehemiah-with-gentoo-2.0.1
Timestamp of tree: Sun, 07 Nov 2010 20:30:01 +0000
distcc 3.1 i686-pc-linux-gnu [disabled]
ccache version 2.4 [disabled]
app-shells/bash:     4.1_p7
dev-java/java-config: 2.1.11
dev-lang/python:     2.6.5-r3, 3.1.2-r4
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.3
sys-apps/sandbox:    2.3-r1
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.9.6-r2, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.3.4, 4.4.4-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.35
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=c3-2 -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/openvpn/easy-rsa"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=c3-2 -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,--as-needed"
LINGUAS="en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/amielke-overlay /var/lib/layman /usr/local/initng-portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3gp X a52 aac aalib acl acpi aio avi berkdb bigpatch bzip2 cccam cle266 cli cmdctrl cmdreccmdi18n cmdsubmenu cracklib crypt css cutterlimit cutterqueue cuttime cxx dbus ddepgentry deltimeshiftrec directfb divx4linux dolby-record-switch dolbyinrec dri dts dv dvb dvbplayer dvbsetup dvd dvdarchive dvdread dvlfriendlyfnames dvlrecscriptaddon dvlvidprefer enca exif faac fbcon ff-card ffmpeg ffmpeg12mc fortran freetype gdbm gif gpm hardlinkcutter iconv ieee1394 imagemagick imlib ipod iptv ipv6 java java6 jpeg jumpplay kernel-helper liemikuutio lirc lircsettings livebuffer lnbshare lzo mad mainmenuhooks matroska mmx modules mp3 mpeg mpeg4 mplayer mudflap ncurses nls nptl nptlonly ogg opengl openmp osdmaxitems pam pcre perl pinplugin png pppd projectx python quicktime readline rtc sdl session settime setup shutdown_rewrite slang sndfile softosd sortrecords sourcecaps sse ssl status submenu subtitles svg svga switchtimer syncearly sysfs tcpd theora tiff timercmd timerinfo truetype ttxtsubs type1 unichrome unicode usb v4l v4l2 validinput via vidix vorbis wareagleicon win32codecs x264 x86 xorg xrandr xv xvid xvmc yacoto yaepg yv12 zeroconf zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DVB_CARDS="tda10046 ttpci" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INITNG_PLUGINS="also bash_launcher chdir chroot conflict cpout critical ctrlaltdel daemon_clean debug_commands envparser find fmon fstat history idleprobe initctl interactive iparser last limit lockfile logfile netdev netprobe ngc4 ngcs nge pause provide reload renice rlparser simple_launcher stcmd stdout suid syncron syslog sysreq unneeded usplash" INPUT_DEVICES="lirc evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" LIRC_DEVICES="serial" PHP_TARGETS="php5-2" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="via" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Comment 2 Rene Hertell 2010-11-08 10:12:13 UTC
Created attachment 253607 [details]
The build-log
Comment 3 Rene Hertell 2010-11-08 10:13:26 UTC
I tried with this ebuild-patch, but it did not help:

http://bugs.gentoo.org/341393
Comment 4 Rene Hertell 2010-11-08 10:14:41 UTC
Created attachment 253609 [details]
The environmet
Comment 5 Peer 2010-11-09 12:28:38 UTC
I seem to have the same problem, though to me it seems to have come with GCC 4.4.4...

To me it seems that the code from main.c is broken here for kernels < 2.6.36 since inode is defined twice. The old GCC seem to have ignored it.

#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36) 
static int svgalib_helper_ioctl( struct inode *inode, struct file *filp, 
                          unsigned int cmd, unsigned long arg) {
#else
static int svgalib_helper_ioctl(struct file *filp, 
                          unsigned int cmd, unsigned long arg) {
#endif

    struct inode *inode=filp->f_dentry->d_inode;
Comment 6 Hendrik Lemelson 2010-11-11 10:52:53 UTC
I had the same issue and fixed it by moving the (re-)definition of *inode inside the ELSE-block:

#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36) 
static int svgalib_helper_ioctl( struct inode *inode, struct file *filp, 
                          unsigned int cmd, unsigned long arg) {
#else
static int svgalib_helper_ioctl(struct file *filp, 
                          unsigned int cmd, unsigned long arg) {
    struct inode *inode=filp->f_dentry->d_inode;  // <= the redefinition moved here
#endif

Now it compiles fine and as far as I understand the code, this should not be a problem as for the newer kernels, inode* is supplied as a parameter to the method anyway.

Hope this helps!

Best regards
Hendrik

 

Comment 7 Rene Hertell 2010-11-14 14:07:48 UTC
This fix proposed by Hendrik Lemelson worked! Thank you Hendrik!

I suggest that this solution should be used for fixing this issue
Comment 8 Rene Hertell 2010-11-20 11:41:57 UTC
Created attachment 254899 [details, diff]
Working patch for svga-lib

I hope someone could replace this patch to the main repository..

Thanks!
Comment 9 Pacho Ramos gentoo-dev 2012-02-23 11:37:33 UTC
Please go to bug 405411 and check its ebuild
Comment 10 Pacho Ramos gentoo-dev 2012-03-03 12:37:57 UTC
*svgalib-1.9.25-r2 (03 Mar 2012)

  03 Mar 2012; Pacho Ramos <pacho@gentoo.org>
  +files/svgalib-1.9.25-build2.patch,                                     
  +files/svgalib-1.9.25-fPIC.patch, +files/svgalib-1.9.25-linux2.6.36-r1.patch,
  +files/svgalib-1.9.25-segfault.patch, +svgalib-1.9.25-r2.ebuild:
  Respect LDFLAGS (bug #339873 by Andrew Savchenko), install svgalib_helper.h
  (bug #341393 by Andrew Savchenko), fix build with recent kernels (bug #344663
  by Rene Hertell), fix segfault (bug #402831 by O.Sezer).

Anyway, this package needs a maintainer to get things fixed sooner. I can be your proxy maintainer if you want:
http://www.gentoo.org/proj/en/qa/proxy-maintainers/index.xml