Status: New
Owner: ----
New issue 3935 by [email protected]: SmartOS/solaris build failure:
invalid cast from type pthread_t
https://code.google.com/p/v8/issues/detail?id=3935
Version: 4.1.0.21 (but seems present in newer versions too)
OS: SunOS web01 5.11 joyent_20150219T102159Z i86pc i386 i86pc Solaris
Fails to compile because of an invalid cast:
cc '-DZ_HAVE_UNISTD_H' -I../deps/zlib -Wall -Wextra
-Wno-unused-parameter -m64 -pthreads -O3 -ffunction-sections
-fdata-sections -fno-omit-frame-pointer -MMD -MF
/home/admin/io.js/out/Release/.deps//home/admin/io.js/out/Release/obj.target/zlib/deps/zlib/adler32.o.d.raw
-c -o
/home/admin/io.js/out/Release/obj.target/zlib/deps/zlib/adler32.o ../deps/zlib/adler32.c
../deps/v8/src/base/platform/platform-posix.cc: In static member
function 'static int v8::base::OS::GetCurrentThreadId()':
../deps/v8/src/base/platform/platform-posix.cc:264:68: error: invalid cast
from type 'pthread_t {aka unsigned int}' to type 'intptr_t {aka long int}'
return static_cast<int>(reinterpret_cast<intptr_t>(pthread_self()));
^
../deps/v8/src/base/platform/platform-posix.cc:266:1: warning: control
reaches end of non-void function [-Wreturn-type]
}
^
deps/v8/tools/gyp/v8_libbase.target.mk:101: recipe for
target '/home/admin/io.js/out/Release/obj.target/v8_libbase/deps/v8/src/base/platform/platform-posix.o'
failed
make[1]: ***
[/home/admin/io.js/out/Release/obj.target/v8_libbase/deps/v8/src/base/platform/platform-posix.o]
Error 1
something ugly like this at least compiles but isn't the proper solution:
diff --git a/deps/v8/src/base/platform/platform-posix.cc
b/deps/v8/src/base/platform/platform-posix.cc
index 64aed2b..2cb3bbe 100644
--- a/deps/v8/src/base/platform/platform-posix.cc
+++ b/deps/v8/src/base/platform/platform-posix.cc
@@ -260,6 +260,8 @@ int OS::GetCurrentThreadId() {
return static_cast<int>(syscall(__NR_gettid));
#elif V8_OS_ANDROID
return static_cast<int>(gettid());
+#elif V8_OS_SOLARIS
+ return static_cast<int>(pthread_self());
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.