LiquidPlayer / LiquidCore

Node.js virtual machine for Android and iOS
MIT License
1.01k stars 127 forks source link

xcode build failed (iOS) #230

Open tzyy opened 2 years ago

tzyy commented 2 years ago

On my test, iOS build failed! Undefined symbols for architecture x86_64: "node::DefineJavaScriptHash(node::Environment, v8::Local)", referenced from: node::GetInternalBinding(v8::FunctionCallbackInfo const&) in node_instance.o "node::NodePerContextSource(v8::Isolate)", referenced from: node::NewContext(v8::Isolate, v8::Local, OpaqueJSContextGroup const, OpaqueJSContext*) in node_instance.o "node::DefineJavaScript(node::Environment, v8::Local)", referenced from: node::GetBinding(v8::FunctionCallbackInfo const&) in node_instance.o "node::LoadersBootstrapperSource(node::Environment)", referenced from: node::LoadEnvironment(node::Environment) in node_instance.o "node::NodeBootstrapperSource(node::Environment)", referenced from: node::LoadEnvironment(node::Environment) in node_instance.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation).

xcode version: 13.2.0 LiquidCore version: 0.7.10 I tryied to change node version : 10.15.3 and 13.9.0, but the error still exist, what can I do?

carlosjrtee commented 1 year ago

I also have this issue upon compilation:

Undefined symbols for architecture arm64: "node::DefineJavaScriptHash(node::Environment, v8::Local)", referenced from: node::GetInternalBinding(v8::FunctionCallbackInfo const&) in node_instance.o "node::NodePerContextSource(v8::Isolate)", referenced from: node::NewContext(v8::Isolate, v8::Local, OpaqueJSContextGroup const, OpaqueJSContext*) in node_instance.o "node::DefineJavaScript(node::Environment, v8::Local)", referenced from: node::GetBinding(v8::FunctionCallbackInfo const&) in node_instance.o "node::LoadersBootstrapperSource(node::Environment)", referenced from: node::LoadEnvironment(node::Environment) in node_instance.o "node::NodeBootstrapperSource(node::Environment)", referenced from: node::LoadEnvironment(node::Environment) in node_instance.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

xcode: 13.4.1 liquidcore version: 0.7.10

This could be an issue on macs running on M1 processors as I've been able to build LiquidCore on my intel mac.

carlosjrtee commented 1 year ago

Update:

Downgrading to python 2.7.18 worked for me. See @davidgdoyle: https://github.com/LiquidPlayer/LiquidCore/issues/160#issuecomment-680943465

bill19 commented 1 year ago

@carlosjrtee That's right! Thank you, brother

setting path for python 2.7 to .bash_profile

PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}" export PATH alias python="/Library/Frameworks/Python.framework/Versions/2.7/bin/python"

bill19 commented 1 year ago

If you are a chip of m1, you need to download python 2.7.18 in advance