h1aji / chmsee

CHM viewer
GNU General Public License v2.0
1 stars 1 forks source link

Compiling error #46

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I got the following errors when compiling after I got xulrunner updated.
seems a bug.

In file included from /usr/include/xulrunner-sdk-1.9/unstable/nsrootidl.h:11,
                 from /usr/include/xulrunner-sdk-1.9/unstable/nsISupports.h:10,
                 from
/usr/include/xulrunner-sdk-1.9/unstable/nsIWebBrowser.h:10,
                 from
/usr/include/xulrunner-sdk-1.9/unstable/gtkmozembed_internal.h:41,
                 from
/usr/include/xulrunner-sdk-1.9/unstable/gtkmozembed_glue.cpp:43,
                 from /root/Downloads/chmsee-1.0.6/src/gecko_utils.cpp:46:
/usr/include/xulrunner-sdk-1.9/unstable/nscore.h:51:21: error: prtypes.h:
No such file or directory
/usr/include/xulrunner-sdk-1.9/unstable/nscore.h:117:1: warning:
"NS_HIDDEN" redefined
In file included from /root/Downloads/chmsee-1.0.6/src/gecko_utils.h:44,
                 from /root/Downloads/chmsee-1.0.6/src/gecko_utils.cpp:42:
/usr/include/xulrunner-sdk-1.9/unstable/gtkmozembed.h:57:1: warning: this
is the location of the previous definition
In file included from /usr/include/xulrunner-sdk-1.9/unstable/nsrootidl.h:11,
                 from /usr/include/xulrunner-sdk-1.9/unstable/nsISupports.h:10,
                 from
/usr/include/xulrunner-sdk-1.9/unstable/nsIWebBrowser.h:10,
                 from
/usr/include/xulrunner-sdk-1.9/unstable/gtkmozembed_internal.h:41,
                 from
/usr/include/xulrunner-sdk-1.9/unstable/gtkmozembed_glue.cpp:43,
                 from /root/Downloads/chmsee-1.0.6/src/gecko_utils.cpp:46:
/usr/include/xulrunner-sdk-1.9/unstable/nscore.h:206:1: warning:
"NS_IMPORT_" redefined
In file included from /root/Downloads/chmsee-1.0.6/src/gecko_utils.h:44,
                 from /root/Downloads/chmsee-1.0.6/src/gecko_utils.cpp:42:
/usr/include/xulrunner-sdk-1.9/unstable/gtkmozembed.h:64:1: warning: this
is the location of the previous definition
In file included from /usr/include/xulrunner-sdk-1.9/unstable/nsrootidl.h:11,
                 from /usr/include/xulrunner-sdk-1.9/unstable/nsISupports.h:10,
                 from
/usr/include/xulrunner-sdk-1.9/unstable/nsIWebBrowser.h:10,
                 from
/usr/include/xulrunner-sdk-1.9/unstable/gtkmozembed_internal.h:41,
                 from
/usr/include/xulrunner-sdk-1.9/unstable/gtkmozembed_glue.cpp:43,
                 from /root/Downloads/chmsee-1.0.6/src/gecko_utils.cpp:46:
/usr/include/xulrunner-sdk-1.9/unstable/nscore.h:208:1: warning:
"NS_EXPORT_" redefined
In file included from /root/Downloads/chmsee-1.0.6/src/gecko_utils.h:44,
                 from /root/Downloads/chmsee-1.0.6/src/gecko_utils.cpp:42:
/usr/include/xulrunner-sdk-1.9/unstable/gtkmozembed.h:63:1: warning: this
is the location of the previous definition
In file included from /usr/include/xulrunner-sdk-1.9/unstable/nsISupports.h:10,
                 from
/usr/include/xulrunner-sdk-1.9/unstable/nsIWebBrowser.h:10,
                 from
/usr/include/xulrunner-sdk-1.9/unstable/gtkmozembed_internal.h:41,
                 from
