MichaelBibby 发表于 2005-11-16 17:46:31

eva-0.3.2在OpenBSD 3.8上编译的问题

OS:OpenBSD 3.8 Release
KDE:3.4.2
EVA:0.3.2-1

$ ./configure --prefix=/usr/local/
.......
.......
.......
checking for Qt... configure: error: Qt (>= Qt 3.0) (headers and libraries) not found. Please check your installation!
For more details about this problem, look at the end of config.log.

已经装了KDE和QT:

$ pkg_info |grep -i kde
kde-i18n-zh_CN-3.4.2p1 zh_CN translations for KDE
kdeadmin-3.4.2      K Desktop Environment, admin tools
kdebase-3.4.2p0   K Desktop Environment, basic applications
kdelibs-3.4.2p0   K Desktop Environment, libraries
kdenetwork-3.4.2    K Desktop Environment, network applications
kdepim-3.4.2p1      KDE personal information applications
$ pkg_info |grep -i qt
qt3-mt-3.4p3      C++ X11 GUI toolkit

qt3-mt安装的文件和路径,都在附件里了(纯文本文档),还有一个是config.log文件。

还请指点一下该指定哪些编译选项和值,我试了好几个都没法成功。

多谢

yunfan 发表于 2005-11-16 20:29:47

bsd 实在是不懂, 还是得找个懂bsd的, 好像你有什么头文件没有装全, 我是看你的附件猜的,
不可为准

看你的那个附件, 你看一下是否qt的lib指定的有问题。

$ ./configure --prefix=/usr/local/ --with-qt-dir=/usr/local/lib/qt3 --with-qt-libraries=/usr/local/lib/

mandrakechina 发表于 2005-11-16 21:01:43

qt-3.4??? 哪里有这个版本?

MichaelBibby 发表于 2005-11-16 21:37:03

bsd 实在是不懂, 还是得找个懂bsd的, 好像你有什么头文件没有装全, 我是看你的附件猜的,
不可为准

看你的那个附件, 你看一下是否qt的lib指定的有问题。

$ ./configure --prefix=/usr/local/ --with-qt-dir=/usr/local/lib/qt3 --with-qt-libraries=/usr/local/lib/
BSD其实和LINUX在使用软件上差别不是很大。。。。。

我试了好几个选项,都无法通过,继续try吧 :)

MichaelBibby 发表于 2005-11-16 21:39:09

qt-3.4??? 哪里有这个版本?
是qt3-mt-3.4

MichaelBibby 发表于 2005-11-16 21:46:12

yunfan,这是我查看软件包安装情况时的输出:

$ pkg_info qt3-mt
Information for qt3-mt-3.4p3

Comment:
C++ X11 GUI toolkit

Required by:
kdepim-3.4.2p1
arts-1.4.2
kdenetwork-3.4.2
kdeadmin-3.4.2
kde-i18n-zh_CN-3.4.2p1
kdebase-3.4.2p0
kdelibs-3.4.2p0

Description:
Qt is a toolkit for building a GUI for X in C++.
There are some user documentation files in /usr/local/share/doc/qt3, but
the main documentation is in the qt3-html package,
or on the web (http://www.trolltech.com/qt/).

There is also a qt3-examples package, that contains a tutorial and
simple example programs (source + binaries).

There are database plugins: qt3-mysql and qt3-postgresql.

People who want to use qt3 to compile applications outside the ports tree
should note that qt3's installation conforms to OpenBSD habits, not
TrollTech's recommendations.
Accordingly:
- libs are separated from includes.
- moc is installed as /usr/local/bin/moc3, in order not to conflict
with other qt versions.
- uic is installed as /usr/local/bin/uic3

Generally, it's just a question of invoking

env MOC=moc3 UIC=uic3 configure --with-qt-includes=/usr/local/include/X11/qt3
      --with-qt-libraries=/usr/local/lib/qt3

Or to force MOC/UIC in your make/gmake invocation:
make MOC=moc3 UIC=uic3
will override the Makefile contents.

Warning: the qt3 library also appears under /usr/local/lib, but you
*must* make sure your application sees /usr/local/lib/qt3 *first*, because
/usr/local/lib may also contain a later incarnation of Qt, in which case
the linker will pick up the most recent library.

Maintainer: Marc Espie <[email protected]>

所以我在编译时加上了这些选项:

$ ./configure --prefix=/usr/local --with-qt-includes=/usr/local/include/X11/qt3 --with-qt-libraries=/usr/local/lib/qt3 --enable-mt --enable-thread

但是仍然无法通过,错误依然是:

checking for Qt... configure: error: Qt (>= Qt 3.0) (library qt-mt) not found. Please check your installation!
For more details about this problem, look at the end of config.log.
Make sure that you have compiled Qt with thread support!

mandrakechina 发表于 2005-11-16 22:08:29

- libs are separated from includes.是不是因为这个?BSD上是不是也有单独的libqt3-devel这样的包?

MichaelBibby 发表于 2005-11-16 22:17:54

- libs are separated from includes.是不是因为这个?BSD上是不是也有单独的libqt3-devel这样的包?太晚了,先回家了
明天在看看你说的这个问题 :)

