Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 234549 - gnome-vfs cannot be emerged in Prefix Portage
Summary: gnome-vfs cannot be emerged in Prefix Portage
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo non-Linux Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-12 14:18 UTC by Rabbe Fogelholm
Modified: 2008-08-21 17:40 UTC (History)
0 users

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


Attachments
inotify patch (inotify-glib2.4.patch,532 bytes, patch)
2008-08-21 09:02 UTC, Fabian Groffen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rabbe Fogelholm 2008-08-12 14:18:59 UTC
Trying to emerge gnome-base/gnome-vfs (with PKG_CONFIG_PATH unset in the environment) gets me this,

 i686-pc-linux-gnu-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I.. -I../imported/neon -pthread -DORBIT2=1 -I/local/tmp/nightly/2008-08-12/usr/include/glib-2.0 -I/local/tmp/nightly/2008-08-12/usr/lib/glib-2.0/include -I/local/tmp/nightly/2008-08-12/usr/include/libxml2 -I/local/tmp/nightly/2008-08-12/usr/include/gconf/2 -I/local/tmp/nightly/2008-08-12/usr/include/orbit-2.0 -pthread -DORBIT2=1 -I/local/tmp/nightly/2008-08-12/usr/include/glib-2.0 -I/local/tmp/nightly/2008-08-12/usr/lib/glib-2.0/include -I/local/tmp/nightly/2008-08-12/usr/include/gconf/2 -I/local/tmp/nightly/2008-08-12/usr/include/orbit-2.0 -D_FILE_OFFSET_BITS=64 -D_BSD_SOURCE -D_LARGEFILE64_SOURCE -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -DSSH_PROGRAM=\"/local/tmp/nightly/2008-08-12/usr/bin/ssh\" -DGNOME_VFS_PREFIX=\"/local/tmp/nightly/2008-08-12/usr\" -DGNOME_VFS_DATADIR=\"/local/tmp/nightly/2008-08-12/usr/share\" -DGNOME_VFS_LIBDIR=\"/local/tmp/nightly/2008-08-12/usr/lib\" -DGNOME_VFS_SYSCONFDIR=\"/local/tmp/nightly/2008-08-12/etc\" -DG_LOG_DOMAIN=\"gnome-vfs-modules\" -O2 -pipe -MT inotify-path.lo -MD -MP -MF .deps/inotify-path.Tpo -c inotify-path.c  -fPIC -DPIC -o .libs/inotify-path.o
inotify-path.c: In function 'ip_start_watching':
inotify-path.c:149: error: 'IN_ONLYDIR' undeclared (first use in this function)
inotify-path.c:149: error: (Each undeclared identifier is reported only once
inotify-path.c:149: error: for each function it appears in.)
 i686-pc-linux-gnu-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I.. -I../imported/neon -pthread -DORBIT2=1 -I/local/tmp/nightly/2008-08-12/usr/include/glib-2.0 -I/local/tmp/nightly/2008-08-12/usr/lib/glib-2.0/include -I/local/tmp/nightly/2008-08-12/usr/include/libxml2 -I/local/tmp/nightly/2008-08-12/usr/include/gconf/2 -I/local/tmp/nightly/2008-08-12/usr/include/orbit-2.0 -pthread -DORBIT2=1 -I/local/tmp/nightly/2008-08-12/usr/include/glib-2.0 -I/local/tmp/nightly/2008-08-12/usr/lib/glib-2.0/include -I/local/tmp/nightly/2008-08-12/usr/include/gconf/2 -I/local/tmp/nightly/2008-08-12/usr/include/orbit-2.0 -D_FILE_OFFSET_BITS=64 -D_BSD_SOURCE -D_LARGEFILE64_SOURCE -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -DSSH_PROGRAM=\"/local/tmp/nightly/2008-08-12/usr/bin/ssh\" -DGNOME_VFS_PREFIX=\"/local/tmp/nightly/2008-08-12/usr\" -DGNOME_VFS_DATADIR=\"/local/tmp/nightly/2008-08-12/usr/share\" -DGNOME_VFS_LIBDIR=\"/local/tmp/nightly/2008-08-12/usr/lib\" -DGNOME_VFS_SYSCONFDIR=\"/local/tmp/nightly/2008-08-12/etc\" -DG_LOG_DOMAIN=\"gnome-vfs-modules\" -O2 -pipe -MT inotify-missing.lo -MD -MP -MF .deps/inotify-missing.Tpo -c inotify-missing.c -o inotify-missing.o >/dev/null 2>&1
