Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 352663 - x11-apps/xinit-1.3.0-r2 failed to build: PRIO_PROCESS undeclared
Summary: x11-apps/xinit-1.3.0-r2 failed to build: PRIO_PROCESS undeclared
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: FreeBSD (show other bugs)
Hardware: All FreeBSD
: High normal (vote)
Assignee: Gentoo/BSD Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-25 10:22 UTC by Naohiro Aota
Modified: 2011-09-09 14:26 UTC (History)
1 user (show)

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


Attachments
proposed patch (xinit-1.3.0-xinit.patch,385 bytes, patch)
2011-02-08 11:05 UTC, Naohiro Aota
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Naohiro Aota gentoo-dev 2011-01-25 10:22:27 UTC
Try emerge'ing x11-apps/xinit-1.3.0-r2 on Gentoo/FreeBSD. You'll get
the following error.

  CC     xinit.o
i686-gentoo-freebsd8.0-gcc -std=gnu99 -DHAVE_CONFIG_H -I.  -DXINITDIR=\"/etc/X11/xinit\" -DBINDIR=\"/usr/bin\"  -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-aliasing -Wbad-function-cast -Wformat=2 -Wold-style-definition -Wdeclaration-after-statement  -D_THREAD_SAFE   -DCSRG_BASED -O2 -pipe -march=prescott --param l1-cache-size=16 --param l1-cache-line-size=64 -mtune=prescott -c xinit.c
xinit.c: In function 'startServer':
xinit.c:447: warning: implicit declaration of function 'setpriority'
xinit.c:447: warning: nested extern declaration of 'setpriority'
xinit.c:447: error: 'PRIO_PROCESS' undeclared (first use in this function)
xinit.c:447: error: (Each undeclared identifier is reported only once
xinit.c:447: error: for each function it appears in.)
gmake[2]: *** [xinit.o] Error 1

getpriority(2) tell us that we need to include <sys/time.h> and
<sys/resource.h> for setpriority() and PRIO_PROCESS on FreeBSD. Maybe
xinit doesn't do so.


Reproducible: Always




Portage 2.2.0_alpha19 (default/bsd/fbsd/x86/8.0, gcc-4.4.4, freebsd-lib-8.0-r0, 8.0-RELEASE i386)
=================================================================
System uname: FreeBSD-8.0-RELEASE-i386-32bit-ELF
Timestamp of tree: Tue, 25 Jan 2011 09:00:23 +0000
app-shells/bash:     4.1_p9
dev-java/java-config: 2.1.9-r1
dev-lang/python:     2.5.4-r4, 2.6.6-r1, 2.7.1, 3.1.2-r4
dev-util/cmake:      2.8.3-r1
sys-apps/baselayout: 2.0.1-r1
sys-apps/openrc:     0.7.0
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.68
sys-devel/automake:  1.9.6-r2, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.4-r2, 4.5.2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.4-r1
sys-devel/make:      3.82
virtual/os-headers:  8.0 (sys-freebsd/freebsd-lib)
Repositories: gentoo gentoo-bsd sunrise gentoo-haskell naota pc_local
ACCEPT_KEYWORDS="x86-fbsd ~x86-fbsd"
ACCEPT_LICENSE="* -@EULA sun-bcla-java-vm skype-eula"
CBUILD="i686-gentoo-freebsd8.0"
CFLAGS="-O2 -pipe -march=prescott --param l1-cache-size=16 --param l1-cache-line-size=64 -mtune=prescott"
CHOST="i686-gentoo-freebsd8.0"
CONFIG_PROTECT="/etc /usr/share/openvpn/easy-rsa"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=prescott --param l1-cache-size=16 --param l1-cache-line-size=64 -mtune=prescott"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs chflags distlocks fixlafiles fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="ja_JP.UTF-8"
LC_ALL="ja_JP.UTF-8"
LDFLAGS=""
LINGUAS="ja"
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="/usr/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/gentoo-bsd /var/lib/layman/sunrise /var/lib/layman/haskell /home/naota/src/portage-overlay /usr/local/portage/pc_local"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl acpi berkdb bzip2 cjk cli cracklib crypt cxx dri emacs fortran gdbm gif gtk gzip-el iconv ipv6 java5 java6 jpeg jpeg2k mmx modules ncurses nls nptlonly openal opengl oss pam pcre perl png python readline session source spell sse sse2 ssl svg tcpd toolkit-scroll-bars truetype ulaw unicode usb x86-fbsd xft xorg zlib" 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" ELIBC="FreeBSD" 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" INPUT_DEVICES="keyboard mouse" KERNEL="FreeBSD" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ja" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="BSD" VIDEO_CARDS="intel vga" 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, INSTALL_MASK, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Naohiro Aota gentoo-dev 2011-02-08 11:05:40 UTC
Created attachment 261811 [details, diff]
proposed patch

I was able to build the package with this patch.
Comment 2 Aleksey Chernov 2011-02-23 20:15:09 UTC
Found this: http://www.mail-archive.com/xorg-devel@lists.x.org/msg14325.html
Then i think better write as this:
-#ifdef __DragonFly__
+#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__OpenBSD__)
Comment 3 Naohiro Aota gentoo-dev 2011-04-20 06:01:13 UTC
x11 team,

I'd like to apply the above patch in a week. Any comments?
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2011-04-20 10:56:13 UTC
(In reply to comment #3)
> x11 team,
> 
> I'd like to apply the above patch in a week. Any comments?

What is upstream status of this?
Comment 5 Naohiro Aota gentoo-dev 2011-04-21 23:41:28 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > x11 team,
> > 
> > I'd like to apply the above patch in a week. Any comments?
> 
> What is upstream status of this?

Not yet applied. The mail above seems to be missed or ignored.
http://cgit.freedesktop.org/xorg/app/xinit/log/xinit.c

But I believe this patch does not affect to Linux.
Comment 6 Naohiro Aota gentoo-dev 2011-09-05 07:03:53 UTC
I've reported bug to the upstream.
https://bugs.freedesktop.org/show_bug.cgi?id=40632

and dropped ~x86-fbsd untill this bug get fixed.
Comment 7 Naohiro Aota gentoo-dev 2011-09-09 12:05:06 UTC
Upstream applied this change to solve this bug
http://cgit.freedesktop.org/xorg/app/xinit/commit/xinit.c?id=45cc81cd7abafe61bddb3ddce9f4fb8a9aa06c12
https://bugs.freedesktop.org/show_bug.cgi?id=40632

Please apply or confirm the patch.
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2011-09-09 13:07:13 UTC
(In reply to comment #7)
> Upstream applied this change to solve this bug
> http://cgit.freedesktop.org/xorg/app/xinit/commit/xinit.c?id=45cc81cd7abafe61bddb3ddce9f4fb8a9aa06c12
> https://bugs.freedesktop.org/show_bug.cgi?id=40632
> 
> Please apply or confirm the patch.

Go for it. Backporting patches from upstream is ok.
Comment 9 Naohiro Aota gentoo-dev 2011-09-09 14:26:38 UTC
Added in CVS. Thanks.