LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 806|回复: 9

安装xgl 编译compiz遇到困难!!!!!!!!!!!!

[复制链接]
发表于 2006-5-14 21:19:39 | 显示全部楼层 |阅读模式
安装了xgl

在编译compiz时 遇到一个了困难...
怀疑是 变量不正确 但又不知道为什么...

如果用 --disable-kde 可以编译通过 但我的桌面是kde

  1. make  all-am
  2. make[1]: Entering directory `/home/tmp/xgl/compiz-cvs/src/app-build/compiz/kde/window-decorator'
  3. if i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I../.. /opt/kde/include    -march=pentium3 -O3 -mfpmath=sse -mmmx -msse -pipe -fomit-frame-pointer -MT main.o -MD -MP -MF ".deps/main.Tpo" -c -o main.o main.cpp; \
  4.         then mv -f ".deps/main.Tpo" ".deps/main.Po"; else rm -f ".deps/main.Tpo"; exit 1; fi
  5. In file included from main.cpp:1:
  6. qdecorator.h:4:24: error: QApplication: No such file or directory
  7. qdecorator.h:5:17: error: QHash: No such file or directory
  8. main.cpp:4:17: error: QtGui: No such file or directory
  9. main.cpp:5:20: error: QX11Info: No such file or directory
  10. qdecorator.h:12: error: expected class-name before '{' token
  11. qdecorator.h:13: error: ISO C++ forbids declaration of 'Q_OBJECT' with no type
  12. qdecorator.h:14: error: expected ';' before 'public'
  13. qdecorator.h:18: error: 'XEvent' has not been declared
  14. qdecorator.h:21: error: ISO C++ forbids declaration of 'QHash' with no type
  15. qdecorator.h:21: error: expected ';' before '<' token
  16. main.cpp: In function 'bool check_dm_hint()':
  17. main.cpp:15: error: 'QX11Info' has not been declared
  18. main.cpp:15: error: 'display' was not declared in this scope
  19. main.cpp:23: error: 'QX11Info' has not been declared
  20. main.cpp:23: error: 'appScreen' was not declared in this scope
  21. main.cpp:28: error: 'FALSE' was not declared in this scope
  22. main.cpp:37: error: 'memcpy' was not declared in this scope
  23. main.cpp: In function 'int main(int, char**)':
  24. main.cpp:56: error: no matching function for call to 'QDecorator::QDecorator(int&, char**&)'
  25. qdecorator.h:12: note: candidates are: QDecorator::QDecorator()
  26. qdecorator.h:12: note:                 QDecorator::QDecorator(const QDecorator&)
  27. qdecorator.h:16: error: 'QDecorator::~QDecorator()' is private
  28. main.cpp:56: error: within this context
  29. main.cpp:60: error: 'stderr' was not declared in this scope
  30. main.cpp:61: error: 'fprintf' was not declared in this scope
  31. main.cpp:66: error: 'stderr' was not declared in this scope
  32. main.cpp:66: error: 'fprintf' was not declared in this scope
  33. main.cpp:67: error: 'exit' was not declared in this scope
  34. main.cpp:70: error: 'class QDecorator' has no member named 'exec'
  35. make[1]: *** [main.o] Error 1
  36. make[1]: Leaving directory `/home/tmp/xgl/compiz-cvs/src/app-build/compiz/kde/window-decorator'
  37. make: *** [all] Error 2
复制代码


同样在moc时 提示No relevant classes found

  1. [root@Arch window-decorator]# moc qwmwindow.h> qwmwindow.moc
  2. qwmwindow.h:0: Warning: No relevant classes found. No output generated.
复制代码


现在很郁闷... 烦劳各位高手帮忙看看 谢先了
 楼主| 发表于 2006-5-18 00:18:04 | 显示全部楼层
哪里有问题呢?
回复 支持 反对

使用道具 举报

发表于 2006-5-18 08:52:39 | 显示全部楼层
引用的好像都是Qt4的头文件。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-5-18 10:10:31 | 显示全部楼层
Post by 千里孤坟
引用的好像都是Qt4的头文件。


我认为也应该是这样 但我的qt4就在/opt/qt/下面 包括头文件
而且 已经加在变量中了

是不是 pkg-config的问题? 因为在开使的时候configure找不到kde-config 是我手动指定 还有其他变量
回复 支持 反对

使用道具 举报

发表于 2006-5-18 12:11:27 | 显示全部楼层
在没有确切的判断之所以找不到头文件的依据时,奴家会用这两个配置参数来解决:

--with-extra-libs=DIR
--with-extra-includes=DIR
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-5-18 12:34:54 | 显示全部楼层
Post by 千里孤坟
在没有确切的判断之所以找不到头文件的依据时,奴家会用这两个配置参数来解决:

--with-extra-libs=DIR
--with-extra-includes=DIR


多谢 现在在公司 晚上回家去试试
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-5-18 21:21:17 | 显示全部楼层
加了 --with-extra-libs=/opt/qt/lib --with-extra-includes=/opt/qt/includes
还是不行... 同样的错误提示...
回复 支持 反对

使用道具 举报

发表于 2006-5-19 08:57:53 | 显示全部楼层
在执行到出错的编译命令:

