Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 68087 - Totem >= 0.99.18 won't compile without commenting out netinet/in.h lines
Summary: Totem >= 0.99.18 won't compile without commenting out netinet/in.h lines
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
: 72039 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-10-18 19:13 UTC by aethyr
Modified: 2005-01-22 08:44 UTC (History)
8 users (show)

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


Attachments
This patch moved the include of "linux/cdrom.h" and fixes the problem for me. (totem-0.100-cdrom_include.patch,413 bytes, patch)
2005-01-10 04:08 UTC, Magnus Damm
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description aethyr 2004-10-18 19:13:54 UTC
Totem versions newer than 0.99.17 include a new src/totem-disc.c file used in media detection.  This file has an #include <libgnomevfs/gnome-vfs.h> which is present in other files in totem < 0.99.18, but has never given me a problem before.  Here's the error:


gcc -DHAVE_CONFIG_H -I. -I. -I.. -D_REENTRANT                                  -
DORBIT2=1 -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/in
clude/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/atk
-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/libgnomeui
-2.0 -I/usr/include/libgnome-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/includ
e/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/libbonoboui-2.0 -I/usr/includ
e/orbit-2.0 -I/usr/include/libbonobo-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib
/gnome-vfs-2.0/include -I/usr/include/bonobo-activation-2.0 -I/usr/include/libxm
l2 -I/usr/include/libglade-2.0 -I/usr/include/gnome-vfs-module-2.0 -I/usr/includ
e/gnome-desktop-2.0 -I/usr/include/startup-notification-1.0 -I/usr/include/libna
utilus-burn                                                                    -
DGNOMELOCALEDIR=\""/usr/local/share/locale"\"           -DGCONF_PREFIX=\""/apps/
totem"\"                        -DDATADIR=\""/usr/local/share"\"               -
DLIBDIR=\""/usr/local/lib"\"                            -DLOGO_PATH=DATADIR\"\"G
_DIR_SEPARATOR_S\"totem\"G_DIR_SEPARATOR_S\"totem_logo.png\"    -Wall   -Wchar-s
ubscripts -Wmissing-declarations -Wmissing-prototypes   -Wnested-externs -Wpoint
er-arith        -Wcast-align -Wsign-compare     -fno-strict-aliasing    -I/usr/X
11R6/include -g -O2 -c totem-disc.c
In file included from /usr/include/netdb.h:28,
                 from /usr/include/gnome-vfs-2.0/libgnomevfs/gnome-vfs-address.h
:31,
                 from /usr/include/gnome-vfs-2.0/libgnomevfs/gnome-vfs.h:28,
                 from totem-disc.c:37:
/usr/include/netinet/in.h:354: error: syntax error before '(' token
/usr/include/netinet/in.h:354: error: syntax error before "__u32"
/usr/include/netinet/in.h:355: error: syntax error before '(' token
/usr/include/netinet/in.h:355: error: syntax error before "__u16"
/usr/include/netinet/in.h:357: error: syntax error before '(' token
/usr/include/netinet/in.h:357: error: syntax error before "__u32"
/usr/include/netinet/in.h:359: error: syntax error before '(' token
/usr/include/netinet/in.h:359: error: syntax error before "__u16"
make[2]: *** [totem-disc.o] Error 1

Looking around on the internet, I saw some similar problems with other packages, but none with totem.  I found this post: which gave me the idea for commenting out lines:

http://www.m17n.org/linux-sh/ml/linux-sh/2003-07/msg00045.html

By changing the relevant section to:

#if 0
extern uint32_t ntohl (uint32_t __netlong) __THROW __attribute__ ((__const__));
extern uint16_t ntohs (uint16_t __netshort)
     __THROW __attribute__ ((__const__));
extern uint32_t htonl (uint32_t __hostlong)
     __THROW __attribute__ ((__const__));
extern uint16_t htons (uint16_t __hostshort)
     __THROW __attribute__ ((__const__));
#endif