如果你有兴趣,可以在这里找找有没有这个包(我粗略看了下,没有这个包。这是OPENBSD的一个镜像站点):
http://openbsd.md5.com.ar/pub/OpenBSD/3.8/packages/i386/

MichaelBibby 发表于 2005-11-17 12:36:09

又试了几次,还是不行,一样的错误提示 :cry:

yunfan 发表于 2005-11-17 12:55:40

:-( , 这个帮不上忙了, 只有看谁bsd熟悉一点的,看看能不能帮上忙了。sorry啊.

MichaelBibby 发表于 2005-11-17 13:15:58

:-( , 这个帮不上忙了, 只有看谁bsd熟悉一点的,看看能不能帮上忙了。sorry啊.
我想这个和BSD的关系不大,主要问题是指定正确目录的位置
不过偶就是没整明白正确的路径 :?

rebellor 发表于 2007-5-13 11:46:53

openbsd编译是连接出错,有人能看一下解析一下的吗?

问题如楼主,我用的是:qt3-mt-3.7p1,eva是:eva-0.4.1,我编译时把mt和threading关掉,语句是:
./configure --with-qt-includes=/usr/local/include/X11/qt3 --with-qt-libraries=/usr/local/lib/qt3 --with-qt-dir=/usr/local/bin --disable-mt --disable-threading --with-extra-includes=/usr/local/include --with-extra-libraries=/usr/local/lib
出错如下:
checking for Qt... configure: error: Qt (>= Qt 3.0) (library qt) not found. Please check your installation!
For more details about this problem, look at the end of config.log.
我打开config.log找到出错的那一行和出错提示是:
configure:28451: rm -rf SunWS_cache; g++ -o conftest -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -W -Wpointer-arith -Wwrite-strings -O2 -fno-exceptions -fno-check-new -fno-common -I/usr/local/include/X11/qt3 -I/usr/X11R6/include   -L/usr/local/lib/qt3 -L/usr/X11R6/lib   conftest.cc-lqt   -lXext -lX11 -lSM -lICE   1>&5
/usr/bin/ld: cannot find -lqt
collect2: ld returned 1 exit status

rebellor 发表于 2007-5-13 22:34:30

我手动把上面编译出错的语句改成下面的:
rm -rf SunWS_cache; g++ -o conftest -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -W -Wpointer-arith -Wwrite-strings -O2 -fno-exceptions -fno-check-new -fno-common -I/usr/local/include/X11/qt3 -I/usr/X11R6/include -L/usr/local/lib -L/usr/X11R6/lib conftest.cc -lqt-mt -lXext -lX11 -lSM -lICE 1>&5
现在返回的提示是:
/usr/local/lib/libqt-mt.so.30.3: warning: vsprintf() is often misused, please use vsnprintf()
/usr/local/lib/libqt-mt.so.30.3: warning: strcpy() is almost always misused, please use strlcpy()
/usr/local/lib/libqt-mt.so.30.3: warning: sprintf() is often misused, please use snprintf()
/usr/X11R6/lib/libX11.so.9.0: warning: strcat() is almost always misused, please use strlcat()
/usr/local/lib/libqt-mt.so.30.3: undefined reference to `pthread_cleanup_pop'
/usr/local/lib/libqt-mt.so.30.3: undefined reference to `pthread_attr_destroy'
/usr/local/lib/libqt-mt.so.30.3: undefined reference to `pthread_create'
/usr/local/lib/libqt-mt.so.30.3: undefined reference to `pthread_attr_init'
/usr/local/lib/libqt-mt.so.30.3: undefined reference to `pthread_exit'
/usr/local/lib/libqt-mt.so.30.3: undefined reference to `pthread_cancel'
/usr/local/lib/libqt-mt.so.30.3: undefined reference to `pthread_mutexattr_destroy'
/usr/local/lib/libqt-mt.so.30.3: undefined reference to `pthread_testcancel'
/usr/local/lib/libqt-mt.so.30.3: undefined reference to `pthread_cleanup_push'
/usr/local/lib/libqt-mt.so.30.3: undefined reference to `pthread_once'
/usr/local/lib/libqt-mt.so.30.3: undefined reference to `pthread_mutexattr_init'
/usr/local/lib/libqt-mt.so.30.3: undefined reference to `pthread_mutex_trylock'
/usr/local/lib/libqt-mt.so.30.3: undefined reference to `pthread_attr_setdetachstate'
/usr/local/lib/libqt-mt.so.30.3: undefined reference to `pthread_cond_timedwait'
collect2: ld returned 1 exit status
configure:28454: $? = 1
有人能给个提示的吗?
页: [1]
查看完整版本: eva-0.3.2在OpenBSD 3.8上编译的问题