make[2]: *** [inotify-path.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/local/scratch/portage/gnome-base/gnome-vfs-2.22.0/work/gnome-vfs-2.22.0/modules'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/local/scratch/portage/gnome-base/gnome-vfs-2.22.0/work/gnome-vfs-2.22.0'
make: *** [all] Error 2
 * ERROR: gnome-base/gnome-vfs-2.22.0 failed:
 *   compile failure
 * 
 * Call stack:
 *               ebuild.sh:  49: <call src_compile>
 *             environment:2975: <call gnome2_src_compile>
 *             environment:2294:     emake || die "compile failure"
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * build log: '/local/scratch/portage/gnome-base/gnome-vfs-2.22.0/temp/build.log'
 * ebuild environment: '/local/scratch/portage/gnome-base/gnome-vfs-2.22.0/temp/environment'
 * S: '/local/scratch/portage/gnome-base/gnome-vfs-2.22.0/work/gnome-vfs-2.22.0'
Comment 1 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-08-12 14:30:26 UTC
Rabbe, your bugs are interesting as of late because they always work for me.

What USE flags did you compile this with? 
Comment 2 Mcklaren 2008-08-12 14:48:13 UTC
Please attach a emerge --info that we can see your option, thank you.
Comment 3 Rabbe Fogelholm 2008-08-12 20:46:02 UTC
Here it is,

Portage 2.2.00.11391-prefix (default-prefix/linux/x86, gcc-4.2.4, unavailable, 2.6.16.53-0.16-smp i686)
=================================================================
System uname: Linux-2.6.16.53-0.16-smp-i686-Intel-R-_Core-TM-2_CPU_6600_@_2.40GHz-with-SuSE-10-i586
Timestamp of tree: Tue, 12 Aug 2008 00:51:30 +0000
ccache version 2.4 [disabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7-r00.1, 2.1.6-r1
dev-lang/python:     2.5.2-r7
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18.50.0.7
sys-devel/gcc-config: 1.4.0-r04.5
sys-devel/libtool:   1.5.26
ACCEPT_KEYWORDS="~x86-linux"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/local/tmp/nightly/2008-08-12/usr/portage/distfiles"
EPREFIX="/local/tmp/nightly/2008-08-12"
FEATURES="collision-protect distlocks parallel-fetch preserve-libs sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.gentoo.no/ http://mirror.qubenet.net/mirror/gentoo/ http://mirror.muntinternet.net/pub/gentoo/ http://ftp.linux.ee/pub/gentoo/distfiles/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo"
LANG="en_US"
LDFLAGS=""
MAKEOPTS="-j2"
PKGDIR="/local/tmp/nightly/2008-08-12/usr/portage/packages"
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="/local/scratch"
PORTDIR="/local/tmp/nightly/2008-08-12/usr/portage"
SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix"
USE="X cracklib iconv midi mudflap ncurses nls openmp prefix readline ssl unicode x86 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="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 4 Rabbe Fogelholm 2008-08-17 20:38:32 UTC
Just a quick note, it appears that if I mask gnome-base/gnome-vfs-2.22.0 then version 2.20.1-r1 gets emerged instead, and successfully so.

I'll try to see if I can pinpoint why I have a problem with 2.22.0.
Comment 5 Rabbe Fogelholm 2008-08-18 12:40:24 UTC
More details on this issue:

The gnome-vfs-2.20.1 package contains a header file modules/local_inotify.h which defines the required macro IN_ONLYDIR.

In the 2.22.0 version of the package that header file is not present. The definition of IN_ONLYDIR is instead read from /usr/include/sys/inotify.h, assuming that the definition exists in that file.

On SUSE Enterprise 10 SP 3 this goes wrong: The file /usr/include/sys/inotify.h is present but it does not define IN_ONLYDIR. (On SUSE there is a file /usr/include/linux/inotify.h which actually defines IN_ONLYDIR, but the source tree does not refer to it.)

For comparison, native Gentoo has /usr/include/sys/inotify.h and it contains a definition of IN_ONLYDIR. The ebuild failure can be simulated on native Gentoo by commenting out the definition of IN_ONLYDIR from /usr/include/sys/inotify.h.

To conclude then, this may be a distro-specific problem. I have not been able to check other distros than SUSE 10 and "stable" x86 Gentoo. For SUSE 10 a simple workaround is to avoid gnome-vfs-2.22.0, although this may of course cause problems elsewhere.
Comment 6 Rabbe Fogelholm 2008-08-19 04:56:19 UTC
I checked an old Fedora 6 installation. /usr/include/sys/inotify.h is present and it does define IN_ONLYDIR. 
Comment 7 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-08-19 18:55:25 UTC
(In reply to comment #6)
> I checked an old Fedora 6 installation. /usr/include/sys/inotify.h is present
> and it does define IN_ONLYDIR. 
> 

Well, to mix things up abit. RHEL 4 does NOT have /usr/include/sys/inotify.h and gnome-vfs-2.22.0 works fine.
Comment 8 Rabbe Fogelholm 2008-08-20 06:55:12 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > I checked an old Fedora 6 installation. /usr/include/sys/inotify.h is present
> > and it does define IN_ONLYDIR. 
> > 
> 
> Well, to mix things up abit. RHEL 4 does NOT have /usr/include/sys/inotify.h
> and gnome-vfs-2.22.0 works fine.
> 

I noticed something similar with native Gentoo. I was curious to see if I could provoke the problem by temporarily removing /usr/include/sys/inotify.h and emerging gnome-vfs. However, gnome-vfs was still possible to emerge. The only way I could cause the problem to appear in Gentoo was by specifically commenting out the definition of IN_ONLYDIR.

Without looking deeper I have assumed that there is some logic in the "config" phase of the ebuild to deal with the case where no inotify.h is found.
Comment 9 Rabbe Fogelholm 2008-08-20 07:09:09 UTC
Another workaround for SUSE 10 that lets me install gnome-vfs-2.22.0 is to emerge like this:

env \
 CFLAGS="-DIN_ONLYDIR=0x01000000 $(source etc/make.conf; echo $CFLAGS)" \
 emerge gnome-vfs

In theory not a safe thing to do because the macro is passed to every compiler invocation and not just those that include <sys/inotify.h> ... :-(

However, 2.22.0 seems to be required to avoid other problems (with 2.20.1-r1 I stumbled on gnome-icon-theme).
Comment 10 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-08-20 15:46:42 UTC
(In reply to comment #9)
> Another workaround for SUSE 10 that lets me install gnome-vfs-2.22.0 is to
> emerge like this:
> 
> env \
>  CFLAGS="-DIN_ONLYDIR=0x01000000 $(source etc/make.conf; echo $CFLAGS)" \
>  emerge gnome-vfs
> 
> In theory not a safe thing to do because the macro is passed to every compiler
> invocation and not just those that include <sys/inotify.h> ... :-(
> 
> However, 2.22.0 seems to be required to avoid other problems (with 2.20.1-r1 I
> stumbled on gnome-icon-theme).
> 

So we can agree that this is a SUSE problem and that it is not practical/possible to "fix" in the prefix tree? 

Why is SUSE so bad? I thought it was "Enterprise Linux" =/
Comment 11 Rabbe Fogelholm 2008-08-21 08:50:15 UTC
Maybe it is not SUSE in particular but rather GNU/Linux at a certain point in time. I just checked the manpage for inotify (7) on the SUSE box. The page is identified as "Linux Programmer's manual", Linux 2.6.15, 2006-02-07. Under BUGS it mentions "As at glibc 2.4, the definitions for IN_DONT_FOLLOW, IN_MASK_ADD, and IN_ONLYDIR are missing from <sys/inotify.h>"--precisely the problem at hand!

The glibc rpm version reports as 2.4-31.30. So there is a fair chance that the next SUSE SP has corrected this. I am stuck with SP1, latest available is SP2. "Stuck with" because my company maintains a lot of applications on top of Linux and they want the Linux platform to be stable over long periods of time, even if that means living with known bugs.
Comment 12 Fabian Groffen gentoo-dev 2008-08-21 08:53:17 UTC
Right, so we're dealing with a problem upstream should deal with (ideally).  Perhaps we can extend the configure check to look for IN_ONLYDIR, and if not defined just disable inotify support.  (too bad, but anyway...)
Comment 13 Fabian Groffen gentoo-dev 2008-08-21 09:02:01 UTC
Created attachment 163450 [details, diff]
inotify patch

I got inspired by some Debian patch, can you try this?
Comment 14 Rabbe Fogelholm 2008-08-21 09:40:06 UTC
It looks good. I downloaded and renamed it files/gnome-vfs-2.22.0-inotify-glib2.4.patch and added and epatch statement in the 2.22.0 ebuild file. 

`ebuild ... digest clean unpack compile' runs successfully (the source file does get patched as intended).
Comment 15 Fabian Groffen gentoo-dev 2008-08-21 17:40:25 UTC
patch added, thanks.