Bug 26062 - ntp-4.1.2 emerge fails
Bug#: 26062 Product:  Gentoo Linux Version: unspecified Platform: Sparc
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: sparc@gentoo.org Reported By: ramiro@salas-family.org
Component: Applications
URL: 
Summary: ntp-4.1.2 emerge fails
Keywords:  
Status Whiteboard: 
Opened: 2003-08-06 10:26 0000
Description:   Opened: 2003-08-06 10:26 0000
Upgrade from ntp-4.1.1b-r6 fails with type error (output follows):
====================<CUT HERE>=====================
In file included from ../include/ntp_fp.h:10,
                 from ../include/ntpd.h:6,
                 from ntpd.c:15:
/usr/include/netinet/in.h:259: `__u32' redeclared as different kind of symbol
/usr/include/asm-sparc/types.h:27: previous declaration of `__u32'
/usr/include/netinet/in.h:261: `__u16' redeclared as different kind of symbol
/usr/include/asm-sparc/types.h:24: previous declaration of `__u16'
ntpd.c:218: warning: no previous prototype for `drop_root'
make[2]: *** [ntpd.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/var/tmp/portage/ntp-4.1.2/work/ntp-4.1.2/ntpd'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/ntp-4.1.2/work/ntp-4.1.2'
make: *** [all] Error 2

!!! ERROR: net-misc/ntp-4.1.2 failed.
!!! Function src_compile, Line 66, Exitcode 2
!!! (no error message)

====================<CUT HERE>=====================

Neanderthal root # emerge info
Portage 2.0.48-r7 (default-sparc64-1.4, gcc-3.2.3, glibc-2.3.2-r1)
=================================================================
System uname: 2.4.20-sparc-r8 sparc64 sun4u
GENTOO_MIRRORS="http://gentoo.oregonstate.edu/
http://www.ibiblio.org/pub/Linux/distributions/gentoo"
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config
/usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY=""
USE="sparc apm avi foomaticdb mad mikmod nls directfb berkdb slang gtk -apache2
arts bonobo crypt -cups dga encode esd ethereal evo fbcon flash gb gd gdbm gif
gtk2 gnome gpm gtkhtml guile imap imlib innodb ipv6 java jikes jpeg kde lcms
ldap libgda libwww maildir -motif mozilla mozp3p mozaccess mozsvg mozcalendar
mpeg -mysql nas ncurses oav oci8 odbc oggvorbis opengl oss pam pda pdflib perl
plotutils png python qt quicktime readline samba sasl sdl snmp socks5 spell ssl
tcltk tcpd threads tiff truetype usb wmf X xml2 xmms xv zlib"
COMPILER="gcc3"
CHOST="sparc-sun4u-linux-gnu"
CFLAGS="-mcpu=ultrasparc -mtune=ultrasparc -O3 -pipe"
CXXFLAGS="-mcpu=ultrasparc -mtune=ultrasparc -O3 -pipe"
ACCEPT_KEYWORDS="sparc ~sparc"
MAKEOPTS="-j3"
AUTOCLEAN="yes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
FEATURES="sandbox buildpkg ccache distcc userpriv usersandbox fixpackages"

====================<CUT HERE>=====================

------- Comment #1 From Sven Blumenstein (RETIRED) 2003-08-07 09:12:13 0000 -------
Seems that 4.1.2 got removed from the portage tree...

------- Comment #2 From Keith M Wesolowski (RETIRED) 2003-08-10 16:33:15 0000 -------
Conflict between glibc and the kernel headers.  See
http://sources.redhat.com/ml/crossgcc/2002-05/msg00073.html

The trivial test case is:

#include <asm/byteorder.h>
#include <netinet/in.h>
int main () { }

which won't compile on any bigendian system.

------- Comment #3 From Keith M Wesolowski (RETIRED) 2003-08-10 18:57:26 0000 -------
Created an attachment (id=15872) [details]
kernel headers patch

Patch to linux-headers that allows ntp to build.

------- Comment #4 From Keith M Wesolowski (RETIRED) 2003-08-10 21:21:52 0000 -------
Adding ppc and hppa folks to the cc list as their headers are broken also.  The
patch needs to go upstream, but I'm unsure what we must do for now.

------- Comment #5 From Patrick Bores 2003-08-13 14:05:55 0000 -------
Applying the above patch didn't seem to help me. I'm assuming that goes in
/usr/src/linux, right?

------- Comment #6 From Patrick Bores 2003-08-13 14:25:54 0000 -------
Nevermind. I managed to cram it into /usr/include and things work fine. Thanks.

------- Comment #7 From Michael Hellwig 2003-08-28 04:32:29 0000 -------
hmm applied the patch, still get the same error upon compilation of ntpd .. or
do I have to recompile the kernel for that to work? darn .. don't wanna reboot
..

------- Comment #8 From Joshua Kinard 2003-09-12 20:17:32 0000 -------
ppc and hppa wanna give the patch in Comment #3 a run if you guys run into this
issue?  sparc has a patch in a re-written linux-2.4.21 ebuild, so that will fix
us up.  This still affects other big-endian archs, which includes mips, hppa,
and ppc.  I've got it fixed for mips, but if this doesn't affect ppc or hppa,
or you've already applied the patch, post here so this can get resolved.  A
version of this patch went upstream to Marcelo in 2.4.23-pre4, so the stable
2.4.23 kernel will have this fixed.

------- Comment #9 From David D. Huff Jr. 2003-09-26 17:21:24 0000 -------
Oops, now >=virtual/linux-sources-2.2 have been masked
dependency required by sys-libs/libcap-1.10 (dependency of ntp-4.1.2)

------- Comment #10 From Joe Kallar 2003-10-06 09:20:03 0000 -------
Using ~sparc and 2.4.22 this doesn't work in sparc:

 * Applying broadcastclient.patch...                                    
 [ ok ]
 * Applying 4.1.2-droproot.patch...                                     
 [ ok ]
 * Applying linux-config-phone.patch...                                 
 [ ok ]
configure.in:2496: /usr/bin/m4: Warning: Excess arguments to built-in `m4_pushdef'
ignored
autom4te-2.57a: /usr/bin/m4 failed with exit status: 1
configure.in: no proper invocation of AM_INIT_AUTOMAKE was found.
configure.in: You should verify that configure.in invokes AM_INIT_AUTOMAKE,
configure.in: that aclocal.m4 is present in the top-level directory,
configure.in: and that aclocal.m4 was recently regenerated (using aclocal).
automake-1.7: no `Makefile.am' found or specified

!!! ERROR: net-misc/ntp-4.1.2 failed.
!!! Function src_unpack, Line 52, Exitcode 1
!!! automake

------- Comment #11 From SpanKY 2003-10-06 09:29:36 0000 -------
joe, you should know better than to add unrelated bug reports :p
see Bug 29961 ...

------- Comment #12 From Joe Kallar 2003-10-06 09:33:19 0000 -------
My mistake ;) In my haste to close, I didn't search.

------- Comment #13 From Jason Wever (RETIRED) 2003-10-13 17:42:41 0000 -------
seems to be working for me now on ~sparc.

Are others seeing this as well?

------- Comment #14 From Joe Kallar 2003-10-14 17:47:40 0000 -------
ntp-4.1.2 works for me, ~sparc.

------- Comment #15 From Joshua Kinard 2003-10-14 20:32:04 0000 -------
Gonna remove ppc from the CC list, since I believe they have a working ntp.

Blademan, you using the linux-2.4.21 headers?

------- Comment #16 From Joe Kallar 2003-10-15 10:37:08 0000 -------
`Kumba: Nope, I'm using the stock 2.4.19 headers w/o any patch.

------- Comment #17 From SpanKY 2003-11-06 23:34:06 0000 -------
~hppa is all set now (or should be ...)

------- Comment #18 From SpanKY 2004-02-14 14:56:47 0000 -------
any updates here ?

------- Comment #19 From David D. Huff Jr. 2004-02-14 17:53:38 0000 -------
Update, looks good by me. Recompiled on ever puffin on the farm (4
architectures) and they all worked.

------- Comment #20 From Jason Wever (RETIRED) 2004-02-14 19:44:54 0000 -------
Still having header problems on stable sparc.  Need to stablize newer
linux-header s and it should be fixed.  Looking into it now.

------- Comment #21 From Jason Wever (RETIRED) 2004-02-15 09:23:50 0000 -------
Marked linux-headers-2.4.21-r1 stable on sparc, which fixes this problem.