JaneaSystems / nodejs-mobile

Full-fledged Node.js on Android and iOS
https://code.janeasystems.com/nodejs-mobile
Other
2.57k stars 183 forks source link

nodejs-mobile fails to build on macOS 10.14 Mojave #195

Open cyberiums opened 5 years ago

cyberiums commented 5 years ago

During the ./tools/android_build.sh ~/android-ndk-r18b process, it throws following error.

ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[1]: [/Users/pksingh/nodejs-mobile2/out/Release/torque] Error 1 make: [node] Error 2

jaimecbernardo commented 5 years ago

Hi @cyberiums , Could you please share the full build logo? Sharing a https://gist.github.com would be a good way of doing it.

kongdexing commented 5 years ago

I had the same error ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[1]: *** [/Users/kongdexing/Desktop/MyProj/code/nodejs-mobile-git/nodejs-mobile/out/Release/torque] Error 1 rm 8b3fabe1e3eb4251f3eac8139324b7b48d695883.intermediate make: *** [node] Error 2

jaimecbernardo commented 5 years ago

Hi @kongdexing , Could you please share the full build logo? Sharing a https://gist.github.com would be a good way of doing it.

bolinfest commented 5 years ago

@jaimecbernardo Here you go: https://gist.github.com/bolinfest/0ab6440a94af4acc444dd05eafebd485

I see issues with trying to build for i386 on other Mac projects: https://github.com/ValveSoftware/Proton/issues/108

bolinfest commented 5 years ago

Here's another example of a change someone made to update their project for mojave:

https://github.com/the-tcpdump-group/libpcap/issues/781

It's hard to figure out where to do the same here because the configuration logic seems a bit spread out?

bolinfest commented 5 years ago

Yikes, reading all the way through the https://github.com/ValveSoftware/Proton/issues/108 thread, the "resolution" was to drop macOS support :(

jaimecbernardo commented 5 years ago

Hi @bolinfest ,

Thank you for the detailed log.

Looks like this is caused by the Xcode 10 deprecation of building for i86: https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes?language=objc

The macOS 10.14 SDK no longer contains support for compiling 32-bit applications. If developers need to compile for i386, Xcode 9.4 or earlier is required. (39858111)

So, one way of getting around this might be downloading Xode 9.4 and using it with xcode-select to select that version before building, as in these comments: https://github.com/mphoward/gsd-vmd/issues/2#issuecomment-471968702

This should still enable you to build 32-bit in Mojave. Please let us know if it works.

xuelongqy commented 4 years ago

You can use Docker ubuntu on macOS