I was able to successfully compile totem versions >= 0.99.18.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 aethyr 2004-10-18 22:07:28 UTC
Relevant packages?

glibc-2.3.4.20040808-r1
linux-headers-2.4.21-r1

Portage 2.0.50-r11 (default-x86-2004.2, gcc-3.3.4, glibc-2.3.4.20040808-r1, 2.6.8.1-ck8)
=================================================================
System uname: 2.6.8.1-ck8 i686 Intel(R) Celeron(TM) CPU                1400MHz
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="no"
CFLAGS="-march=pentium3 -O2 -pipe -fomit-frame-pointer -mmmx -msse"
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/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium3 -O2 -pipe -fomit-frame-pointer -mmmx -msse"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS=" ftp://ftp.ussg.iu.edu/pub/linux/gentoo http://mirror.clarkson.edu/pub/distributions/gentoo/ ftp://csociety-ftp.ecn.purdue.edu/pub/gentoo/ ftp://mirrors.tds.net/gentoo http://gentoo.mirrors.pair.com/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X alsa avi berkdb bitmap-fonts cdr dga dvd encode esd f77 foomaticdb gdbm gif gnome gtk gtk2 hal imlib java jpeg libg++ libwww mad mikmod mmx motif mpeg mysql ncurses nls opengl oss pam pdflib perl png python quicktime readline samba sdl slang spell sse ssl svga tcltk tcpd truetype x86 xml2 xprint xv zlib"
Comment 2 Colin Macdonald 2004-10-24 13:58:30 UTC
I can confirm this bug but I haven't tried the fix.
Comment 3 nils Olofsson 2004-10-29 16:35:21 UTC
I was getting the same error adding the fix, fixed the compile problem.
Comment 4 Tomasz Sterna 2004-11-04 22:50:59 UTC
Confirmed the bug in 0.99.19 and confirmed the fix.
Comment 5 foser (RETIRED) gentoo-dev 2004-11-05 09:04:12 UTC
yeah hmm that 'fix' isn't really a fix, it just removes a couple of defs and i don't know what side-effects that might have.
Comment 6 Serhij S. Stasyuk 2004-11-09 11:12:30 UTC
The better way to fix this is to add define to the totem-disc.c before including <linux/cdrom.c>
#define _LINUX_BYTEORDER_LITTLE_ENDIAN_H
The fix problem, because redefenition of ntohl and co. is in the <linux/byteorder/little_endian.h>
and this define prevents inclusion of this file
Comment 7 Wendall Cada 2004-11-16 13:21:47 UTC
I am having this problem with media-video/totem-0.99.19 I see a fix was posted. Anybody available to fix the issue. It will not compile as is.

Wendall
Comment 8 Mark J. Bartlett 2004-11-16 17:10:54 UTC
Just another confirmation that this bug still effects totem-0.99.19.  I am using the x86 branch, version 2004.3.  My make.conf file looks link this:

CFLAGS="-O3 -march=athlon -fomit-frame-pointer -pipe -s"
#CFLAGS="-O2 -march=athlon -fmit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
USE="3dnow mmx alsa acpi cdr dvd joystick scanner usb curl bonobo doc evo gb gstreamer gtkhtml aim icq msn yahoo imap imagemagick jabber jack java lcms mozilla pda ppds perl slp snmp tcltk tiff videos print -arts -kde -qt"
MAKEOPTS="-j2"
CXXFLAGS="${CFLAGS}"

See the following error itself:

... -I/usr/X11R6/include -O3 -march=athlon -fomit-frame-pointer -pipe -s -c totem-disc.c
In file included from /usr/include/netdb.h:28,
                 from /usr/include/gnome-vfs-2.0/libgnomevfs/gnome-vfs-address.h:31,
                 from /usr/include/gnome-vfs-2.0/libgnomevfs/gnome-vfs.h:28,
                 from totem-disc.c:38:
