Comments (10)
Interesting. Thank you for the figuring out this issue!
The whole idea of NDK symbolic link – is to have "similar path on user side" in "umbrella header" when setting up glibc.modulemap
(e.g. /.../swift-android-toolchain/usr/lib/swift/android/armv7/glibc.modulemap
). But of cause symbolic link not really needed during build time.
I will try to use your @michaelknoch commit to make two separate variables for NDK path: one will be used during build time (non symlinked) and another will be used when packing toolchain for distribution.
from swift-everywhere-toolchain.
Seems you got this case:
One can engage clang by adjusting PATH to cover same NDK's clang. Just keep in mind that if you miss it, Configure will try to use gcc...
Source: https://github.com/openssl/openssl/blob/master/NOTES-Android.md
That is seems why Configure
trying to use arm-linux-androideabi-gcc
.
Try to comment or remove line -D__ANDROID_API__=${ndk.api}
in file lib/Builders/SSLBuilder.js
. Maybe it will help.
Before:
executeConfigure() {
this.clean();
var ndk = new NDK();
// Seems `-D__ANDROID_API__` not needed. See: #{@sources}/NOTES.ANDROID
var cmd = `
${this.options}
./Configure
// -D__ANDROID_API__=${ndk.api} <<<<<<<<<<<<< THIS LINE IS NOW COMMENTED.
--prefix=${this.paths.installs}
`;
if (this.arch.name == Archs.arm.name) {
cmd = `${cmd} android-arm`;
} else if (this.arch.name == Archs.arm64.name) {
cmd = `${cmd} android-arm64`;
} else if (this.arch.name == Archs.x86.name) {
cmd = `${cmd} android-x86`;
} else if (this.arch.name == Archs.x86_64.name) {
cmd = `${cmd} android-x86_64`;
}
this.executeCommands(`cd ${this.paths.sources} && ${cmd}`);
}
Then execute: node main.js ssl:make arch:armv7a
from swift-everywhere-toolchain.
btw. Similar issue: openssl/openssl#11192
Maybe you have environment variable "CC" set somewhere?
from swift-everywhere-toolchain.
btw: Another similar issue: openssl/openssl#8941
from swift-everywhere-toolchain.
Unfortunately, neither of it works.
from swift-everywhere-toolchain.
OK. What command perl configdata.pm --dump
returns?
cd ToolChain/Sources/ssl/
perl configdata.pm --dump
from swift-everywhere-toolchain.
OK. What command
perl configdata.pm --dump
returns?cd ToolChain/Sources/ssl/ perl configdata.pm --dump
kylewong@KyleWongs-MacBook-Pro ssl % perl configdata.pm --dump
Can't open perl script "configdata.pm": No such file or directory
kylewong@KyleWongs-MacBook-Pro ssl % pwd
/Users/kylewong/Codes/Swift/swift-everywhere-toolchain/ToolChain/Sources/ssl
from swift-everywhere-toolchain.
Hm. The file configdata.pm
even was not generated. Super strange.
Well. If the commands below not working, then it is an issue of SSL. Seems would be more effective to ask them as well: https://github.com/openssl/openssl/issues.
cd ToolChain/Sources/ssl
git clean --quiet -f -X
git clean --quiet -f -x -d
export ANDROID_NDK_HOME=/usr/local/ndk/21.3.6528147
export ANDROID_NDK_ROOT=/usr/local/ndk/21.3.6528147
PATH=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/darwin-x86_64/bin:$ANDROID_NDK_ROOT/toolchains/aarch64-linux-android-4.9/prebuilt/darwin-x86_64/bin:$PATH
./Configure android-arm64 -D__ANDROID_API__=29
make SHLIB_VERSION_NUMBER= SHLIB_EXT=.so
Build commands taken from: https://github.com/openssl/openssl/blob/master/NOTES-Android.md
from swift-everywhere-toolchain.
I ran into the same issue locally and I found out that it only happens when /usr/local/ndk/21.3.6528147
is a symlink. Not sure why, as far as I know it should be possible to add symlinks to $PATH but in that case it doesn't work.
PATH=/usr/local/ndk/21.3.6528147/toolchains/llvm/prebuilt/darwin-x86_64/bin:$PATH
./Configure android-arm -D__ANDROID_API__=21
# Failure! build file wasn't produced.
# Please read INSTALL and associated NOTES files. You may also have to look over
# your available compiler tool chain or change your configuration.
# no NDK arm-linux-androideabi-gcc on $PATH at (eval 10) line 124.
# configures successfully
PATH=/Users/username/Library/Android/sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/darwin-x86_64/bin:$PATH \
./Configure -D__ANDROID_API__=21 android-arm
I used this commit to workaround it locally. I can open a pr if this makes sense for you as well.
from swift-everywhere-toolchain.
Maybe the issue is solved in release https://github.com/vgorloff/swift-everywhere-toolchain/releases/tag/1.0.68. In this release the non-symlinked (absolute paths) to NDK tools were used.
from swift-everywhere-toolchain.
Related Issues (20)
- Update to use last LTS release of NDK r21e - 21.4.7075529 HOT 1
- build toolchain for linux host machines HOT 4
- Update to use Swift v5.4.1 HOT 1
- host MacOS failed build for android NDK arm-linux-androideabi-gcc on $PATH at (eval 10) line 124. HOT 3
- SIGSEGV when calling print() HOT 5
- `null pointer dereference` crash on armeabi-v7a HOT 4
- Update to Swift release 5.4.2 HOT 1
- error: no such module 'Darwin.C' @_exported import Darwin.C while compile HOT 2
- swift package build fail HOT 15
- Update to use Swift 5.4.3 HOT 1
- Update to use Swift 5.5 HOT 12
- Question about build process HOT 6
- Where is concurrency lib? HOT 57
- Notarize toolchain.
- Toolchain for Apple Silicon HOT 2
- Does the build work right now? HOT 2
- CMath build errors HOT 1
- build error when xcode 13.3 command line tools are installed
- m1 apple silicon builds
- __aarch64_ldadd1_relax
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swift-everywhere-toolchain.