Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 262321 - sys-apps/pciutils-3.1.2 fails to emerge on Gentoo/FreeBSD 7.1
Summary: sys-apps/pciutils-3.1.2 fails to emerge on Gentoo/FreeBSD 7.1
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: 314499
Blocks:
  Show dependency tree
 
Reported: 2009-03-12 22:43 UTC by 404 Error
Modified: 2010-04-10 19:29 UTC (History)
0 users

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


Attachments
Patch of ebuild (pciutils-3.1.2.ebuild.patch,286 bytes, patch)
2009-03-13 20:55 UTC, Marek Cruz
Details | Diff
files/pciutils-3.1.2-configure.patch (pciutils-3.1.2-configure.patch,558 bytes, patch)
2009-03-14 14:41 UTC, Marek Cruz
Details | Diff
pciutils-3.1.2.ebuild (pciutils-3.1.2.ebuild,1.87 KB, patch)
2009-03-14 14:42 UTC, Marek Cruz
Details | Diff
Yet another patch. (pciutils-3.1.2-fbsd.patch,1021 bytes, patch)
2009-06-22 14:25 UTC, Aleksey Chernov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description 404 Error 2009-03-12 22:43:08 UTC
gmake[1]: Leaving directory `/var/tmp/portage/sys-apps/pciutils-3.1.2/work/pciutils-3.1.2/lib'
i686-gentoo-freebsd7.1-gcc -O2 -pipe -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes   -c -o lspci.o lspci.c
In file included from lib/pci.h:13,
                 from pciutils.h:9,
                 from lspci.h:10,
                 from lspci.c:15:
lib/config.h:3:24: warning: missing whitespace after the macro name
lspci.c: In function 'main':
lspci.c:899: error: expected ')' before 'PCILIB_VERSION'
gmake: *** [lspci.o] Error 1




Reproducible: Always

Steps to Reproduce:
1. emerge sys-apps/pciutils-3.1.2 
2.
3.

Actual Results:  
emerge Fails. The trouble seems to be a dot in the /var/tmp/portage/sys-apps/pciutils-3.1.2/work/pciutils-3.1.2/lib/config.h

#define PCI_OS_FREEBSD7.1 


Portage 2.2_rc25 (default/bsd/fbsd/x86/7.1, gcc-4.3.3, freebsd-lib-7.1-r2, 7.1-RELEASE i386)
=================================================================
System uname: FreeBSD-7.1-RELEASE-i386-32bit-ELF
Timestamp of tree: Thu, 12 Mar 2009 11:15:02 +0000
app-shells/bash:     4.0_p10
dev-lang/python:     2.5.4-r2
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.3-r1
sys-apps/sandbox:    1.5
sys-devel/autoconf:  2.63
sys-devel/automake:  1.10.2
sys-devel/binutils:  2.19.1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  7.1-r2
ACCEPT_KEYWORDS="x86-fbsd ~x86-fbsd"
CBUILD="i686-gentoo-freebsd7.1"
CFLAGS="-O2 -pipe"
CHOST="i686-gentoo-freebsd7.1"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://192.168.1.2/gentoo"
LDFLAGS=""
MAKEOPTS="-j1"
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"
SYNC="rsync://192.168.1.2/gentoo-portage"
USE="acl berkdb cli cracklib crypt cups dri gdbm iconv ipv6 java5 java6 midi ncurses nls nptlonly oss pam pcre perl ppds python readline reflection session spl ssl tcpd unicode x86-fbsd 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 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" ELIBC="FreeBSD" INPUT_DEVICES="keyboard mouse" KERNEL="FreeBSD" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="BSD" VIDEO_CARDS="apm ark chips cirrus cyrix dummy i128 i810 intel mach64 mga       neomagic nv r128 radeon rendition s3 s3virge savage siliconmotion sis   sisusb tga trident tseng vga via vmware"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Marek Cruz 2009-03-13 20:55:51 UTC
Created attachment 184916 [details, diff]
Patch of ebuild

You've forgotten the most important lines of the description :)

gmake HOST=i486-gentoo-freebsd7.1 CROSS_COMPILE=i486-gentoo-freebsd7.1- DNS=yes IDSDIR=/usr/share/misc MANDIR=/usr/share/man PREFIX=/usr SHARED=yes STRIP= ZLIB=yes 'OPT=-O2 -pipe' all pcimodules

...

...Looking for access methods...\c
 Unfortunately, your OS is not supported by the PCI Library << THE CAUSE!

...

I figured out it won't compile because of unrecognized HOST. If I change CHOST to FreeBSD, it compiles and runs fine, nevertheless I carefully checked lib/configure.c and found autodetection of OS line 23  based on "uname -s" when HOST is empty. That's reliable, because it returns "FreeBSD".

Therefore I suggest to simply remove HOST from gmake in the ebuild:
gmake CROSS_COMPILE=i486-gentoo-freebsd7.1- DNS=yes IDSDIR=/usr/share/misc MANDIR=/usr/share/man PREFIX=/usr SHARED=yes STRIP= ZLIB=yes 'OPT=-O2 -pipe' all pcimodules

It works like a charm, please apply my patch. Don't forget to run "ebuild pciutils-3.1.2.ebuild digest".
Comment 2 404 Error 2009-03-13 21:18:30 UTC
Whooops my error I apologize. I reported the bug very quickly and just forgot to post my build.log when coming back on the problem.

gmake -j1 CROSS_COMPILE=i686-gentoo-freebsd7.1- DNS=yes IDSDIR=/usr/share/misc MANDIR=/usr/share/man PREFIX=/usr SHARED=yes STRIP= ZLIB=yes DESTDIR=/var/tmp/portage/sys-apps/pciutils-3.1.2/image/ install install-lib
gmake -C lib all

Tested your patch, worked! Also tested in a Gentoo/Linux box, worked like a charm there too. Will that be pushed in the portage tree as a -r1 release ?

Comment 3 Marek Cruz 2009-03-14 12:52:39 UTC
I'm not an official Gentoo developer (yet?). Hence, I cannot push it in portage tree. Perhaps, we should wait for someone who can apply the patch. Please change the status to NEW until it's fixed in portage.
Comment 4 404 Error 2009-03-14 13:09:14 UTC
As per request of Marek, will close when the patch will be applied in the portage tree.
 
Comment 5 404 Error 2009-03-14 13:40:29 UTC
Note: still needs to be tested against cross-compiling.


Comment 6 Marek Cruz 2009-03-14 14:41:32 UTC
Created attachment 184950 [details, diff]
files/pciutils-3.1.2-configure.patch

Modified sed pattern to properly extract only low-alpha. From CHOST, like "i486-gentoo-freebsd7.1" it matches "freebsd" instead of "freebsd7.1".
Comment 7 Marek Cruz 2009-03-14 14:42:04 UTC
Created attachment 184952 [details, diff]
pciutils-3.1.2.ebuild

New ebuild to include the patch
Comment 8 404 Error 2009-03-14 15:19:52 UTC
With new patches :

Gentoo Linux (amd64) => OK
Gentoo FreeBSD 7.1 (x86) => OK
Comment 9 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-05-16 22:52:34 UTC
Patch looks good; did anybody send this upstream?
Comment 10 Aleksey Chernov 2009-06-22 14:25:02 UTC
Created attachment 195454 [details, diff]
Yet another patch.

This patch fix build problem with OS autodetection and strange install error.
Comment 11 SpanKY gentoo-dev 2010-04-10 19:29:03 UTC
pciutils-3.1.7 in the tree and it should work