Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 18318 - avifile having problems with distributed compilation
Summary: avifile having problems with distributed compilation
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-27 16:18 UTC by Radek Podgorny
Modified: 2003-10-22 00:16 UTC (History)
3 users (show)

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


Attachments
Logfile (config.log,8.38 KB, application/octet-stream)
2003-04-10 19:04 UTC, Alexander Isacson
Details
Logfile (config.log,8.38 KB, text/plain)
2003-04-10 19:04 UTC, Alexander Isacson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Radek Podgorny 2003-03-27 16:18:31 UTC
avifile (0.7.32.20030219) seems to have problems with distributed compilation
(using distcc)...

When I try to compile it on my farm of Pentium3, Pentium4 a "just" Pentium it
fails, telling me the i686-gnu-linux-gcc (or something similar with i686) cannot
be executed which is quite logical on the Pentium (i586) machine.

Is the compiler name hardcoded? If it is, this should be rewritten to more
general "gcc"...

This may also be a problem of distcc or gcc itself but since ALL other ebuilds
work fine, I suspect avifile is the source of the errors in this case...

I'm sorry for telling you so no real information but right now, I don't have
time to test it...

Ask me if you want more specific information but I think that if you just try
it, you'll find it yourself... :-)

Radek

Reproducible: Always
Steps to Reproduce:
Comment 1 Alexander Isacson 2003-04-10 19:04:11 UTC
Created attachment 10487 [details]
Logfile

Is this problem related?

I have tried with very general CFLAGS and CCFLAGS settings and I have tried
disableling distcc. Still no go? 
Output as follows:

checking for working makeinfo... found
checking for i686-pc-linux-gnu-g++... i686-pc-linux-gnu-g++
checking for C++ compiler default output... configure: error: C++ compiler
cannot create executables
See `config.log' for more details.

!!! ERROR: media-video/avifile-0.7.32.20030219 failed.
!!! Function econf, Line 273, Exitcode 77
!!! econf failed
Comment 2 Alexander Isacson 2003-04-10 19:04:26 UTC
Created attachment 10488 [details]
Logfile

Is this problem related?

I have tried with very general CFLAGS and CCFLAGS settings and I have tried
disableling distcc. Still no go? 
Output as follows:

checking for working makeinfo... found
checking for i686-pc-linux-gnu-g++... i686-pc-linux-gnu-g++
checking for C++ compiler default output... configure: error: C++ compiler
cannot create executables
See `config.log' for more details.

!!! ERROR: media-video/avifile-0.7.32.20030219 failed.
!!! Function econf, Line 273, Exitcode 77
!!! econf failed
Comment 3 Alexander Isacson 2003-04-11 04:27:57 UTC
Upgradeing gcc and glib got this working... 
Comment 4 Radek Podgorny 2003-04-11 18:43:35 UTC
Don't have much time these days. I'm gonna test it ASAP...
Comment 5 Radek Podgorny 2003-04-14 13:09:12 UTC
Still haven't looked at your problem, but take a look at this:

This is the stderr of "emerge avifile" using distcc on my pentium/pentium4 mixer farm:

configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
configure: warning: host_alias=i686-pc-linux-gnu: invalid host type
Invalid configuration `host_alias=i686-pc-linux-gnu': machine `host_alias=i686-pc' not recognized
./configure: line 1967: test: i686-pc-linux-gnu: unary operator expected
distccd[1861] (dcc_execvp) ERROR: failed to exec i686-pc-linux-gnu-gcc: No such file or directory
make[2]: *** [http.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
distccd[1863] (dcc_execvp) ERROR: failed to exec i686-pc-linux-gnu-gcc: No such file or directory
make[2]: *** [mpegts.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1

!!! ERROR: media-video/avifile-0.7.32.20030219 failed.
!!! Function src_compile, Line 138, Exitcode 2
!!! (no error message)

Take a look at the warning at the beginning! It tells me not to use hardcoded i686 host. When I looked at the configure output it told:

configure: running /bin/sh './configure' --prefix=/usr  '--prefix=/usr' '--host=i686-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--enable-samples' '--disable-vidix' '--with-fpic' '--with-gnu-ld' '--enable-oss' '--disable-static' '--disable-freetype2' '--enable-xv' '--enable-sdl' '--enable-a52' '--enable-ffmpeg-a52' '--enable-quiet' '--enable-x86opt' '--enable-libz' '--enable-vorbis' '--with-x' '--enable-xft' '--with-qt-dir=/usr/qt/3' 'host_alias=i686-pc-linux-gnu' --cache-file=/dev/null --srcdir=.

See the "host"? It's there and it shouldn't. This seems to be the source of all problem when emerge is run from my pentium4 and distcc sends it to pentium1. Anyway, I don't know if this is a problem of the ebuild or the original avifile package itself, so I don't know how to repair it, therefore I haven't tried if when this is removed the problem diappears... :-( Can anyone get rid of the "host" arg and send me the ebuild, I'll try...

Thanks...
Radek

Comment 6 Zach Welch (RETIRED) gentoo-dev 2003-04-15 16:35:47 UTC
All of the machines must be running *exactly* the same versions of toolchains,
including linux-headers, binutils, glibc, gcc.  You can't mix gcc2 and gcc3.
You might also attach the output of 'emerge info' here.
Comment 7 Radek Podgorny 2003-04-15 18:37:39 UTC
emerge info output on my pentium3:

Portage 2.0.47-r10 (default-x86-1.4, gcc-3.2.2, glibc-2.3.1-r4)
=================================================================
System uname: 2.4.20 i686 Intel(R) Pentium(R) 4 CPU 2.00GHz
GENTOO_MIRRORS="ftp://ftp.tu-clausthal.de/pub/linux/gentoo"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share
/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/config"
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="/usr/local/portage"
USE="x86 apm avi cups encode gif jpeg gnome libg++ mmx mpeg ncurses png truetype
 xml2 xv zlib gtkhtml readline tetex bonobo java X sdl libwww ssl perl imlib ogg
vorbis gtk qt kde opengl gphoto2 -3dnow -aalib acpi alsa -arts -berkdb cdr -cryp
t -dga -directfb dvd -esd flash -gdbm -ggi -gpm gtk2 -guile ipv6 -ldap maildir m
box -mikmod -motif mozilla -nas -nls -oss -pam -pdflib -python -quicktime samba 
scanner -slang -spell sse -svga tcltk -tcpd tiff usb -xmms"
COMPILER="gcc3"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -mcpu=pentium4 -O3 -pipe -fomit-frame-pointer"
CXXFLAGS="-march=pentium3 -mcpu=pentium4 -O3 -pipe -fomit-frame-pointer"
ACCEPT_KEYWORDS="x86"
MAKEOPTS="-j4"
AUTOCLEAN="yes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
FEATURES="sandbox ccache distcc"



emerge info on pentium 1:

Portage 2.0.47-r10 (default-x86-1.4, gcc-3.2.2, glibc-2.3.1-r4)
=================================================================
System uname: 2.4.20 i586 Pentium 75 - 200
GENTOO_MIRRORS="http://gentoo.oregonstate.edu/ http://distro.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"
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="x86 libg++ perl -3dnow -apm -arts -avi -berkdb -crypt -cups -encode -gdbm -gif -gnome -gpm -gtk -imlib -java -jpeg -kde -libwww -mikmod -mmx -motif -mpeg -ncurses -nls -oggvorbis -opengl -oss -pam -pdflib -png -python -qt -quicktime -readline -sdl -slang -spell -ssl -svga -tcpd -truetype -X -xml2 -xmms -xv -zlib"
COMPILER="gcc3"
CHOST="i586-pc-linux-gnu"
CFLAGS="-march=pentium -O3 -pipe -fomit-frame-pointer"
CXXFLAGS="-march=pentium -O3 -pipe -fomit-frame-pointer"
ACCEPT_KEYWORDS="x86"
MAKEOPTS="-j6"
AUTOCLEAN="yes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
FEATURES="sandbox ccache distcc"


The packages you've mentioned are the same versions on both computers. In fact, ALL packages are the same version. The two computers even share the same /usr/portage dir.

I know I can't mix different gcc versions but I'm still trying to tell you that when building the package (avifile) the compile command begins with "gcc-i686-linux-gnu" (or something line that) not "gcc" and that is exactly what is wrong... Why do other packages use "general" gcc and this one the "hardcoded" version?
Comment 8 Martin Holzer (RETIRED) gentoo-dev 2003-05-06 16:12:20 UTC
please use latest stable distcc (2.01)
Comment 9 Radek Podgorny 2003-05-06 20:02:40 UTC
Still no success :-(

Here's a snippet:
make[2]: *** [avidec.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../../include -DHAVE_AV_CONFIG_H -I./../libavcodec -I./.. -Wall -Wno-unused -I../../include -g -O2 -mcpu=i686 -march=i686 -ffast-math -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_GNU_SOURCE -pipe -c avio.c  -fPIC -DPIC -o avio.lo
distccd[1370] (dcc_execvp) ERROR: failed to exec i686-pc-linux-gnu-gcc: No such file or directory
make[2]: *** [au.lo] Error 1
distccd[1371] (dcc_execvp) ERROR: failed to exec i686-pc-linux-gnu-gcc: No such file or directory
make[2]: *** [avio.lo] Error 1
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/avifile-0.7.32.20030219/work/avifile0.7-0.7.32/ffmpeg'
make: *** [all-recursive] Error 1

!!! ERROR: media-video/avifile-0.7.32.20030219 failed.
!!! Function src_compile, Line 138, Exitcode 2
!!! (no error message)

Both computer running the latest stable distcc 2.0.1-r1. Compilers, binutils, and all other stuff are the SAME versions. All packages are the same versions...

Radek
Comment 10 Radek Podgorny 2003-05-06 20:26:46 UTC
I've played a bit with the ebuild and when I replaced the "econf" thing with standard "./configure", it started to work as expected. So, it looks like this is portage related... Can you reassign this bug to someone who is in charge of portage?

What is that "econf thing" good for, anyway?

Radek
Comment 11 Zach Welch (RETIRED) gentoo-dev 2003-05-06 20:41:22 UTC
econf is passing --host=$CHOST and possibly --build=$CBUILD.  Changing it to use
configure will only mean more work for us in the future. 

You should not mix i686 and i586 without suitable cross-compilers.  Which means you should build an i686-pc-linux-gnu toolchain on the i586 host in order to use it as a build node for distcc.  For instructions to do that, see bug 18936 for an overview of that process.  Please find us in IRC if you need help with that process.

This should solve your problem without modification to the ebuild. You *might* get away by simply copying i586-pc-linux-gnu-{gcc,g++,cc} to i686-pc-linux-gnu-{gcc,g++,cc}, but I don't think you want to go there.
Comment 12 Radek Podgorny 2003-05-06 21:23:54 UTC
This is taken from standard configure:
configure: WARNING: If you wanted to set the --build type, don't use --host.

...econf should not be setting these values at once.


I have absolutely no experience in and just a little knowledge of cross-compiling. But I've read the information you gave me and the whole process looks ugly and painful. What is so bad about using just "gcc", anyway? Isn't gcc itself a cross-compiler? I tell it what platform I want to compile for using the --march (and other) arguments, so why do I need to call some special i686-whatever-gcc?

Where I can find some info on where to catch you on the IRC? I'm not a permanent-onliner... :-(
Comment 13 Alastair Tse (RETIRED) gentoo-dev 2003-07-09 02:03:15 UTC
this is a blocker for gnome, it seems we don't have a maintainer for avifile. i'll step up to the plate to fix the outstanding avifile so gnome can actually go thru smoothly from stage3.

after some fumbling, econf is required for the configure process to work. however, you could override CC and CXX during make to fix distcc support.
Comment 14 Sven Holzbach 2003-08-17 16:56:25 UTC
Hello all !
I encountered exact the same problem today by starting from stage 3 tarball...
I figured out that disabling distcc for this ebuild fixed the problem for me.
I used the following commandline:

DISTCC_HOSTS="localhost" emerge avifile-0.7.32*.ebuild 

BTW. It happened on two i686 up-to-date machines using newest distcc client.
Probably distcc should be disabled in this ebuild...

Brgds

Sven
Comment 15 Sven Holzbach 2003-08-17 17:12:16 UTC
Hello again !
The method described in my last posting also works for avifile-0.7.37*


Brgds

Sven
Comment 16 Lisa Seelye (RETIRED) gentoo-dev 2003-08-17 17:14:55 UTC
Now that you mention it, Sven, I compiled avifile today (with distcc) with no problems at all.
Comment 17 Martin Holzer (RETIRED) gentoo-dev 2003-10-22 00:16:55 UTC
closing with comment #16