dart-lang/sdk

Dart_Snapshot conflicting uses

DartBot opened this issue · 19 comments

This issue was originally filed by nelson....@gmail.com


Trying to build Dart after clean checkout from SVN gives me :

runtime/vm/dart_api_impl.cc: In function ‘void* dart::Dart_CreateIsolate(void*, void*)’:
runtime/vm/dart_api_impl.cc:38:71: error: declaration of ‘void* dart::Dart_CreateIsolate(void*, void*)’ with C language linkage
runtime/include/dart_api.h:185:26: error: conflicts with previous declaration ‘void* Dart_CreateIsolate(const Dart_Snapshot*, void*)’

I ended up changing the dart_api_impl.cc declaration to use const Dart_Snapshot* and did a cast to (void*) in order to call Dart::CreateIsolate((void*)snapshot, data);

This comment was originally written by puffnfresh@gmail.com


Also getting this. I have GCC 4.5.2 installed.

This comment was originally written by zundel@google.com


FYI, successful build with gcc 4.4.3

This comment was originally written by nelson....@gmail.com


I'm also using GCC 4.5.2

This comment was originally written by rajaram...@gmail.com


Me too getting same GCC 4.5.2

gcc -v gives following error


Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.5.2-8ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.5/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.5 --enable-shared --enable-multiarch --with-multiarch-defaults=x86_64-linux-gnu --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib/x86_64-linux-gnu --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.5 --libdir=/usr/lib/x86_64-linux-gnu --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-gold --enable-ld=default --with-plugin-ld=ld.gold --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4)

This comment was originally written by zundel@google.com


Issue #8 has been merged into this issue.

This comment was originally written by zundel@google.com


Issue #9 has been merged into this issue.

This comment was originally written by waqn...@gmail.com


And again, the other errors from issue #9 (using ghc 4.6.1)

third_party/v8/src/ia32/full-codegen-ia32.cc: In member function ‘virtual void v8::internal::FullCodeGenerator::VisitCompareOperation(v8::internal::CompareOperation*)’:
third_party/v8/src/ia32/full-codegen-ia32.cc:4085:12: warning: variable ‘strict’ set but not used [-Wunused-but-set-variable]
  CXX(host) out/Debug_ia32/obj.host/v8_base/third_party/v8/src/ia32/lithium-gap-resolver-ia32.o
third_party/v8/src/ia32/lithium-codegen-ia32.cc: In member function ‘void v8::internal::LCodeGen::DoLoadKeyedFastDoubleElement(v8::internal::LLoadKeyedFastDoubleElement*)’:
third_party/v8/src/ia32/lithium-codegen-ia32.cc:2235:12: warning: variable ‘elements’ set but not used [-Wunused-but-set-variable]
third_party/v8/src/ia32/lithium-codegen-ia32.cc: In member function ‘void v8::internal::LCodeGen::DoStoreKeyedFastDoubleElement(v8::internal::LStoreKeyedFastDoubleElement*)’:
third_party/v8/src/ia32/lithium-codegen-ia32.cc:3100:12: warning: variable ‘elements’ set but not used [-Wunused-but-set-variable]
third_party/v8/src/ia32/lithium-codegen-ia32.cc:3101:12: warning: variable ‘key’ set but not used [-Wunused-but-set-variable]

third_party/v8/src/ia32/full-codegen-ia32.cc: In member function ‘virtual void v8::internal::FullCodeGenerator::VisitCompareOperation(v8::internal::CompareOperation*)’:
third_party/v8/src/ia32/full-codegen-ia32.cc:4085:12: warning: variable ‘strict’ set but not used [-Wunused-but-set-variable]
  CXX(target) out/Debug_ia32/obj.target/v8_base/third_party/v8/src/ia32/lithium-gap-resolver-ia32.o
third_party/v8/src/ia32/lithium-codegen-ia32.cc: In member function ‘void v8::internal::LCodeGen::DoLoadKeyedFastDoubleElement(v8::internal::LLoadKeyedFastDoubleElement*)’:
third_party/v8/src/ia32/lithium-codegen-ia32.cc:2235:12: warning: variable ‘elements’ set but not used [-Wunused-but-set-variable]
third_party/v8/src/ia32/lithium-codegen-ia32.cc: In member function ‘void v8::internal::LCodeGen::DoStoreKeyedFastDoubleElement(v8::internal::LStoreKeyedFastDoubleElement*)’:
third_party/v8/src/ia32/lithium-codegen-ia32.cc:3100:12: warning: variable ‘elements’ set but not used [-Wunused-but-set-variable]
third_party/v8/src/ia32/lithium-codegen-ia32.cc:3101:12: warning: variable ‘key’ set but not used [-Wunused-but-set-variable]

This comment was originally written by sa...@gmail.com


Workaround: Remove -Werror from dart/tools/gyp/configurations_make.gypi.

This comment was originally written by ghchi...@gmail.com


Using comment 8 workaround was able to build dart on 11.04 x32 gcc 4.5.2

This comment was originally written by sanxiy...@gmail.com


With r321, it compiles fine with GCC 4.6.1.

Issue #46 has been merged into this issue.

This comment was originally written by me....@gmail.com


latest revision r322 compiles fine with Ubuntu 11.04, GCC 4.5.2

This comment was originally written by drfibonacci@google.com


Set owner to zundel@google.com.
Added Accepted label.

This comment was originally written by zundel@google.com


Passing the buck to the VM team.


Set owner to @iposva-google.

This comment was originally written by zundel@google.com


Issue #52 has been merged into this issue.

This comment was originally written by ghchin...@gmail.com


r329 also compiles fine with Ubuntu 11.04, gcc 4.5.2

This comment was originally written by waq...@gmail.com


in r330, the "conflicts with previous declaration"-type errors are gone, however the "variable ‘X’ set but not used"-errors still occur with gcc 4.6.1 (prerelease on arch linux)

Fixed in https://code.google.com/p/dart/source/detail?r=321 which should be merged to trunk shortly.


Set owner to @a-siva.
Added Fixed label.

This comment was originally written by waq...@gmail.com


Could you revoke the classification of issue #9 as a duplicate, then? Issue #9 has been merged into this issue here, and it has not been fixed.