/usr/include/netinet/in.h:354: error: syntax error before '(' token
/usr/include/netinet/in.h:354: error: syntax error before "__u32"
/usr/include/netinet/in.h:355: error: syntax error before '(' token
/usr/include/netinet/in.h:355: error: syntax error before "__u16"
/usr/include/netinet/in.h:357: error: syntax error before '(' token
/usr/include/netinet/in.h:357: error: syntax error before "__u32"
/usr/include/netinet/in.h:359: error: syntax error before '(' token
/usr/include/netinet/in.h:359: error: syntax error before "__u16"
make[2]: *** [totem-disc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/var/tmp/portage/totem-0.99.19/work/totem-0.99.19/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/totem-0.99.19/work/totem-0.99.19'
make: *** [all-recursive-am] Error 2
!!! ERROR: media-video/totem-0.99.19 failed.
!!! Function gnome2_src_compile, Line 40, Exitcode 2
!!! compile failure
Comment 9 Brian Bianco 2004-11-17 13:28:03 UTC
I as well can confirm this bug and the "fix".  I have had this issue occur with 0.99.19.
Comment 10 foser (RETIRED) gentoo-dev 2004-11-21 16:59:35 UTC
comment #6 : I'm not sure that is any good for bigendian systems.

i believe this only happens with certain kernel headers.. what kernel headers package do you guys use ?
Comment 11 foser (RETIRED) gentoo-dev 2004-11-22 06:16:41 UTC
*** Bug 72039 has been marked as a duplicate of this bug. ***
Comment 12 Wendall Cada 2004-11-22 09:16:46 UTC
Linux version 2.6.9 (gcc version 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)

HTH,

Wendall
Comment 13 foser (RETIRED) gentoo-dev 2004-11-22 09:25:02 UTC
we need the installed version no. of the 'linux-headers' or 'linux26-headers' ebuild.
Comment 14 Wendall Cada 2004-11-22 09:36:13 UTC
linux-headers-2.4.21-r1 linux26-headers are not installed. Maybe no 2.6 headers is the problem?

Wendall
Comment 15 Wendall Cada 2004-11-22 10:04:21 UTC
linux-headers-2.4.21-r1 IS installed...sorry, need to be more verbose.

Wendall
Comment 16 Colin Macdonald 2004-11-22 11:07:14 UTC
linux-headers-2.4.22 was on both my 2.4 and 2.6 systems.

I upgraded my 2.6 laptop to linux26-headers-2.6.8.1-r1 and now I can emerge and run totem!  I haven't even rebuild glibc yet.
Comment 17 Colin Macdonald 2004-11-22 22:18:36 UTC
FWIW, totem-0.99.22-r1 still exhibits this bug on my 2.4 system with linux-headers-2.4.22.
Comment 18 André Ludwig 2004-11-24 00:53:56 UTC
Same problem here with "totem-0.99.22-r1". Didn't try the "fix".

# emerge info
Portage 2.0.51-r3 (default-linux/x86/2004.0, gcc-3.3.4, glibc-2.3.4.20040808-r1, 2.6.9-gentoo-r1 i686)
=================================================================
System uname: 2.6.9-gentoo-r1 i686 AMD Athlon(tm) processor
Gentoo Base System version 1.4.16
distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.15.90.0.1.1-r3
Headers:  sys-kernel/linux-headers-2.4.21-r1,sys-kernel/linux-headers-2.4.19-r1
Libtools: sys-devel/libtool-1.5.2-r7
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-tbird -mcpu=athlon-tbird -O3 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-tbird -mcpu=athlon-tbird -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
Comment 19 Axel Dyks 2004-11-24 16:56:55 UTC
I can confirm the bug using
  - linux-headers-2.4.21-r1
  - glibc-2.3.4-20040808-r1
on gentoo-linux-2.4.26-r9 (x86)

Masking  ">media-video/totem-0.99.8-r2" in "/etc/portage/package.mask"
might be a workaround, if "updating world" made you (like me) bump
into this error.

I have just (r)emerge(d) "totem-0.99.8-r2" and got no problems.

Axel
 
Comment 20 Thomas R. (TRauMa) 2004-12-13 19:02:09 UTC
Why not just add linux26-headers to DEPEND then?
Comment 21 Daniel Drake (RETIRED) gentoo-dev 2005-01-06 06:57:38 UTC
In cloop we just remove the netinet/in.h include for users that are running 2.4
Comment 22 foser (RETIRED) gentoo-dev 2005-01-06 07:12:12 UTC
that header isn't included in the totem sources. Comment #6 suggests it is cdrom.h which is the problem, but I don't think we can remove that.
Comment 23 Daniel Drake (RETIRED) gentoo-dev 2005-01-06 07:32:13 UTC
Could try compiling with -D_NETINET_IN_H
Comment 24 foser (RETIRED) gentoo-dev 2005-01-08 15:32:02 UTC
i just added totem-0.100, people running into this problem please try the suggestion in comment #23
Comment 25 Wendall Cada 2005-01-08 17:55:59 UTC
Could you expand on how to compile packages within gentoo using a specific compile flag not in use. Do I need to edit the ebuild. Does portage now have the ability of doing this inline? I know I can do this if I compile the sources manually. Would like a bit more information, and am wondering why this bug is still outstanding after the package has been broken for quite some time. I can't find a box that this will build on that is running current stable.

Wendall
Comment 26 Daniel Drake (RETIRED) gentoo-dev 2005-01-08 18:35:59 UTC
Probably the easiest way to test it is
CFLAGS="-D_NETINET_IN_H" emerge totem
Comment 27 Colin Macdonald 2005-01-08 22:59:34 UTC
Works for me!

0.100 fails as above with "emerge -v totem" and works with:

CFLAGS="-D_NETINET_IN_H" emerge totem

(System is Linux 2.4.28, linux headers 2.4.x and mostly ~x86).

Thanks Daniel Drake and others!
Comment 28 foser (RETIRED) gentoo-dev 2005-01-09 14:25:32 UTC
ok I added a line that should now add this define whenever a 2.4 kernel is detected... please test.
Comment 29 Wendall Cada 2005-01-09 14:42:57 UTC
Ok, CFLAGS="-D_NETINET_IN_H" emerge totem works quite well with 0.99.19. However, I think you are mistaken in thinking this is a 2.4 kernel issue. It is a 2.4 linux-headers issue, which are part of the current stable settup. If you are running all ~x86 and a 2.6 kernel, you'd have the 2.6 headers. I run the 2.6 kernel on 8 workstations that use Totem, standard configuration for these boxes are:
sys-kernel/development-sources-2.6.10-r1
sys-kernel/linux-headers-2.4.21-r1

So either you are suggesting that linux-headers-2.6.99 needs to be unmasked when used with 2.6 kernels, which I don't think is the case. Or the bug needs to be fixed based on the what linux-headers are in use, which appears to be the problem, not the kernel sources used.

Also, thanks for the tip on CFLAGS=, I have been using Gentoo for a couple years now and haven't run into the need for this, very nice to know.

Wendall
Comment 30 Daniel Drake (RETIRED) gentoo-dev 2005-01-09 14:52:28 UTC
The problem exists with all linux-headers-2.4.* ebuilds
linux-headers-2.6.99 is a fake ebuild, which points to linux26-headers
linux26-headers is the linux 2.6 header files which do not suffer this issue
Comment 31 Daniel Drake (RETIRED) gentoo-dev 2005-01-09 14:53:36 UTC
foser: using has_version to detect whether linux-headers-2.4.x is installed is probably a better way to detect whether the extra CFLAGS are needed. Some people like to mix kernel and header versions.
Comment 32 Magnus Damm 2005-01-10 04:08:32 UTC
Created attachment 48085 [details, diff]
This patch moved the include of "linux/cdrom.h" and fixes the problem for me.
Comment 33 foser (RETIRED) gentoo-dev 2005-01-10 05:49:15 UTC
can other ppl confirm the patch in comment #32 works as well ?
Comment 34 plors 2005-01-10 07:26:48 UTC
i can :)
Comment 35 foser (RETIRED) gentoo-dev 2005-01-12 06:09:31 UTC
good enough for me, i've added the cdrom includes patch to 0.100-r2. Please test * report back if it still gives troubles.
Comment 36 Wendall Cada 2005-01-15 12:43:55 UTC
0.100-r2 is building fine for me. Thanks for the patch foser.

