LinuxSir.cn,穿越时空的Linuxsir!

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

Has any guy compiled stardict without gnome successfully?(done it)

[复制链接]
发表于 2006-6-5 06:59:17 | 显示全部楼层 |阅读模式
debian 3.1 sarge, fvwm. libpcre3-dev has installed.
I want to install stardict without gnome. But debian's sources only have one with gnome.

# export PKG_CONFIG=/usr/bin/pkg-config
# ./configure --disable-gnome-support --prefix=/usr

...
...
...
Disable gnome support
checking for STARDICT... yes
checking for zlibVersion in -lz... yes
checking for DSL2DICT... configure: error: Package requirements (libpcre) were not met:

Package libpcre was not found in the pkg-config search path.
Perhaps you should add the directory containing `libpcre.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libpcre' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables DSL2DICT_CFLAGS
and DSL2DICT_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
...
...

What's the problem? libpcre3-dev has installed through apt-get, so I think the environment variable should be dealed automatically by debian.
If not, then what should I do? Set PKG_CONFIG_PATH? How?
发表于 2006-6-5 09:59:53 | 显示全部楼层
PKG_CONFIG_PATH指的是/usr/lib/pkgconfig:/usr/local/lib/pkgconfig这样的文件夹,里面包含*.pc文件。
所以最好先在这两个文件夹里面找找有没有libpcre.pc,默认应该是前一个文件夹。如果都没有的话,可以自己
写一个,就写它不依赖别的任何东西就行了。不用export PKG_CONFIG, 只需要
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-6-5 13:07:33 | 显示全部楼层
Thank you, what the meaning of 可以自己写一个,就写它不依赖别的任何东西就行了? I haven't the file libpcre.pc, how to create it?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-6-5 13:14:49 | 显示全部楼层
This is the file I create:

# cat libpcre.pc
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: libpcre
Description:
Version:
Requires:
Libs:

And it can be compile now, but when I "make" it, it prompt:

gcc -g -O2 -o pydict2dic pydict2dic.o -Wl,--export-dynamic  -L/usr/X11R6/lib /usr/lib/libgtk-x11-2.0.so /usr/lib/libgdk-x11-2.0.so /usr/lib/libatk-1.0.so /usr/lib/libgdk_pixbuf-2.0.so /usr/lib/libpangoxft-1.0.so /usr/lib/libpangox-1.0.so /usr/lib/libpango-1.0.so -lm /usr/lib/libgobject-2.0.so /usr/lib/libgmodule-2.0.so -ldl /usr/lib/libglib-2.0.so -lz -lX11
source='olddic2newdic.cpp' object='olddic2newdic.o' libtool=no \
DEPDIR=.deps depmode=none /bin/sh ../../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I../.. -Wall -DXTHREADS -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include    -I/usr/X11R6/include   -c -o olddic2newdic.o olddic2newdic.cpp
../../depcomp: line 414: exec: g++: not found
make[4]: *** [olddic2newdic.o] Error 127
make[4]: Leaving directory `/var/backups/setup/soft/stardict-2.4.7/src/tools'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/var/backups/setup/soft/stardict-2.4.7/src/tools'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/backups/setup/soft/stardict-2.4.7/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/backups/setup/soft/stardict-2.4.7'
make: *** [all] Error 2

What's wrong?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-6-5 13:20:15 | 显示全部楼层
It seems I miss to have some dev package, and which one should I choise?
libstdc++6-dev
libstdc++5-3.3-dev
libstdc++2.10-dev
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-6-5 13:41:16 | 显示全部楼层
OK, libstdc++5-3.3-dev can continue again, but another problem appears:

dsl2dict.o(.text+0x154):/var/backups/setup/soft/stardict-2.4.7/src/tools/dsl2dict.c:331: undefined reference to `pcre_study'
dsl2dict.o(.text+0x4cc): In function `make_dict':
/var/backups/setup/soft/stardict-2.4.7/src/tools/dsl2dict.c:428: undefined reference to `pcre_exec'
dsl2dict.o(.text+0xdd4): In function `main':
/var/backups/setup/soft/stardict-2.4.7/src/tools/dsl2dict.c:609: undefined reference to `pcre_callout'
collect2: ld returned 1 exit status
make[4]: *** [dsl2dict] Error 1
make[4]: Leaving directory `/var/backups/setup/soft/stardict-2.4.7/src/tools'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/var/backups/setup/soft/stardict-2.4.7/src/tools'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/backups/setup/soft/stardict-2.4.7/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/backups/setup/soft/stardict-2.4.7'
make: *** [all] Error 2
回复 支持 反对

使用道具 举报

发表于 2006-6-6 13:23:49 | 显示全部楼层
查一下pcre安装到什么地方了。
#dpkg -L libpcre
确定没有libpcre.pc文件的话,可以自己写,但是要写对路径。

给个例子
#cat /usr/lib/pkgconfig/libpcre.pc

prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: libpcre
Description: PCRE - Perl compatible regular expressions C library
Version: 6.4
Libs: -L${libdir} -lpcre
Cflags: -I${includedir}
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-6-7 06:22:26 | 显示全部楼层
I'm very appreciate it. I've done.
Post by izzystar
不用export PKG_CONFIG

It must export, or it will fail.
Thank you very much!
回复 支持 反对

使用道具 举报

发表于 2006-6-7 07:05:47 | 显示全部楼层
没装 pcre ?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-6-7 12:16:28 | 显示全部楼层
No, only due to libpcre.pc's problem, thank izzystar.
excellent!
回复 支持 反对

使用道具 举报

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

本版积分规则

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