ekibun / flutter_qjs

A quickjs engine for flutter.
https://pub.dev/packages/flutter_qjs
MIT License
146 stars 28 forks source link

Get error "expected ';' " when run "sh make.sh" #10

Closed lookdczar closed 3 years ago

lookdczar commented 3 years ago

mkdir: build: File exists -- Configuring done -- Generating done -- Build files have been written to: /Users/xx/Documents/work/share/libs/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_qjs-0.2.6/ios/build Command line invocation: /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -project quickjs.xcodeproj build -target ALL_BUILD -configuration Debug -hideShellScriptEnvironment -arch arm64

User defaults from command line: HideShellScriptEnvironment = YES

Build settings from command line: ARCHS = arm64

Prepare build note: Using legacy build system === BUILD AGGREGATE TARGET ZERO_CHECK OF PROJECT quickjs WITH CONFIGURATION Debug ===

Check dependencies

Write auxiliary files write-file /Users/xx/Documents/work/share/libs/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_qjs-0.2.6/ios/build/quickjs.build/Debug-iphoneos/ZERO_CHECK.build/Script-CF59C5AFD815477C94648EC5.sh chmod 0755 /Users/xx/Documents/work/share/libs/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_qjs-0.2.6/ios/build/quickjs.build/Debug-iphoneos/ZERO_CHECK.build/Script-CF59C5AFD815477C94648EC5.sh

PhaseScriptExecution CMake\ Rules build/quickjs.build/Debug-iphoneos/ZERO_CHECK.build/Script-CF59C5AFD815477C94648EC5.sh cd /Users/xx/Documents/work/share/libs/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_qjs-0.2.6/ios /bin/sh -c /Users/xx/Documents/work/share/libs/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_qjs-0.2.6/ios/build/quickjs.build/Debug-iphoneos/ZERO_CHECK.build/Script-CF59C5AFD815477C94648EC5.sh echo ""

make -f /Users/xx/Documents/work/share/libs/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_qjs-0.2.6/ios/build/CMakeScripts/ReRunCMake.make make[1]: `/Users/xx/Documents/work/share/libs/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_qjs-0.2.6/ios/build/CMakeFiles/cmake.check_cache' is up to date.

=== BUILD TARGET quickjs OF PROJECT quickjs WITH CONFIGURATION Debug ===

Check dependencies

=== BUILD TARGET ffiquickjs OF PROJECT quickjs WITH CONFIGURATION Debug ===

Check dependencies ffiquickjs will not be code signed because its settings don't specify a development team.

CompileC build/quickjs.build/Debug-iphoneos/ffiquickjs.build/Objects-normal/arm64/ffi.o /Users/xx/Documents/work/share/libs/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_qjs-0.2.6/cxx/ffi.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler cd /Users/xx/Documents/work/share/libs/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_qjs-0.2.6/ios /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -target arm64-apple-ios13.4 -fmessage-length=111 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -fcolor-diagnostics -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -DCMAKE_INTDIR=\"Debug-iphoneos\" -Dffiquickjs_EXPORTS -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.4.sdk -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -g -Wno-sign-conversion -Wno-infinite-recursion -Wno-move -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-range-loop-analysis -Wno-semicolon-before-method-body -fembed-bitcode-marker -I/Users/xx/Documents/work/share/libs/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_qjs-0.2.6/ios/build/Debug-iphoneos/include -I/Users/xx/Documents/work/share/libs/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_qjs-0.2.6/ios/build/quickjs.build/Debug-iphoneos/ffiquickjs.build/DerivedSources-normal/arm64 -I/Users/xx/Documents/work/share/libs/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_qjs-0.2.6/ios/build/quickjs.build/Debug-iphoneos/ffiquickjs.build/DerivedSources/arm64 -I/Users/xx/Documents/work/share/libs/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_qjs-0.2.6/ios/build/quickjs.build/Debug-iphoneos/ffiquickjs.build/DerivedSources -F/Users/xx/Documents/work/share/libs/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_qjs-0.2.6/ios/build/Debug-iphoneos -fPIC -MMD -MT dependencies -MF /Users/xx/Documents/work/share/libs/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_qjs-0.2.6/ios/build/quickjs.build/Debug-iphoneos/ffiquickjs.build/Objects-normal/arm64/ffi.d --serialize-diagnostics /Users/xx/Documents/work/share/libs/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_qjs-0.2.6/ios/build/quickjs.build/Debug-iphoneos/ffiquickjs.build/Objects-normal/arm64/ffi.dia -c /Users/xx/Documents/work/share/libs/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_qjs-0.2.6/cxx/ffi.cpp -o /Users/xx/Documents/work/share/libs/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_qjs-0.2.6/ios/build/quickjs.build/Debug-iphoneos/ffiquickjs.build/Objects-normal/arm64/ffi.o In file included from /Users/xx/Documents/work/share/libs/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_qjs-0.2.6/cxx/ffi.cpp:8: In file included from /Users/xx/Documents/work/share/libs/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_qjs-0.2.6/cxx/ffi.h:1: /Users/xx/Documents/work/share/libs/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_qjs-0.2.6/cxx/quickjs/quickjs.h:632:12: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32] return js_unlikely(JS_VALUE_GET_TAG(v) == JS_TAG_EXCEPTION);


/Users/xx/Documents/work/share/libs/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_qjs-0.2.6/cxx/quickjs/quickjs.h:42:31: note: 
      expanded from macro 'js_unlikely'
#define js_unlikely(x)        __builtin_expect(!!(x), 0)
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/xx/Documents/work/share/libs/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_qjs-0.2.6/cxx/quickjs/quickjs.h:637:12: warning: 
      implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
    return js_unlikely(JS_VALUE_GET_TAG(v) == JS_TAG_UNINITIALIZED);
    ~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/xx/Documents/work/share/libs/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_qjs-0.2.6/cxx/quickjs/quickjs.h:42:31: note: 
      expanded from macro 'js_unlikely'
#define js_unlikely(x)        __builtin_expect(!!(x), 0)
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/xx/Documents/work/share/libs/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_qjs-0.2.6/cxx/ffi.cpp:81:21: error: 
      expected ';' at end of declaration
      JSClassDef def{
                    ^
                    ;
/Users/xx/Documents/work/share/libs/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_qjs-0.2.6/cxx/ffi.cpp:113:47: error: 
      expected ';' at end of declaration
    ObjectOpaque *objOpaque = new ObjectOpaque{ctx, opaque};
                                              ^
                                              ;
2 warnings and 2 errors generated.

** BUILD FAILED **

The following build commands failed:
    CompileC build/quickjs.build/Debug-iphoneos/ffiquickjs.build/Objects-normal/arm64/ffi.o /Users/xx/Documents/work/share/libs/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_qjs-0.2.6/cxx/ffi.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
lookdczar commented 3 years ago

After adding 'set (CMAKE_CXX_STANDARD 17)' in ios/CMakeLists.txt, it succeeded

ekibun commented 3 years ago

Thanks, This is fixed in https://github.com/ekibun/flutter_qjs/commit/c7da8abb67deb599c43d5b2915b0b71f068011b9.