View previous topic :: View next topic |
Author |
Message |
phsdv Guru
Joined: 13 Mar 2005 Posts: 372 Location: Europe
|
Posted: Fri Oct 13, 2006 10:11 pm Post subject: [solved]upstart build errors |
|
|
I am trying to build the sysvinit replacement upstart. Nat made an ebuild. See also this post. However I get the following error: Code: | i686-pc-linux-gnu-gcc -std=gnu99 -DHAVE_CONFIG_H -DLOCALEDIR="\"/usr/share/locale\"" -DCFG_DIR="\"/etc/event.d\"" -DTELINIT="\"/usr/sbin/telinit\"" -I.. -I.. -I. -I../intl -O3 -march=pentium3 -pipe -c cfgfile.c
cfgfile.c: In function `cfg_job_stanza':
cfgfile.c:874: error: `RLIMIT_NICE' undeclared (first use in this function)
cfgfile.c:874: error: (Each undeclared identifier is reported only once
cfgfile.c:874: error: for each function it appears in.)
cfgfile.c:882: error: `RLIMIT_RTPRIO' undeclared (first use in this function)
make[2]: *** [cfgfile.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/upstart-0.2.7/work/upstart-0.2.7/init'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/upstart-0.2.7/work/upstart-0.2.7'
make: *** [all] Error 2 |
The two undefined symbols are defined in my kernel:
Code: | # grep RLIMIT_RTPRIO /usr/src/linux/include/asm-generic/*
/usr/src/linux/include/asm-generic/resource.h:#define RLIMIT_RTPRIO 14 /* maximum realtime priority */
# grep RLIMIT_NICE /usr/src/linux/include/asm-generic/*
/usr/src/linux/include/asm-generic/resource.h:#define RLIMIT_NICE 13 /* max nice prio allowed to raise to |
Is there a configuration issue somewhere, maybe a missing include path?
My system:
Code: | Portage 2.1.1 (default-linux/x86/2006.1, gcc-3.4.6, glibc-2.3.6-r4, 2.6.15-gentoo-r1 i686)
=================================================================
System uname: 2.6.15-gentoo-r1 i686 Pentium III (Coppermine)
Gentoo Base System version 1.12.5
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: [Not Present]
dev-lang/python: 2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache: [Not Present]
dev-util/confcache: [Not Present]
sys-apps/sandbox: 1.2.17
sys-devel/autoconf: 2.13, 2.59-r7
sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils: 2.16.1-r3
sys-devel/gcc-config: 1.3.13-r4
sys-devel/libtool: 1.5.22
virtual/os-headers: 2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=pentium3 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /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/"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O3 -march=pentium3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks fixpackages metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LINGUAS=""
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://192.168.0.2/gentoo-portage"
USE="x86 X alsa bash-completion berkdb bitmap-fonts bzip2 cli crypt cups dbus dlloader dri elibc_glibc exif fam fortran gdbm gif gpm gtk hal input_devices_evdev isdnlog jpeg kdeenablefinal kernel_linux lcms libg++ mmx mmxext ncurses nls nptl nptlonly oss pam pcre perl png ppds pppd python qt3 readline reflection session spl sse ssl tcpd tetex tiff truetype-fonts type1-fonts udev unicode userland_GNU video_cards_mga vorbis xorg zlib"
Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS |
Last edited by phsdv on Wed Oct 18, 2006 4:50 pm; edited 1 time in total |
|
Back to top |
|
|
Bobnoxous Apprentice
Joined: 03 May 2005 Posts: 240
|
Posted: Fri Oct 13, 2006 10:40 pm Post subject: |
|
|
It looks to me like a problem with the upstart code. It cannot find those two definitions. They're in the source, so I suspect the header file isn't being inlcuded in cfgfile.c, or something like that. I'd check the c code. _________________ "The problem with the world is that fools and fanatics are always so sure of themselves while wiser people are so full of doubt."
- Bertrand Russell |
|
Back to top |
|
|
phsdv Guru
Joined: 13 Mar 2005 Posts: 372 Location: Europe
|
Posted: Sat Oct 14, 2006 8:15 am Post subject: |
|
|
I tried compiling it on my other system and that works fine. This system has newer gcc and glibc: Code: | Gentoo Base System version 1.12.5
Portage 2.1.1 (default-linux/x86/2006.0, gcc-4.1.1, glibc-2.4-r3, 2.6.15-gentoo-r1 i686)
=================================================================
System uname: 2.6.15-gentoo-r1 i686 Intel(R) Pentium(R) 4 CPU 2.60GHz | Could it be gcc or glibc related? |
|
Back to top |
|
|
Bobnoxous Apprentice
Joined: 03 May 2005 Posts: 240
|
Posted: Sat Oct 14, 2006 3:02 pm Post subject: |
|
|
It could. Can you post find the output of the build when it was building cfgfile.c? We could see how the gcc command is different from the build that fails. _________________ "The problem with the world is that fools and fanatics are always so sure of themselves while wiser people are so full of doubt."
- Bertrand Russell |
|
Back to top |
|
|
phsdv Guru
Joined: 13 Mar 2005 Posts: 372 Location: Europe
|
Posted: Sat Oct 14, 2006 5:11 pm Post subject: |
|
|
on 1st (failing) system: Code: | i686-pc-linux-gnu-gcc -std=gnu99 -DHAVE_CONFIG_H -DLOCALEDIR="\"/usr/share/locale\"" -DCFG_DIR="\"/etc/event.d\"" -DTELINIT="\"/usr/sbin/telinit\"" -I.. -I.. -I. -I../intl -O3 -march=pentium3 -pipe -c cfgfile.c
cfgfile.c: In function `cfg_job_stanza':
cfgfile.c:874: error: `RLIMIT_NICE' undeclared (first use in this function)
cfgfile.c:882: error: `RLIMIT_RTPRIO' undeclared (first use in this function) |
on 2nd system (builds):
Code: | i686-pc-linux-gnu-gcc -std=gnu99 -DHAVE_CONFIG_H -DLOCALEDIR="\"/usr/share/locale\"" -DCFG_DIR="\"/etc/event.d\"" -DTELINIT="\"/usr/sbin/telinit\"" -I.. -I.. -I. -I../intl -O2 -march=pentium4 -fomit-frame-pointer -pipe -c cfgfile.c | The only difference I see are the CFLAGS. I also tried with -O2 but as exected that did not change a thing.
I made a diff between the 2 systems for the emerge --info Code: | 2c2
< Portage 2.1.1 (default-linux/x86/2006.1, gcc-3.4.6, glibc-2.3.6-r4, 2.6.17-gentoo-r4 i686)
---
> Portage 2.1.1 (default-linux/x86/2006.0, gcc-4.1.1, glibc-2.4-r3, 2.6.15-gentoo-r1 i686)
4c4
< System uname: 2.6.17-gentoo-r4 i686 Pentium III (Coppermine)
---
> System uname: 2.6.15-gentoo-r1 i686 Intel(R) Pentium(R) 4 CPU 2.60GHz
5a6
> ccache version 2.3 [disabled]
7,8c8,9
< dev-java/java-config: [Not Present]
< dev-lang/python: 2.4.3-r4
---
> dev-java/java-config: 1.2.11-r1
> dev-lang/python: 2.4.3-r1
10,11c11,12
< dev-util/ccache: [Not Present]
< dev-util/confcache: [Not Present]
---
> dev-util/ccache: 2.3
> dev-util/confcache: 0.4.2-r1
16c17
< sys-devel/gcc-config: 1.3.13-r4
---
> sys-devel/gcc-config: 1.3.13-r3
18c19
< virtual/os-headers: 2.6.11-r2
---
> virtual/os-headers: 2.6.17-r1
22c23
< CFLAGS="-O3 -march=pentium3 -pipe"
---
> CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe"
| The most important differences in my view are: Code: | gcc4.1.1, glibc2.4, ccache, confcache, virtual/os-headers: 2.6.17 | for the system that builds. While the other system has: Code: | gcc3.4.6, glibc2.3.6, no caches, virtual/os-headers: 2.6.11 | I do not know which is causing the issue, but I'll start upgrading the virtual headers, there the kernel is already 2.6.17 anyway. |
|
Back to top |
|
|
phsdv Guru
Joined: 13 Mar 2005 Posts: 372 Location: Europe
|
Posted: Tue Oct 17, 2006 7:03 pm Post subject: |
|
|
update: I have upgraded the virtual headers to 2.6.17 but it still does not compile. Also upstart-0.3.0 fails in the exact same way. |
|
Back to top |
|
|
phsdv Guru
Joined: 13 Mar 2005 Posts: 372 Location: Europe
|
Posted: Wed Oct 18, 2006 4:50 pm Post subject: |
|
|
update2: Thanks to SER, a gentoo user, a patch is now available and my second system is also compiling without errors. You can find the fix on the upstart mailing list. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|