码迷,mamicode.com
首页 > 其他好文 > 详细

QT环境搭建常见的bug解决 -->ld: cannot find –lbootstrap 错误

时间:2014-05-05 09:32:27      阅读:1967      评论:0      收藏:0      [点我收藏+]

标签:des   tar   ext   get   int   strong   

常见错误列表

一、编译arm环境的时候:

./configure -prefix $HOME/Qtenv/arm -embedded arm-nomake docs -nomake demo -nomake examples

1、configure完成之后,make出现问题:/usr/bin/ld: cannot find –lbootstrap 错误

         解决方法:提示找不到bootstrap库,而实际的qt中是由这个库的,就在src/tools/bootstrap/目录下,可以通过如下命令手动编译这个库:

                   cd/src/tools/bootstrap/

                   ../../../bin/qmake

                   make

这样做的话如果再回到qt安装目录运行make的话就不会出现上面的错误.

2、在编译Qt4.6.3的时候总是报这个错误:/usr/bin/ld: cannot find –lbootstrap

配置脚本如下:./configure -prefix $HOME/Qtenv/arm -embedded arm-nomake docs -nomake demo -nomake examples

但是,使用如下配置文件却正常编译完成,

$ ./configure -opensource -confirm-license -release -shared -embeddedarm -depths 16,18,24 -fast -optimized-qmake -pch -qt-sql-sqlite -qt-libjpeg-qt-zlib -qt-libpng -qt-freetype -little-endian -host-little-endian-no-qt3support -no-libtiff -no-libmng -no-opengl -no-mmx -no-sse -no-sse2-no-3dnow -no-webkit -no-phonon -no-nis -no-opengl -no-cups -no-glib-no-xcursor -no-xfixes -no-xrandr -no-xrender -no-separate-debug-info -nomakeexamples -nomake tools -nomake docs -qt-mouse-tslib -I/usr/local/tslib/include-L/usr/local/tslib/lib

二、在编译qt-x11-opensource-src-4.5.3是出现“Basic XLib functionality test failed“

解决方法:

此完整出错信息是在./configure阶段

Basic XLib functionality test failed!

You might need to modify the include andlibrary search paths by editing QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in /home/zhu/Qt/qt-x11-opensource-src-4.5.2/mkspecs/linux-g++

进config.test/x11/xlib执行make命令,看出错信息

g++ -Wl,-O1-o xlib xlib.o    -L/usr/X11R6/lib -lXext -lX11 –lm

/usr/bin/ld: cannot find –lXext

可以看到,g++在/usr/X11R6/lib下,找不到libXext.so

其原因就在于需要安装libX11的开发包,在ubuntu/debian里包名都是libX11-dev

根据以往的经验,在./configure前主动装好下面3个包,基本上就万事大吉了

sudo apt-get install libX11-dev libXext-devlibXtst-dev

问题解决!

三、

编译Qt/E-4.6.3出现的问题

<built-in>:0: note: candidates are:void* operator new(unsigned int)
make[1]: *** [.pch/release-shared-emb-arm/QtCore.gch/c++] 错误 1
make[1]: Leaving directory `/opt/qte-4.5.2/src/corelib‘
make: *** [sub-corelib-make_default-ordered] 错误 2

解决方法:./configure的参数问题,安装安装文档给出的选项即可完成。

四、/usr/bin/ld: cannot find -l* 错误的解决方法……

需要安装:libtools

五、

../bootstrap/libbootstrap.a: could not readsymbols: File in wrong format

collect2: ld returned 1 exit status

make[1]: *** [../../../bin/moc] Error 1

make[1]: Leaving directory

`/home/vikikivi/mini2440-bootstrap/qt-embedded-linux-opensource-src-4.5.3/src/to

ols/moc‘

make: *** [sub-moc-install_subtargets-ordered]Error 2

解决方案:严格按照./configure的选项进行设置。

六、

cannot find lGL

/usr/bin/ld: cannot find -lGL

$ sudo apt-get install libgl1-mesa-devlibgl1-mesa-dev 6.5.2-3ubuntu8

tslib安装

1.

make的时候 libtool:link: only absolute run-paths areallowed错误 
解决办法:
 要修改/tslib/plugins/Makefile里面找rpath
将LDFLAGS :=$(LDFLAGS) -rpath $(PLUGIN_DIR)
修改为:
LDFLAGS :=$(LDFLAGS) -rpath `cd $(PLUGIN_DIR)&& pwd`

2.

./configure--host=arm-linux的时候:
aclocal: configure.ac: 8: macro`AM_DISABLE_STATIC‘ not found in librar
这是因为没有安装libtool,安装libtool后即可

3.

错误1

Can‘t exec "libtoolize": No such fileor directory at /usr/bin/autoreconf line 190.

Use of uninitialized value $libtoolize in patternmatch (m//) at /usr/bin/autoreconf line 190.

configure.ac:25: error: possibly undefined macro:AC_DISABLE_STATIC

      If this token and others are legitimate, pleaseuse m4_pattern_allow.

      See the Autoconf documentation.

configure.ac:26: error: possibly undefined macro:AC_ENABLE_SHARED

configure.ac:27: error: possibly undefined macro:AC_LIBTOOL_DLOPEN

configure.ac:28: error: possibly undefined macro:AC_PROG_LIBTOOL

autoreconf: /usr/bin/autoconf failed with exitstatus: 1

解决方法在ubuntu下安装lobtool.deb

错误2

ts_test.o(.text+0x218): In function `main‘:

: undefined reference to `rpl_malloc‘

fbutils.o(.text+0x234): In function`open_framebuffer‘:

: undefined reference to `rpl_malloc‘

collect2: ld returned 1 exit status

make[2]: *** [ts_test] Error 1

make[2]: Leaving directory`/home/gfpeak/Desktop/tslib/tests‘

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory`/home/gfpeak/Desktop/tslib‘

make: *** [all] Error 2

解决方法是在编译的时候./configure后面的参数没有设置对,正确设置如下:

./configure--prefix=/usr/local/tslib/ --host=arm-linux ac_cv_func_malloc_0_nonnull=yes

错误3

在开发板上运行校正程序时出现No raw modules loaded

解决方法是把  tslib/etc目录下的ts.conf 的 "#module_raw input"的注释符号“#”去掉。但记住不要在前面留有 空格 ,否则会出现错误4

错误4

在开发板上运行校正程序时出现Segmentation fault

解决方法是看错误3。

/usr/include/bits/fcntl2.h:51: error: callto ‘__open_missing_mode’ declared with attribute error: open with O_CREAT insecond argument needs 3 arguments
make[2]: *** [ts_calibrate.o] Error 1
make[2]: Leaving directory `/root/soft/tslib/ts_lib/tslib/tests‘
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/soft/tslib/ts_lib/tslib‘

make: *** [all] Error 2

解决办法:将open函数的修改如下:

cal_fd = open("/etc/pointercal", O_CREAT | O_RDWR ,0);

QT环境搭建常见的bug解决 -->ld: cannot find –lbootstrap 错误,布布扣,bubuko.com

QT环境搭建常见的bug解决 -->ld: cannot find –lbootstrap 错误

标签:des   tar   ext   get   int   strong   

原文地址:http://www.cnblogs.com/ganrui/p/3708034.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!