Wendall
Comment 37 Colin Macdonald 2005-01-15 16:12:42 UTC
works fine for me too on my kernel 2.4/headers 2.4 box and also by kernel/headers 2.6 box.  Unfort. I no longer have a kernel 2.6/headers 2.4 box to test.
Comment 38 foser (RETIRED) gentoo-dev 2005-01-17 10:17:49 UTC
thanks for the help, I'm considering this fixed.
Comment 39 Serhij S. Stasyuk 2005-01-22 08:44:28 UTC
Sorry, I know that it is not right place for this bug, but this ebuild was born from here. When I try to emerge totem-0.100-r2 it builds fine, but install failed with access violation:
--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/tmp/sandbox-media-video_-_totem-0.100-r2-4726.log"

open_wr:   /var/lib/scrollkeeper/scrollkeeper_docs
open_wr:   /var/lib/scrollkeeper/scrollkeeper_docs
open_wr:   /var/lib/scrollkeeper/scrollkeeper_docs
open_wr:   /var/lib/scrollkeeper/scrollkeeper_docs
open_wr:   /var/lib/scrollkeeper/scrollkeeper_docs
open_wr:   /var/lib/scrollkeeper/scrollkeeper_docs
open_wr:   /var/lib/scrollkeeper/scrollkeeper_docs
open_wr:   /var/lib/scrollkeeper/scrollkeeper_docs
--------------------------------------------------------------------------------

