JackieXie168 / chmsee

Automatically exported from code.google.com/p/chmsee
GNU General Public License v2.0
0 stars 0 forks source link

fedora12上编译1.1.0-beta出错 #69

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.在编译过程中过程中出错
2.信赖应该都没有问题,因为已经到了make all这一步了。

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
1.1.0-beta版

Please provide any additional information below.
以下是编译过程:
[yunkai@yahoo ~/Download/build]$ cmake ../chmsee-1.1.0-beta
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- checking for modules 'gthread-2.0;glib-2.0;libxml-2.0;gtk+-2.0>=2.16;nspr'
--   found gthread-2.0, version 2.22.5
--   found glib-2.0, version 2.22.5
--   found libxml-2.0, version 2.7.6
--   found gtk+-2.0, version 2.18.7
--   found nspr, version 4.8.4
-- checking for one of the modules
'mozilla-gtkmozembed-embedding>=1.9;xulrunner-gtkmozembed>=1.9'
--   found mozilla-gtkmozembed-embedding, version 1.9.1
-- Configuring done
-- Generating done
-- Build files have been written to: /home/yunkai/Download/build
[yunkai@yahoo ~/Download/build]$ ls
CMakeCache.txt  CMakeFiles  cmake_install.cmake  CPackConfig.cmake 
CPackSourceConfig.cmake  data  Makefile  po  src
[yunkai@yahoo ~/Download/build]$ make
Scanning dependencies of target chmseelib
[  2%] Building C object src/CMakeFiles/chmseelib.dir/chmsee.c.o
[  4%] Building C object src/CMakeFiles/chmseelib.dir/startup.c.o
[  6%] Building C object src/CMakeFiles/chmseelib.dir/setup.c.o
[  9%] Building C object src/CMakeFiles/chmseelib.dir/utils.c.o
[ 11%] Building C object src/CMakeFiles/chmseelib.dir/components/book.c.o
[ 13%] Building C object src/CMakeFiles/chmseelib.dir/components/toc.c.o
[ 16%] Building C object src/CMakeFiles/chmseelib.dir/components/index.c.o
[ 18%] Building C object src/CMakeFiles/chmseelib.dir/components/bookmarks.c.o
[ 20%] Building C object src/CMakeFiles/chmseelib.dir/components/treeview.c.o
[ 23%] Building C object src/CMakeFiles/chmseelib.dir/components/html-gecko.c.o
[ 25%] Building CXX object
src/CMakeFiles/chmseelib.dir/components/gecko-utils.cpp.o
In file included from /usr/include/xulrunner-sdk-1.9.1/unstable/nsrootidl.h:11,
                 from
/usr/include/xulrunner-sdk-1.9.1/unstable/nsISupports.h:10,
                 from
/usr/include/xulrunner-sdk-1.9.1/unstable/nsIWebBrowser.h:10,
                 from
/usr/include/xulrunner-sdk-1.9.1/unstable/gtkmozembed_internal.h:41,
                 from
/usr/include/xulrunner-sdk-1.9.1/unstable/gtkmozembed_glue.cpp:43,
                 from
/home/yunkai/Download/chmsee-1.1.0-beta/src/components/gecko-utils.cpp:46:
/usr/include/xulrunner-sdk-1.9.1/unstable/nscore.h:119:1: warning:
"NS_HIDDEN" redefined
In file included from
/home/yunkai/Download/chmsee-1.1.0-beta/src/components/gecko-utils.cpp:45:
/usr/include/xulrunner-sdk-1.9.1/unstable/gtkmozembed.h:57:1: warning: this
is the location of the previous definition
In file included from /usr/include/xulrunner-sdk-1.9.1/unstable/nsrootidl.h:11,
                 from
/usr/include/xulrunner-sdk-1.9.1/unstable/nsISupports.h:10,
                 from
/usr/include/xulrunner-sdk-1.9.1/unstable/nsIWebBrowser.h:10,
                 from
/usr/include/xulrunner-sdk-1.9.1/unstable/gtkmozembed_internal.h:41,
                 from
/usr/include/xulrunner-sdk-1.9.1/unstable/gtkmozembed_glue.cpp:43,
                 from
/home/yunkai/Download/chmsee-1.1.0-beta/src/components/gecko-utils.cpp:46:
/usr/include/xulrunner-sdk-1.9.1/unstable/nscore.h:208:1: warning:
"NS_IMPORT_" redefined
In file included from
/home/yunkai/Download/chmsee-1.1.0-beta/src/components/gecko-utils.cpp:45:
/usr/include/xulrunner-sdk-1.9.1/unstable/gtkmozembed.h:64:1: warning: this
is the location of the previous definition
In file included from /usr/include/xulrunner-sdk-1.9.1/unstable/nsrootidl.h:11,
                 from
/usr/include/xulrunner-sdk-1.9.1/unstable/nsISupports.h:10,
                 from
/usr/include/xulrunner-sdk-1.9.1/unstable/nsIWebBrowser.h:10,
                 from
/usr/include/xulrunner-sdk-1.9.1/unstable/gtkmozembed_internal.h:41,
                 from
/usr/include/xulrunner-sdk-1.9.1/unstable/gtkmozembed_glue.cpp:43,
                 from
/home/yunkai/Download/chmsee-1.1.0-beta/src/components/gecko-utils.cpp:46:
/usr/include/xulrunner-sdk-1.9.1/unstable/nscore.h:210:1: warning:
"NS_EXPORT_" redefined
In file included from
/home/yunkai/Download/chmsee-1.1.0-beta/src/components/gecko-utils.cpp:45:
/usr/include/xulrunner-sdk-1.9.1/unstable/gtkmozembed.h:63:1: warning: this
is the location of the previous definition
/home/yunkai/Download/chmsee-1.1.0-beta/src/components/gecko-utils.cpp:116:
warning: ‘gboolean gecko_prefs_set_bool(const gchar*, gboolean)’ defined
but not used
[ 27%] Building C object src/CMakeFiles/chmseelib.dir/models/bookmarksfile.c.o
[ 30%] Building C object src/CMakeFiles/chmseelib.dir/models/chmfile.c.o
/home/yunkai/Download/chmsee-1.1.0-beta/src/models/chmfile.c: In function
‘_extract_callback’:
/home/yunkai/Download/chmsee-1.1.0-beta/src/models/chmfile.c:241: warning:
unused variable ‘file_ext’
[ 32%] Building C object src/CMakeFiles/chmseelib.dir/models/parser.c.o
[ 34%] Building C object src/CMakeFiles/chmseelib.dir/models/link.c.o
Linking CXX static library libchmseelib.a
[ 34%] Built target chmseelib
Scanning dependencies of target chmsee
[ 37%] Building C object src/CMakeFiles/chmsee.dir/main.c.o
Linking C executable chmsee
libchmseelib.a(gecko-utils.cpp.o):(.rodata._ZTV15nsCOMPtr_helper[vtable for
nsCOMPtr_helper]+0x8): undefined reference to `__cxa_pure_virtual'
libchmseelib.a(gecko-utils.cpp.o):(.rodata._ZTI15nsCOMPtr_helper[typeinfo
for nsCOMPtr_helper]+0x0): undefined reference to `vtable for
__cxxabiv1::__class_type_info'
libchmseelib.a(gecko-utils.cpp.o):(.eh_frame+0x12): undefined reference to
`__gxx_personality_v0'
libchmseelib.a(gecko-utils.cpp.o):(.eh_frame+0x93): undefined reference to
`__gxx_personality_v0'
/usr/lib/xulrunner-sdk-1.9.1/lib/libxpcomglue.a(nsCOMPtr.o):(.data.DW.ref.__gxx_
personality_v0[DW.ref.__gxx_personality_v0]+0x0):
undefined reference to `__gxx_personality_v0'
/usr/lib/xulrunner-sdk-1.9.1/lib/libxpcomglue.a(nsGREGlue.o): In function
`GRE_GetGREPathWithProperties':
(.text+0x3d6): undefined reference to `operator new[](unsigned int)'
/usr/lib/xulrunner-sdk-1.9.1/lib/libxpcomglue.a(nsGREGlue.o): In function
`nsINIParser::~nsINIParser()':
(.text._ZN11nsINIParserD2Ev[_ZN11nsINIParserD5Ev]+0x1f): undefined
reference to `operator delete[](void*)'
/usr/lib/xulrunner-sdk-1.9.1/lib/libxpcomglue.a(nsGlueLinkingDlopen.o): In
function `XPCOMGlueUnload()':
(.text+0xef): undefined reference to `operator delete(void*)'
/usr/lib/xulrunner-sdk-1.9.1/lib/libxpcomglue.a(nsGlueLinkingDlopen.o): In
function `XPCOMGlueLoad(char const*)':
(.text+0x20a): undefined reference to `operator new(unsigned int)'
/usr/lib/xulrunner-sdk-1.9.1/lib/libxpcomglue.a(nsGlueLinkingDlopen.o): In
function `ReadDependentCB(char const*)':
(.text+0x294): undefined reference to `operator new(unsigned int)'
/usr/lib/xulrunner-sdk-1.9.1/lib/libxpcomglue.a(nsINIParser.o): In function
`nsINIParser::InitFromFILE(_IO_FILE*)':
(.text+0x232): undefined reference to `operator new[](unsigned int)'
/usr/lib/xulrunner-sdk-1.9.1/lib/libxpcomglue.a(nsINIParser.o): In function
`nsINIParser::InitFromFILE(_IO_FILE*)':
(.text+0x248): undefined reference to `operator delete[](void*)'
/usr/lib/xulrunner-sdk-1.9.1/lib/libxpcomglue.a(nsINIParser.o): In function
`nsINIParser::InitFromFILE(_IO_FILE*)':
(.text+0x382): undefined reference to `operator new(unsigned int)'
/usr/lib/xulrunner-sdk-1.9.1/lib/libxpcomglue.a(nsINIParser.o): In function
`nsAutoPtr<nsINIParser::INIValue>::~nsAutoPtr()':
(.text._ZN9nsAutoPtrIN11nsINIParser8INIValueEED2Ev[_ZN9nsAutoPtrIN11nsINIParser8
INIValueEED5Ev]+0x29):
undefined reference to `operator delete(void*)'
/usr/lib/xulrunner-sdk-1.9.1/lib/libxpcomglue.a(nsINIParser.o): In function
`nsAutoPtr<nsINIParser::INIValue>::operator=(nsINIParser::INIValue*)':
(.text._ZN9nsAutoPtrIN11nsINIParser8INIValueEEaSEPS1_[nsAutoPtr<nsINIParser::INI
Value>::operator=(nsINIParser::INIValue*)]+0x33):
undefined reference to `operator delete(void*)'
collect2: ld returned 1 exit status
make[2]: *** [src/chmsee] Error 1
make[1]: *** [src/CMakeFiles/chmsee.dir/all] Error 2
make: *** [all] Error 2

Original issue reported on code.google.com by chinainv...@gmail.com on 27 Mar 2010 at 8:29

GoogleCodeExporter commented 8 years ago
sorry,有一些错字,
What steps will reproduce the problem?
1.在编译过程中出错
2.依赖应该都没有问题,因为已经到了make all这一步了。

To jungleji:
我之前提交的BUG为:chmsee不能查看chm中的图片
http://code.google.com/p/chmsee/issues/detail?id=68

你建议我使用1.1.0-beta版,所以在编译过程中,出现这个问题�
��

Original comment by chinainv...@gmail.com on 27 Mar 2010 at 8:32

GoogleCodeExporter commented 8 years ago
在 make 命令后面加上 VERBOSE=1, 即:

$ make VERBOSE=1

再把错误信息发上来看看。

Original comment by jungl...@gmail.com on 27 Mar 2010 at 5:11

GoogleCodeExporter commented 8 years ago
有一个地方可能是造成编译出错的原因:修改 
chmsee-1.1.0-beta/CMakeLists.txt, 将
# Set RPATH for installing
set(CMAKE_SKIP_BUILD_RPATH FALSE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
set(CMAKE_INSTALL_RPATH ${CMAKE_SYSTEM_LIBRARY_PATH})
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
这些行都注释掉,然后重新进行 cmake 和 make 过程。

Original comment by jungl...@gmail.com on 27 Mar 2010 at 5:23

GoogleCodeExporter commented 8 years ago
在 Gentoo下編譯也有相同的情形,以下是編譯環境:
glib-2.22.4
libxml2-2.7.3-r2
libglade-2.6.4
gtk+-2.18.6
chmlib-0.40
libgcrypt-1.4.5
xulrunner-1.9.2.2-r1
gettext-0.17-r1
intltool-0.41.0
依照Comment 3 
的方式修改,再編譯一次,也同樣無法編譯成功。

Original comment by chang001...@gmail.com on 28 Mar 2010 at 2:58

GoogleCodeExporter commented 8 years ago
在 Gentoo下編譯也有相同的情形,以下是編譯環境:
glib-2.22.4
libxml2-2.7.3-r2
libglade-2.6.4
gtk+-2.18.6
chmlib-0.40
libgcrypt-1.4.5
xulrunner-1.9.2.2-r1
gettext-0.17-r1
intltool-0.41.0
依照Comment 3 
的方式修改,再編譯一次,也同樣無法編譯成功。

Original comment by chang001...@gmail.com on 28 Mar 2010 at 3:10

Attachments:

GoogleCodeExporter commented 8 years ago
多谢你提供的 errors,我看到了问题所在。

在出错的那一步,你系统上是:
Linking C executable chmsee
...
/usr/bin/gcc  -O3 -DNDEBUG  -fPIC CMakeFiles/chmsee.dir/main.c.o  -o chmsee ...

而我这里是:
Linking CXX executable chmsee
...
/usr/bin/c++   -O3 -DNDEBUG   CMakeFiles/chmsee.dir/main.c.o  -o chmsee  ...

临时解决方法将 main.c 改名为 main.cpp,并修改 src/CMakeLists.txt 
里面对应的文件名。

Original comment by jungl...@gmail.com on 28 Mar 2010 at 4:29

GoogleCodeExporter commented 8 years ago
TO  jungleji:

"临时解决方法将 main.c 改名为 main.cpp,并修改 src/CMakeLists.txt 
里面对应的文件名。"

这个方法可行。

但是,这个1.1.0-beta版本同样看不到图片,是不是我们的APUE2��
�一样?

我把我的APUE2放在附件中,你打开试试看,同样附上我的这边
的截图:

Original comment by chinainv...@gmail.com on 28 Mar 2010 at 5:11

Attachments:

GoogleCodeExporter commented 8 years ago
点击截图中的“View Full size image”,报如下错误:
The file
/home/yunkai/.chmsee/bookshelf/ea26c7c8e74a6951a7a79292956ab0f5/0201433079/image
s/0201433079/graphics/xxviifig01_alt.gif;423615
cannot be found. Please check the location and try again.

应该是对图片的地址,在读取时,出了问题。多出了“;423615�
��这部分。

Original comment by chinainv...@gmail.com on 28 Mar 2010 at 5:17

GoogleCodeExporter commented 8 years ago
我打开你上传的文件也可以显示图片,见附件。

你再测一下:
在该页点右键,复制连接地址,然后粘贴到 firefox 
地址栏,看它能不能显示图片。

另外,标题栏为 (null),也很奇怪。
你在命令行上打开 chmsee 
-vvv,然后将输出信息发上来,我看看哪里出了问题。

Original comment by jungl...@gmail.com on 28 Mar 2010 at 6:30

Attachments:

GoogleCodeExporter commented 8 years ago
[yunkai@yahoo ~/Download/build]$ chmsee -vvv
** Message: Main >>> load config
** (chmsee:3820): DEBUG: Main >>> chmsee config file path = 
/home/yunkai/.chmsee/config
** (chmsee:3820): DEBUG: Main >>> chmsee load config file return = 1
** Message: CS_HTML_GECKO >>> init gecko system
** (chmsee:3820): DEBUG: GECKO_UTILS >>> initilize finished.
** (chmsee:3820): DEBUG: CS_BOOK >>> create
** (chmsee:3820): DEBUG: Chmsee >>> populate window finished.
** (chmsee:3820): DEBUG: GECKO_UTILS >>> set default lang
** (chmsee:3820): DEBUG: CS_BOOK >>> set hpaned position = 200
** Message: Chmsee >>> created
** (chmsee:3820): DEBUG: Chmsee >>> on_window_state_event with 
event->changed_mask =
1 and event->new_window_state = 0

Original comment by chinainv...@gmail.com on 28 Mar 2010 at 6:37

GoogleCodeExporter commented 8 years ago
TO jungleji:

1、我这边图片显示不了的问题,我直接使用fedora12下的firefox(
3.5.8)输入连接地址,也无法
显示。但在google chrome(5.0.342.7 beta)下可以显示。

难道是firefox的lib的问题?

你的系统情况是怎样的?

2、1.1.0-beda在打开APUE2时,页内的连接也无法跳转。

3、标题为null这个问题,1.0.7版在我这边也存在同样的问题。

Original comment by chinainv...@gmail.com on 28 Mar 2010 at 6:42

GoogleCodeExporter commented 8 years ago
title为null的 -vvv info,见附件

Original comment by chinainv...@gmail.com on 28 Mar 2010 at 6:46

Attachments:

GoogleCodeExporter commented 8 years ago
我上面抓图用的系统是 debian 32, xulrunner 1.9.1.8, firefox 3.5.8。
测试了其他几个系统包括 archlinux, NetBSD 
中也可以看到图片。因为 ';' 是 uri 标准里面
的保留字,估计默认的 xulrunner 
是不支持的,而这几个系统刚好自己打了补丁。

标题为 null 的问题, 你删除 
.chmsee/bookshelf/ea26c7c8e74a6951a7a79292956ab0f5 这个目
录,再打开 apue 看看。

问题 2,是所有的链接都不行吗,包括里面的 PREV NEX 
那种连接?

Original comment by jungl...@gmail.com on 28 Mar 2010 at 8:16

GoogleCodeExporter commented 8 years ago
问题2, 刚测试了PREV NEXT也不行。

Original comment by chinainv...@gmail.com on 28 Mar 2010 at 9:52

GoogleCodeExporter commented 8 years ago
惊喜!!!

刚才我把.chmsee下的所有内容都清空后,图片也能看到了。

但是“问题2”仍然存在,连接打不开(包括PREV NEXT)。

快接近完美了!

Original comment by chinainv...@gmail.com on 28 Mar 2010 at 9:56

GoogleCodeExporter commented 8 years ago
当然点击“NEXT”时(使用chmsee -vvv),命令行的信息如下:
** (chmsee:6126): DEBUG: CS_HTML_GECKO >>> grab focus callback
** (chmsee:6126): DEBUG: CS_HTML_GECKO >>> send open-uri signal, uri =
file:///home/yunkai/.chmsee/bookshelf/ea26c7c8e74a6951a7a79292956ab0f5/020143307
9/toc.html

(chmsee:6126): GLib-GObject-CRITICAL **: g_value_get_pointer: assertion
`G_VALUE_HOLDS_POINTER (value)' failed
** (chmsee:6126): DEBUG: CS_BOOK >>> enter html_open_uri_cb with uri = (null)

