My favorites | Sign in
Project Home Downloads Wiki Issues Source Code Search
New issue   Search
  Advanced search   Search tips   Subscriptions
Issue 2: Fails to buld from source
2 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Closed:  Sep 2008

Sign in to add a comment
Reported by, Sep 2, 2008
When compiling svn trunk with g++ 4.3.1 I get the following error.

g++ -o obj/release/accessors.o -c -ansi -pedantic -Wall -Werror -W
-Wno-unused-parameter -fno-strict-aliasing -O2 -fno-rtti -fno-exceptions -ansi
 -pedantic -Wall -Werror -W -Wno-unused-parameter -fno-strict-aliasing -O2
In file included from src/v8.h:62,
                 from src/
src/objects-inl.h:251: error: explicit template specialization cannot have
a storage class
src/objects-inl.h:298: error: explicit template specialization cannot have
a storage class

This seems to be fixed by the following patch, although I'm not quite sure
it's the right thing to do.

diff --git a/src/objects-inl.h b/src/objects-inl.h
index 3242e7a..4e6019d 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -246,7 +246,7 @@ bool Object::IsJSFunction() {
-template <> static inline bool Is<JSFunction>(Object* obj) {
+template <> inline bool Is<JSFunction>(Object* obj) {
   return obj->IsJSFunction();
@@ -293,7 +293,7 @@ bool Object::IsJSArray() {
-template <> static inline bool Is<JSArray>(Object* obj) {
+template <> inline bool Is<JSArray>(Object* obj) {
   return obj->IsJSArray();

After that being fixed, I get the following error:

g++ -o obj/release/platform-linux.o -c -ansi -pedantic -Wall -Werror -W
-Wno-unused-parameter -fno-strict-aliasing -O2 -fno-rtti -fno-exceptions
-ansi -pedantic -Wall -Werror -W -Wno-unused-parameter -fno-strict-aliasing
cc1plus: warnings being treated as errors
src/ In static member function 'static void
src/ error: array subscript is above array bounds

which vanishes after applying

diff --git a/src/ b/src/
index 050375e..c1b3845 100644
--- a/src/
+++ b/src/
@@ -291,7 +291,7 @@ void OS::LogSharedLibraryAddresses() {
     if (addr_buffer[2] != '-') return;
     read(fd, addr_buffer + 2, 8);
     unsigned end = StringToLongLong(addr_buffer);
-    char buffer[MAP_LENGTH];
+    char buffer[MAP_LENGTH + 1];
     int bytes_read = -1;
     do {

Both errors don't show up when using g++-4.2.
Sep 2, 2008
Reproduced the problem here (Debian Sid, g++ 4.3.1).

At the moment I'd prefer not to install the 4.2 release, so I'd like to know if the
above patches are correct. Thanks. :-)
Sep 3, 2008
Project Member #2
This has been fixed in the development branch.
Status: Fixed
Owner: christian.plesner.hansen
Sign in to add a comment

Powered by Google Project Hosting