/usr/include/xulrunner-sdk-1.9/unstable/gtkmozembed_glue.cpp:43,
                 from /root/Downloads/chmsee-1.0.6/src/gecko_utils.cpp:46:
/usr/include/xulrunner-sdk-1.9/unstable/nsrootidl.h:12:20: error: prtime.h:
No such file or directory
In file included from
/usr/include/xulrunner-sdk-1.9/unstable/nsEmbedString.h:43,
                 from /root/Downloads/chmsee-1.0.6/src/gecko_utils.cpp:54:
/usr/include/xulrunner-sdk-1.9/unstable/nsStringAPI.h:55:19: error:
prlog.h: No such file or directory
In file included from /root/Downloads/chmsee-1.0.6/src/gecko_utils.cpp:65:
/usr/include/xulrunner-sdk-1.9/unstable/nsILocalFile.h:17:18: error:
prio.h: No such file or directory
/usr/include/xulrunner-sdk-1.9/unstable/nsILocalFile.h:18:20: error:
prlink.h: No such file or directory
/usr/include/xulrunner-sdk-1.9/unstable/nscore.h:347: error: ‘PRUint32’
does not name a type
/usr/include/xulrunner-sdk-1.9/unstable/nscore.h:360: error: ‘PRUint32’
does not name a type
/usr/include/xulrunner-sdk-1.9/unstable/nsError.h:314: error: ‘nsresult’
does not name a type
/usr/include/xulrunner-sdk-1.9/unstable/nscore.h:424: error: ‘PRUint16’
does not name a type
/usr/include/xulrunner-sdk-1.9/unstable/nsID.h:60: error: ‘PRUint32’ does
not name a type
/usr/include/xulrunner-sdk-1.9/unstable/nsID.h:61: error: ‘PRUint16’ does
not name a type
/usr/include/xulrunner-sdk-1.9/unstable/nsID.h:62: error: ‘PRUint16’ does
not name a type
/usr/include/xulrunner-sdk-1.9/unstable/nsID.h:63: error: ‘PRUint8’ does
not name a type
/usr/include/xulrunner-sdk-1.9/unstable/nsID.h:76: error: ‘PRBool’ does not
name a type
/usr/include/xulrunner-sdk-1.9/unstable/nsID.h:95: error: ‘PRBool’ does not
name a type
/usr/include/xulrunner-sdk-1.9/unstable/nsISupportsBase.h:86: error:
‘nsresult’ does not name a type
/usr/include/xulrunner-sdk-1.9/unstable/nsISupportsBase.h:94: error:
‘nsrefcnt’ does not name a type
/usr/include/xulrunner-sdk-1.9/unstable/nsISupportsBase.h:103: error:
‘nsrefcnt’ does not name a type
/usr/include/xulrunner-sdk-1.9/unstable/nsXPCOM.h:101: error: ISO C++
forbids declaration of ‘nsresult’ with no type
/usr/include/xulrunner-sdk-1.9/unstable/nsXPCOM.h:101: error: typedef
‘nsresult’ is initialized (use __typeof__ instead)
/usr/include/xulrunner-sdk-1.9/unstable/nsXPCOM.h:101: error: ‘PR_CALLBACK’
was not declared in this scope
/usr/include/xulrunner-sdk-1.9/unstable/nsXPCOM.h:101: error:
‘nsGetModuleProc’ was not declared in this scope
/usr/include/xulrunner-sdk-1.9/unstable/nsXPCOM.h:139: error: ‘nsresult’
does not name a type
/usr/include/xulrunner-sdk-1.9/unstable/nsXPCOM.h:153: error:
‘nsGetModuleProc’ does not name a type
/usr/include/xulrunner-sdk-1.9/unstable/nsXPCOM.h:196: error: ‘nsresult’
does not name a type
/usr/include/xulrunner-sdk-1.9/unstable/nsXPCOM.h:216: error: ‘nsresult’
does not name a type
/usr/include/xulrunner-sdk-1.9/unstable/nsXPCOM.h:230: error: ‘nsresult’
does not name a type
/usr/include/xulrunner-sdk-1.9/unstable/nsXPCOM.h:243: error: ‘nsresult’
does not name a type
/usr/include/xulrunner-sdk-1.9/unstable/nsXPCOM.h:256: error: ‘nsresult’
does not name a type
/usr/include/xulrunner-sdk-1.9/unstable/nsXPCOM.h:269: error: ‘nsresult’
does not name a type
/usr/include/xulrunner-sdk-1.9/unstable/nsXPCOM.h:297: error: ‘nsresult’
does not name a type
/usr/include/xulrunner-sdk-1.9/unstable/nsXPCOM.h:302: error: ‘nsresult’
does not name a type
/usr/include/xulrunner-sdk-1.9/unstable/nsXPCOM.h:320: warning: ‘NS_Alloc’
initialized and declared ‘extern’
/usr/include/xulrunner-sdk-1.9/unstable/nsXPCOM.h:320: error: ‘PRSize’ was
not declared in this scope
/usr/include/xulrunner-sdk-1.9/unstable/nsXPCOM.h:341: error: ‘PRSize’ has
not been declared
/usr/include/xulrunner-sdk-1.9/unstable/nsXPCOM.h:383: warning:
‘NS_DebugBreak’ initialized and declared ‘extern’
/usr/include/xulrunner-sdk-1.9/unstable/nsXPCOM.h:383: error: variable or
field ‘NS_DebugBreak’ declared void
/usr/include/xulrunner-sdk-1.9/unstable/nsXPCOM.h:383: error: ‘PRUint32’
was not declared in this scope
/usr/include/xulrunner-sdk-1.9/unstable/nsXPCOM.h:384: error: expected
primary-expression before ‘const’
/usr/include/xulrunner-sdk-1.9/unstable/nsXPCOM.h:384: error: expected
primary-expression before ‘const’
/usr/include/xulrunner-sdk-1.9/unstable/nsXPCOM.h:385: error: expected
primary-expression before ‘const’
/usr/include/xulrunner-sdk-1.9/unstable/nsXPCOM.h:385: error: ‘PRInt32’ was
not declared in this scope
/usr/include/xulrunner-sdk-1.9/unstable/nsXPCOM.h:385: error: initializer
expression list treated as compound expression
/usr/include/xulrunner-sdk-1.9/unstable/nsXPCOM.h:420: error: ‘PRUint32’
has not been declared
/usr/include/xulrunner-sdk-1.9/unstable/nsXPCOM.h:423: error: ‘PRUint32’
has not been declared
/usr/include/xulrunner-sdk-1.9/unstable/nsXPCOM.h:436: error: ‘nsrefcnt’
has not been declared
/usr/include/xulrunner-sdk-1.9/unstable/nsXPCOM.h:437: error: ‘PRUint32’
has not been declared
/usr/include/xulrunner-sdk-1.9/unstable/nsXPCOM.h:440: error: ‘nsrefcnt’
has not been declared
/usr/include/xulrunner-sdk-1.9/unstable/nsXPCOM.h:463: error: ‘PRBool’ does
not name a type
/usr/include/xulrunner-sdk-1.9/unstable/nsXPCOM.h:466: error: ‘PRBool’ does
not name a type
/usr/include/xulrunner-sdk-1.9/unstable/nsXPCOM.h:550: error: ‘nsresult’
does not name a type
/usr/include/xulrunner-sdk-1.9/unstable/nsXPCOM.h:553: error: ‘nsresult’
does not name a type
/usr/include/xulrunner-sdk-1.9/unstable/nsDebug.h:275: error: expected
constructor, destructor, or type conversion before ‘void’
/usr/include/xulrunner-sdk-1.9/unstable/nsTraceRefcnt.h:102: error:
expected constructor, destructor, or type conversion before ‘class’
/usr/include/xulrunner-sdk-1.9/unstable/nsISupportsBase.h: In instantiation
of ‘const nsIID nsISupports::COMTypeInfo<int>::kIID’:
/usr/include/xulrunner-sdk-1.9/unstable/nsISupportsBase.h:69:  
instantiated from here
/usr/include/xulrunner-sdk-1.9/unstable/nsISupportsBase.h:69: error: too
many initializers for ‘const nsIID’
make[2]: *** [src/CMakeFiles/chmseelib.dir/gecko_utils.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/chmseelib.dir/all] Error 2
make: *** [all] Error 2

