Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 31940 - camstream hard-coded uic/moc bin path
Summary: camstream hard-coded uic/moc bin path
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 30227 33053
  Show dependency tree
 
Reported: 2003-10-24 12:51 UTC by Simon Cooper
Modified: 2003-11-26 22:58 UTC (History)
1 user (show)

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


Attachments
qt path fix (qt_fix.patch,302 bytes, patch)
2003-10-24 12:52 UTC, Simon Cooper
Details | Diff
Trying to find moc (dummy.sh,248 bytes, text/plain)
2003-11-17 07:30 UTC, Patrick Kursawe (RETIRED)
Details
Makes configure more verbose (configure-patch,494 bytes, patch)
2003-11-17 23:40 UTC, Patrick Kursawe (RETIRED)
Details | Diff
Example for the problem (dummy2.sh,122 bytes, text/plain)
2003-11-19 02:24 UTC, Patrick Kursawe (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Cooper 2003-10-24 12:51:10 UTC
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:
Comment 1 Simon Cooper 2003-10-24 12:52:20 UTC
Created attachment 19741 [details, diff]
qt path fix
Comment 2 Caleb Tennis (RETIRED) gentoo-dev 2003-10-31 09:52:12 UTC
Patched.  Thanks.
Comment 3 Patrick Kursawe (RETIRED) gentoo-dev 2003-11-10 00:24:56 UTC
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?
Comment 4 Patrick Kursawe (RETIRED) gentoo-dev 2003-11-10 00:32:05 UTC
Since normally configure gets it right, the patch in this form doesn't help.
Comment 5 Simon Cooper 2003-11-10 00:37:29 UTC
$QTDIR isnt set in emerge info, in the enviroment settings it is set as /usr/qt/3
Comment 6 Patrick Kursawe (RETIRED) gentoo-dev 2003-11-10 00:51:12 UTC
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
Comment 7 Simon Cooper 2003-11-10 01:12:20 UTC
nothing is output
Comment 8 Patrick Kursawe (RETIRED) gentoo-dev 2003-11-10 01:21:34 UTC
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?
Comment 9 Simon Cooper 2003-11-10 01:41:23 UTC
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
Comment 10 Patrick Kursawe (RETIRED) gentoo-dev 2003-11-10 03:54:01 UTC
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
Comment 11 Simon Cooper 2003-11-10 07:39:31 UTC
output: Comment 7 should not exist
Comment 12 Patrick Kursawe (RETIRED) gentoo-dev 2003-11-11 03:18:40 UTC
Do you by chance have something strange in your PATH that makes you get this
result?
Comment 13 Patrick Kursawe (RETIRED) gentoo-dev 2003-11-14 00:55:55 UTC
Simon? Still there? What's in your $PATH?
Comment 14 Simon Cooper 2003-11-14 10:43:30 UTC
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
Comment 15 Patrick Kursawe (RETIRED) gentoo-dev 2003-11-17 07:30:24 UTC
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.
Comment 16 Simon Cooper 2003-11-17 09:30:08 UTC
simon@simon simon $ bash dummy.sh
found /usr/qt/3/bin/moc
Comment 17 Patrick Kursawe (RETIRED) gentoo-dev 2003-11-17 22:55:35 UTC
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.
Comment 18 Simon Cooper 2003-11-17 23:13:55 UTC
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*
Comment 19 Patrick Kursawe (RETIRED) gentoo-dev 2003-11-17 23:40:02 UTC
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? :-)
Comment 20 Simon Cooper 2003-11-18 14:14:03 UTC
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
Comment 21 Patrick Kursawe (RETIRED) gentoo-dev 2003-11-18 22:40:17 UTC
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.
Comment 22 Simon Cooper 2003-11-18 23:57:55 UTC
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
Comment 23 Patrick Kursawe (RETIRED) gentoo-dev 2003-11-19 02:24:15 UTC
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.
Comment 24 Patrick Kursawe (RETIRED) gentoo-dev 2003-11-19 03:18:11 UTC
Done.
Comment 25 Patrick Kursawe (RETIRED) gentoo-dev 2003-11-26 22:58:46 UTC
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.