(chmsee:6126): GLib-CRITICAL **: g_uri_parse_scheme: assertion `uri != NULL' 
failed

Original comment by chinainv...@gmail.com on 28 Mar 2010 at 10:01

GoogleCodeExporter commented 8 years ago
TO  jungleji:
"临时解决方法将 main.c 改名为 main.cpp,并修改 src/CMakeLists.txt 
里面对应的文件名。"
在Gentoo可以編譯成功,而且執行正常,感謝!

BTW,Makefile 中沒有 uninstall option,那該如何做移除的動作呢?

Original comment by chang001...@gmail.com on 28 Mar 2010 at 10:47

GoogleCodeExporter commented 8 years ago
To chang0010934:

也感谢你帮忙测试!

cmake 里面没有提供 uninstall:
http://www.cmake.org/Wiki/CMake_FAQ#Can_I_do_.22make_uninstall.22_with_CMake.3F

要删除,只有按上面说的,参考 install_manifest.txt 手动操作。

Original comment by jungl...@gmail.com on 28 Mar 2010 at 2:52

GoogleCodeExporter commented 8 years ago
Comment 16 问题:

按下面 diff 改一行代码,看是否有效。

diff --git a/src/components/html-gecko.c b/src/components/html-gecko.c
index 4706203..c137a7b 100644
--- a/src/components/html-gecko.c
+++ b/src/components/html-gecko.c
@@ -102,7 +102,7 @@ cs_html_gecko_class_init(CsHtmlGeckoClass *klass)
                              NULL, NULL,
                              gtk_marshal_BOOLEAN__POINTER,
                              G_TYPE_BOOLEAN,
-                             1, G_TYPE_STRING);
+                             1, G_TYPE_POINTER);

         signals[CONTEXT_NORMAL] =

Original comment by jungl...@gmail.com on 28 Mar 2010 at 3:44

GoogleCodeExporter commented 8 years ago
TO Comment 19:
链接的问题解决了!
非常感谢jungleji:D。

Original comment by chinainv...@gmail.com on 29 Mar 2010 at 2:38

GoogleCodeExporter commented 8 years ago
To chinainvent.zyk: 

也要好好谢谢你!

Original comment by jungl...@gmail.com on 29 Mar 2010 at 6:39