-
Notifications
You must be signed in to change notification settings - Fork 184
Build for Android failing: error: no template named 'unordered_map' in namespace 'std' #1291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This looks like the bug is actually in the https://github.com/microsoft/onnxruntime-extensions project, can you please log the issue there? |
@Danmoreng you can use the prebuilt aar file in case you want to avoid building from source: https://github.com/microsoft/onnxruntime-genai/releases/tag/v0.6.0 |
This is the build command we use to build the android aar:
We use ndk 26.3.11579264 to build. You might need to set the necessary env variables |
@baijumeswani Thanks! I want to try getting phi4 to work on Android, that’s why I cannot use the prebuilt aar file which is 3 weeks old. I followed the documentation over here https://onnxruntime.ai/docs/genai/howto/build-from-source.html |
0.6.0 should work for phi4. It won't work for phi4-multimodal. But it should work for phi-4 text models. |
Thanks @baijumeswani, with the pre-built 0.6.0 I got phi4-instruct text working. However, I am specifically interested in the multi modal version. I had no luck with your command for building it either, but got a different error. I will try further this weekend.
Error
|
Describe the bug
When building onnxruntime-genai for Android on Windows using OpenJDK 21, NDK 25.2, and CMake 3.31.6, the build fails with errors
error: no template named 'unordered_map' in namespace 'std'; did you mean 'nlohmann::ordered_map'?
I also tried to build the project under Linux with JDK 17 and NDK 25.2 and got the same errors.
ChatGPT problem idea:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The build should complete successfully. The project should include the proper headers (e.g.,
<unordered_map>
) so thatstd::unordered_map
is correctly recognized by the compiler.Desktop:
Relevant Log
The text was updated successfully, but these errors were encountered: