It seems that the camstream program has hard-coded the location of uic and moc, which is needed for the ebuild, to /usr/local/bin. In my system, they are located in /usr/qt/3/bin. Ive included a patch to fix this, which just needs to be included in the camstream ebuild with the normal epatch command Reproducible: Always Steps to Reproduce:
Created attachment 19741 [details, diff] qt path fix
Patched. Thanks.
These lines are not hard-coded, they are created during configure. The configure script checks several locations for moc, and if it doesn't find it, it assumes /usr/local/bin - the checked places are: $QTDIR/bin:$PATH:/usr/bin:/usr/X11R6/bin:/usr/lib/qt/bin:/usr/lib/qt2/bin:/usr/lib/qt3/bin:/us r/local/qt/bin Could you please add the "emerge info" output and tell us what $QTDIR is on your system?
Since normally configure gets it right, the patch in this form doesn't help.
$QTDIR isnt set in emerge info, in the enviroment settings it is set as /usr/qt/3
Could you please tell me the output of IFS=":"; for as_dir in $QTDIR/bin:$PATH:/usr/bin:/usr/X11R6/bin:/usr/lib/qt/bin:/usr/lib/qt2/bin:/usr/lib/qt3/bin:/usr/local/qt/bin; do test -z "$as_dir" && as_dir=.; if [ -x "$as_dir/moc" ]; then echo "found $as_dir/moc"; break 2; fi; done
nothing is output
This is not very much, considering that you claim to have a working Qt installation in $QTDIR - what's the output of ls -l $QTDIR/bin on your system?
ls -l $QTDIR/bin: simon simon # ls -l $QTDIR/bin total 6376 -rwxr-xr-x 1 root root 402676 Nov 8 08:54 assistant -rwxr-xr-x 1 root root 2735948 Nov 8 08:54 designer -rwxr-xr-x 1 root root 4160 Nov 8 08:54 findtr -rwxr-xr-x 1 root root 386388 Nov 8 08:54 linguist -rwxr-xr-x 1 root root 51980 Nov 8 08:54 lrelease -rwxr-xr-x 1 root root 86732 Nov 8 08:54 lupdate -rwxr-xr-x 1 root root 482020 Nov 8 08:54 moc -rwxr-xr-x 1 root root 39560 Nov 8 08:54 qm2ts -rwxr-xr-x 1 root root 1800144 Nov 8 08:54 qmake -rwxr-xr-x 1 root root 8065 Nov 8 08:54 qt20fix -rwxr-xr-x 1 root root 1895 Nov 8 08:54 qt32castcompat -rwxr-xr-x 1 root root 193648 Nov 8 08:54 qtconfig -rwxr-xr-x 1 root root 5324 Nov 8 08:54 qtrename140 -rwxr-xr-x 1 root root 303080 Nov 8 08:54 uic
This is getting funny. What is the output of if [ -x ${QTDIR}/bin/moc ]; then echo "Comment 7 should not exist"; else echo "$QTDIR/bin/moc is not executable for some reason"; fi
output: Comment 7 should not exist
Do you by chance have something strange in your PATH that makes you get this result?
Simon? Still there? What's in your $PATH?
simon bin # $PATH bash: /usr/lib/colorgcc/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/3.3:/opt/Acrobat5:/usr/X11R6/bin:/opt/blackdown-jdk-1.4.1/bin:/opt/blackdown-jdk-1.4.1/jre/bin:/usr/qt/3/bin: No such file or directory
Created attachment 20858 [details] Trying to find moc Please save the attached shell script and execute it using "bash dummy.sh" and tell me the results. Looks like bash expansion played a trick on us when you copy/paste the code.
simon@simon simon $ bash dummy.sh found /usr/qt/3/bin/moc
This is exactly what is done in the configure script. I don't understand why it does not work for you. Please show me your "emerge info" output as I already requested in comment 3.
simon camstream # emerge info Portage 2.0.49-r15 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r8, 2.6.0-test9-gentoo) ================================================================= System uname: 2.6.0-test9-gentoo i686 AMD Athlon(tm) XP 2800+ Gentoo Base System version 1.4.3.12 distcc 2.11.2 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-march=athlon-xp -Os -pipe -fomit-frame-pointer -ffast-math -fforce-addr -ftracer -falign-functions=16 -falign-labels=1 -falign-loops=16 -falign-jumps=16 -fstack-protector -maccumulate-outgoing-args -mfpmath=sse,387" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-march=athlon-xp -Os -pipe -fomit-frame-pointer -ffast-math -fforce-addr -ftracer -falign-functions=16 -falign-labels=1 -falign-loops=16 -falign-jumps=16 -fstack-protector -maccumulate-outgoing-args -mfpmath=sse,387" DISTDIR="/usr/portage/distfiles" FEATURES="sandbox ccache autoaddcvs" GENTOO_MIRRORS="http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://ftp.easynet.nl/mirror/gentoo/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/portage.local" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="x86 oss apm avi crypt cups encode foomaticdb gif jpeg libg++ libwww mad mikmod mpeg ncurses nls pdflib png quicktime spell truetype xml2 xmms xv zlib gdbm berkdb slang readline aalib svga java X sdl gpm tcpd pam ssl python esd imlib oggvorbis gtk qt motif opengl 3dnow acpi alsa -arts cdr directfb dvd fbcon -gnome imap -kde mozilla perl samba sse tcltk usb" and the output of the camstream configure script: *snip* checking how to run the C++ preprocessor... g++ -E checking whether gcc needs -traditional... no checking for moc... /usr/local/bin/moc checking for uic... /usr/local/bin/uic checking location of Qt header files... /usr/qt/3/include checking location of Qt library... /usr/qt/3/lib checking if Qt is multi-threaded... no *snip*
Created attachment 20897 [details, diff] Makes configure more verbose Please apply this patch to your camstream-0.26.2/camstream/configure and tell me the resulting output when trying to find moc. Did I already mention that this is a strange problem? :-)
simon camstream-0.26.2 # pwd /var/tmp/portage/camstream-0.26.2/work/camstream-0.26.2 simon camstream-0.26.2 # patch -p0 < /tmp/configure-patch patching file configure Hunk #1 FAILED at 2731. Hunk #2 FAILED at 2750. 2 out of 2 hunks FAILED -- saving rejects to file configure.rej simon camstream-0.26.2 # cat configure.rej *************** *** 2731,2736 **** ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $QTDIR/bin:$PATH:/usr/bin:/usr/X11R6/bin:/usr/lib/qt/bin:/usr/lib/qt2/bin:/usr/lib/qt3/bin:/usr/local/qt/bin do IFS=$as_save_IFS --- 2731,2737 ---- ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + set -xv for as_dir in $QTDIR/bin:$PATH:/usr/bin:/usr/X11R6/bin:/usr/lib/qt/bin:/usr/lib/qt2/bin:/usr/lib/qt3/bin:/usr/local/qt/bin do IFS=$as_save_IFS *************** *** 2749,2755 **** esac fi MOC=$ac_cv_path_MOC - if test -n "$MOC"; then echo "$as_me:$LINENO: result: $MOC" >&5 echo "${ECHO_T}$MOC" >&6 --- 2750,2756 ---- esac fi MOC=$ac_cv_path_MOC + set +xv if test -n "$MOC"; then echo "$as_me:$LINENO: result: $MOC" >&5 echo "${ECHO_T}$MOC" >&6
please cd to /var/tmp/portage/camstream-0.26.2/work/camstream-0.26.2/camstream instead of /var/tmp/portage/camstream-0.26.2/work/camstream-0.26.2 before trying to apply the patch.
checking whether gcc needs -traditional... no checking for moc... + IFS= + test -z /usr/qt/3/bin:/sbin + test -f /usr/qt/3/bin:/sbin/moc + IFS= + test -z /usr/sbin + test -f /usr/sbin/moc + IFS= + test -z /usr/lib/portage/bin + test -f /usr/lib/portage/bin/moc + IFS= + test -z /bin + test -f /bin/moc + IFS= + test -z /usr/bin + test -f /usr/bin/moc + IFS= + test -z /usr/local/bin + test -f /usr/local/bin/moc + IFS= + test -z /opt/bin + test -f /opt/bin/moc + IFS= + test -z /usr/i686-pc-linux-gnu/gcc-bin/3.3 + test -f /usr/i686-pc-linux-gnu/gcc-bin/3.3/moc + IFS= + test -z /opt/Acrobat5 + test -f /opt/Acrobat5/moc + IFS= + test -z /usr/X11R6/bin + test -f /usr/X11R6/bin/moc + IFS= + test -z /opt/blackdown-jdk-1.4.1/bin + test -f /opt/blackdown-jdk-1.4.1/bin/moc + IFS= + test -z /opt/blackdown-jdk-1.4.1/jre/bin + test -f /opt/blackdown-jdk-1.4.1/jre/bin/moc + IFS= + test -z /usr/qt/3/bin:/usr/bin:/usr/X11R6/bin:/usr/lib/qt/bin:/usr/lib/qt2/bin:/usr/lib/qt3/bin:/usr/local/qt/bin + test -f /usr/qt/3/bin:/usr/bin:/usr/X11R6/bin:/usr/lib/qt/bin:/usr/lib/qt2/bin:/usr/lib/qt3/bin:/usr/local/qt/bin/moc + test -z '' + ac_cv_path_MOC=/usr/local/bin/moc MOC=$ac_cv_path_MOC + MOC=/usr/local/bin/moc set +xv + set +xv /usr/local/bin/moc checking for uic... /usr/local/bin/uic checking location of Qt header files... /usr/qt/3/include
Created attachment 20941 [details] Example for the problem I think I found the bug. Try "bash dummy2.sh" for better understanding. It worked on my system because /usr/qt/3/bin is neither at the start nor at the beginning of $PATH. The middle of it is split correctly. A fix for this will be in portage soon.
Done.
Just for your information: Apparently this was a bug in autoconf. The camstream author just re-ran a newer autoconf and the problem was solved.