Comments (3)
I don't see any difference in behavior between ABIs. My Android.mk is just:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := bar
LOCAL_SRC_FILES := bar.cpp
LOCAL_STATIC_LIBRARIES := libcpufeatures
include $(BUILD_SHARED_LIBRARY)
$(call import-module,cpufeatures)
I'll leave this open to give you a chance to respond. If you have an example failing case, I'll take a look.
from ndk.
You are right, this has nothing to do with ABIs. Here's my setup:
→ ~/chance ls -l /opt/
lrwxr-xr-x 1 root wheel 16 Mar 21 21:05 android-ndk -> android-ndk-r11b
→ ~/chance tree .
.
├── Android.mk
└── Application.mk
→ ~/chance cat Android.mk
CAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := bar
LOCAL_SRC_FILES := bar.cpp
LOCAL_STATIC_LIBRARIES := libcpufeatures
include $(BUILD_SHARED_LIBRARY)
$(call import-module,cpufeatures)
→ ~/chance cat Application.mk
LOCAL_PATH := $(call my-dir)
APP_BUILD_SCRIPT := $(LOCAL_PATH)/Android.mk
→ ~/chance /opt/android-ndk/ndk-build NDK_APPLICATION_MK=./Application.mk NDK_PROJECT_PATH=$PWD
Android NDK: Android.mk: Cannot find module with tag 'cpufeatures' in import path
Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ?
Android NDK: The following directories were searched:
Android NDK:
Android.mk:9: *** Android NDK: Aborting. . Stop.
However, when I use $(call import-module,android/cpufeatures)
then I stop having that error about cpufeatures
module not being found and build moves on looking for bar.cpp
make: *** No rule to make target `/opt/android-ndk-r11b/sources/cxx-stl/system/bar.cpp', needed by `obj/local/armeabi/objs/bar/bar.o'. Stop.
(which in the current setup I quite don't get why it looks for bar.cpp
in /opt/android-ndk-r11b/sources/cxx-stl/system
but well that's another story...)
So in the end, do you know when the contract of import-module
changed? What I could confirm is that from r9c
to r10e
, the Android.mk
file from samples/hello-neon/jni/Android.mk
contains $(call import-module,cpufeatures)
and not $(call import-module,android/cpufeatures)
.
from ndk.
However, the observed difference between APP_ABI=armeabi-v7a and APP_ABI=armeabi-v7a-hard makes me believe there's something to look into ndk-build internals in order to figure out why behavior is different.
Sorry, this is the part I was actually responding to.
So in the end, do you know when the contract of import-module changed? What I could confirm is that from r9c to r10e, the Android.mk file from samples/hello-neon/jni/Android.mk contains
$(call import-module,cpufeatures) and not $ (call import-module,android/cpufeatures).
https://android.googlesource.com/platform/ndk/+/master/sources/cpufeatures/README.TXT
I suppose the wording there might actually mean that it was specifically the header that was deprecated and not the path itself (I had read it after the note in the Android.mk, so I thought it meant that path was deprecated as well).
With this already having shipped, and no plan for another hotfix, putting those files back wouldn't be in a stable release for another few months. I'm not sure there's any value in doing it if the fix is just to change cpufeatures
to android/cpufeatures
.
from ndk.
Related Issues (20)
- [BUG] Clang++ Segmentation fault when building AOSP branch android-14.0.0_r35 HOT 3
- [Bug]: error: ran out of registers during register allocation HOT 17
- Android builds with unity fail: "Library\Bee\artifacts\Android" HOT 4
- [FR] push/pop required policies in cmake toolchain file HOT 16
- [DOC] Clarification on 16k page size support for x86_64 devices HOT 3
- [DOC] `system_fonts.h` HOT 7
- [Bug]: Lambda segfaults in Clang HOT 11
- [FR] Official NDK release for Linux arm64 HOT 1
- [Bug]: fatal error: error in backend: Cannot select: 0x10ba8ace0: nxv4f32 = BUILD_VECTOR 0x133163a90, 0x1330f4800, 0x133108d20, 0x1248b9e60 HOT 6
- [BUG] Compilation Error with std::execution in C++17 HOT 3
- [BUG] CLEAR_VARS does not clear LOCAL_STRIP_MODE variable HOT 2
- [Bug]: Android NDK r27 rc2 miscompiles code with inderect gotos HOT 13
- [Bug] NDK's openmp test crashing on x86 with latest LLVM update HOT 4
- Please provide maintainable list of NDK codename-revision pairs HOT 3
- [Bug]: clang compile with -D_FORTIFY_SOURCE=2 -Dstatic= cause undefined symbol: snprintf HOT 7
- [BUG] android-ndk-r26c use -pg ld.lld: error: undefined symbol: _mcount HOT 7
- [Bug]: Compiler Crash HOT 5
- [FR] support libclang? HOT 1
- [BUG] investigate odd find_package behavior HOT 3
- [BUG] NDK 27 no longer supports passing in `CMAKE_SYSTEM_PROCESSOR` to CMake to set the arch HOT 7
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 ndk.