Original issue reported on code.google.com by blueflycn on 24 Jul 2009 at 7:23

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Hello,

what's your distribution? which version?

do you have installed libnspr4-dev package?

this package should be depended by xulrunner-1.9-dev.

thanks.

Original comment by lidaob...@gmail.com on 26 Jul 2009 at 12:23

GoogleCodeExporter commented 8 years ago
I guess I have nspr installed (and devel version), but it still reports the 
same error.
I am using CentOS 5.3 on an AMD64 platform. Do I need to update some software or
something else?

Original comment by blueflycn on 27 Jul 2009 at 3:28

GoogleCodeExporter commented 8 years ago
I see the same error here, building on openSUSE 11.2 (dev version).
I have mozilla-xulrunner-190-devel and mozilla-nspr4-devel installed.

The 'issue' at hand seems to be that prtypes.h is in /usr/include/nspr4, but 
the c++c
line is:
/usr/bin/c++   -DXPCOM_GLUE -I/usr/src/packages/BUILD/chmsee-1.0.6/src
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libxml2
-I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0
-I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/pixman-1
-I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/libglade-2.0
-I/usr/include/xulrunner-1.9.0.13/unstable   -Wall -pthread -fshort-wchar -o
CMakeFiles/chmseelib.dir/gecko_utils.cpp.o -c
/usr/src/packages/BUILD/chmsee-1.0.6/src/gecko_utils.cpp