my emerge info:
Portage 2.0.51-r14 (default-linux/x86/2004.3, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.4.28-gentoo-r5 i686)
=================================================================
System uname: 2.4.28-gentoo-r5 i686 AMD Sempron(tm)   2300+
Gentoo Base System version 1.6.8
Python:              dev-lang/python-2.3.4 [2.3.4 (#1, Sep 13 2004, 18:12:12)]
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     2.3.4
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.8.5-r2, 1.9.4, 1.5, 1.7.9, 1.6.3, 1.4_p6
sys-devel/binutils:  2.15.92.0.2-r2
sys-devel/libtool:   1.5.10-r3
virtual/os-headers:  2.4.22
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-mtune=athlon -O3 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/fax /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/control /var/spool/fax/etc"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-mtune=athlon -O3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="ftp://mirror.onlineua.net http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/overlays/portage"
SYNC="rsync://rsync.onlineua.net/gentoo-portage"
USE="x86 3dnow 3dnowex X aalib acpi adns alsa apache2 apm artworkextra avi berkdb bitmap-fonts bmp bonobo breakme bzip2 c++ cdr crypt cups dba dbm divx editor eds encode esd evo f77 faad fam fbcon flac flash font-server foomaticdb fortran freetype gcj gd gdbm ggi gif gimpprint gnome gnome2 gnomedb gpm gstreamer gtk gtk2 gtkhtml guile howl imagemagic imagemagick imap imlib ipv6 irda irmc java jbig jpeg junit kerberos krb4 lcms ldap libg++ libgda libwww mad mdb mikmod ming mmx mmxext mng mono motif mozcalendar mozdevelop mozilla mozsvg mozxmlterm mp3 mpeg mysql ncurses network nls nntp offensive oggvorbis opengl oss pam pcre pdflib perl pic png postgres postgresql ppds python qt quicktime radeon readline rtc samba sasl scanner sdl silc slang snmp soap speex spell sqlite sse ssl svg svga tcltk tcpd tetex theora tiff truetype truetype-fonts type1-fonts unicode usb video_cards_radeon wmf xml xml2 xpm xprint xv xvid zlib linguas_en linguas_en_US linguas_ru linguas_ru_RU linguas_uk linguas_uk_UA"
Unset:  LDFLAGS