make[1]: Entering directory `/home/tmp/xgl/compiz-cvs/src/app-build/compiz/kde/window-decorator'
if i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I../.. /opt/kde/include    -march=pentium3 -O3 -mfpmath=sse -mmmx -msse -pipe -fomit-frame-pointer -MT main.o -MD -MP -MF ".deps/main.Tpo" -c -o main.o main.cpp; \
then mv -f ".deps/main.Tpo" ".deps/main.Po"; else rm -f ".deps/main.Tpo"; exit 1; fi

时,有没有读到类似-I../../opt/qt这样一段?没有的话执行make LDFLAGS="-I../../opt/qt -L/opt/qt"看看。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-5-19 12:08:48 | 显示全部楼层
出错信息就上面那些 应该是没有-I../../opt/qt...
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-5-19 18:56:41 | 显示全部楼层
问题依旧 提示依旧........

我要崩溃了...

我用的是archlinux
附上qt3.6的 pkgbuild


  1. # $Id: PKGBUILD,v 1.16 2006/03/23 14:41:21 tpowa Exp $
  2. # Maintainer: Tobias Powalowski <tpowa@archlinux.org>
  3. # Contributor: John Proctor <jproctor@prium.net>
  4. pkgname=qt
  5. pkgver=3.3.6
  6. pkgrel=2
  7. pkgdesc="The QT gui toolkit."
  8. url="http://www.trolltech.com/products/qt/index.html"
  9. pkgfqn=${pkgname}-x11-free-${pkgver}
  10. install=qt.install
  11. depends=('libpng' 'libjpeg' 'libxmu' 'libxcursor' 'libxinerama' 'mesa' \
  12.          'libxft' 'libxrandr')
  13. makedepends=('mysql' 'postgresql' 'sqlite3' 'unixodbc' 'libmng')
  14. source=(ftp://ftp.trolltech.com/qt/source/${pkgfqn}.tar.bz2 qt.profile \
  15.         qt-copy-kde-patches.tar.bz2 qt-patches.tar.bz2)

  16. # qt-copy-kde-patches come from http://websvn.kde.org/trunk/qt-copy/patches/
  17. # other qt-patches come from fedora and gentoo

  18. build() {
  19.   export QTDIR=$startdir/src/$pkgfqn
  20.   export PATH=${QTDIR}/bin:${PATH}
  21.   export LD_LIBRARY_PATH=${QTDIR}/lib:${LD_LIBRARY_PATH}
  22.   cd $startdir/src/$pkgfqn
  23.   # apply qt patches from kde.org
  24.   for i in ../qt-copy-kde-patches/*; do
  25.     patch -Np0 -i $i || return 1
  26.   done
  27.   # apply other qt patches and one security fix from debian/gentoo
  28.   for i in ../qt-patches/*; do
  29.     patch -Np1 -i $i || return 1
  30.   done

  31.   # start compiling qt
  32.   sed -i 's|-cp -P -f|-cp -L -f|' qmake/Makefile.unix
  33.   rm -rf doc/html examples tutorial
  34.   sed -i "s|sub-tutorial sub-examples||" Makefile
  35.   sed -i "s|-O2|$CXXFLAGS|" mkspecs/linux-g++/qmake.conf
  36.   sed -i "s|-I. |$CXXFLAGS -I. |" qmake/Makefile.unix
  37.   sed -i "s|read acceptance|acceptance=yes|" configure
  38.   ./configure -prefix /opt/qt -platform linux-g++ \
  39.     -system-zlib -qt-gif -release -shared -sm -nis -thread -stl \
  40.     -{system-lib,plugin-imgfmt-}{png,jpeg,mng} \
  41.     -no-g++-exceptions -plugin-sql-{mysql,psql,sqlite,odbc}

  42.   cd $startdir/src/$pkgfqn/plugins/src/sqldrivers/mysql
  43.   qmake -o Makefile "INCLUDEPATH+=/usr/include/mysql" "LIBS+=-L/usr/lib/mysql -lmysqlclient" mysql.pro
  44.   cd $startdir/src/$pkgfqn/plugins/src/sqldrivers/psql
  45.   qmake -o Makefile "INCLUDEPATH+=/usr/src/include /usr/include/postgresql/server" "LIBS+=-L/usr/lib -lpq" psql.pro

  46.   cd $startdir/src/$pkgfqn
  47.   # fix the broken makefiles
  48.   #sed -i 's|[[:space:]]*strip.*doc/html.*$|#|g' src/Makefile
  49.   make || return 1
  50.   make INSTALL_ROOT=$startdir/pkg install
  51.   rm -rf `find $startdir/pkg/opt/qt/mkspecs/* | grep -v linux-g++`
  52.   rm -rf $startdir/pkg/opt/qt/{phrasebooks,templates,translations}
  53.   sed -i "s|-L$startdir/src/$pkgfqn/lib ||g" $startdir/pkg/opt/qt/lib/*.prl
  54.   install -D -m755 qmake/qmake $startdir/pkg/opt/qt/bin/qmake
  55.   install -D -m755 $startdir/qt.profile $startdir/pkg/etc/profile.d/qt.sh

  56.   rm -f $startdir/pkg/opt/qt/mkspecs/linux-g++/linux-g++
  57.   # install man pages
  58.   mkdir -p $startdir/pkg/opt/qt/man
  59.   cp -r $startdir/src/$pkgfqn/doc/man/{man1,man3} $startdir/pkg/opt/qt/man/
  60.   #libtoolslay
  61.   find $startdir/pkg -name '*.la' -exec rm {} \;
  62. }
  63. md5sums=('dc1384c03ac08af21f6fefab32d982cf' '71fee534492524002eb06ddceecc98d9'\
  64.          '4b28b8a9461467bdeb8f1d6639d90ebb' 'c8937968e9807b3cdcdf0505728d99ce')
复制代码
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表