It does not include a -I/usr/include/nspr4 parameter, and as such fails to find 
the
nspr4 headers.

Original comment by dominiqu...@gmail.com on 10 Aug 2009 at 3:20

GoogleCodeExporter commented 8 years ago
This patch solves it for me:

diff -ur chmsee-1.0.6.orig/CMakeLists.txt chmsee-1.0.6/CMakeLists.txt
--- chmsee-1.0.6.orig/CMakeLists.txt    2009-07-12 05:02:53.000000000 +0200
+++ chmsee-1.0.6/CMakeLists.txt 2009-08-10 17:30:53.000000000 +0200
@@ -2,7 +2,7 @@
 cmake_minimum_required(VERSION 2.6.2 FATAL_ERROR)
 set(PACKAGE_VERSION "1.0.6" )
 find_package(PkgConfig)
-pkg_check_modules (CHMSEE REQUIRED gthread-2.0 glib-2.0 libxml-2.0 gtk+-2.0
libglade-2.0 libxul-embedding-unstable>=1.9 
libxul-embedding-unstable<=1.9.0.999)
+pkg_check_modules (CHMSEE REQUIRED gthread-2.0 glib-2.0 libxml-2.0 gtk+-2.0
libglade-2.0 nspr libxul-embedding-unstable>=1.9 
libxul-embedding-unstable<=1.9.0.999)

 set(CHMSEE_BOOKMARK_FILE "chmsee_bookmarks")
 set(CHMSEE_BOOKINFO_FILE "chmsee_bookinfo")

Original comment by dominiqu...@gmail.com on 10 Aug 2009 at 3:33

GoogleCodeExporter commented 8 years ago
fixed in: 
http://github.com/lidaobing/chmsee/commit/c9a445c12ded12e940dde30b1c08f752738e6f
dd

Original comment by lidaob...@gmail.com on 14 Aug 2009 at 11:55

GoogleCodeExporter commented 8 years ago
Issue 10 has been merged into this issue.

Original comment by lidaob...@gmail.com on 14 Aug 2009 at 11:56

GoogleCodeExporter commented 8 years ago

Original comment by lidaob...@gmail.com on 14 Sep 2009 at 2:43