Open AlexAUT opened 4 years ago
cc @MoAlyousef
I could remove the env checks in the cmake script. I don't see why vcpkg would check for it during an export for another triplet.
This looks like a bug in the prefab exporter; it should not be iterating through all available triplets and attempting to "divine" the correct ones: https://github.com/microsoft/vcpkg/blob/de70813cf38c55bac793f516751a35f843f12ad8/toolsrc/src/vcpkg/export.prefab.cpp#L276
Instead, the user should explicitly label each of the required architectures; perhaps via individual options:
./vcpkg export jsoncpp --prefab-x86-triplet=x86-android --prefab-x86_64-triplet=x64-android ...
We'd be happy to review a PR fixing this!
+@atkawa7 as the original author
Note that if you do "work around" it in this way, or specify something like this, it still fails:
./vcpkg export jsoncpp:x64-android jsoncpp:x86-android jsoncpp:arm-android jsoncpp:arm64-android --prefab --prefab-debug
The following packages are already built and will be exported:
jsoncpp:x64-android
jsoncpp:x86-android
jsoncpp:arm-android
jsoncpp:arm64-android
Currently supported on android triplets
I've tracked down that the cmake_system_name
that's being checked is empty, even though my triplet files match the instructions.
@ras0219 @ras0219-msft I don't have time to look into this but based on my previous conversation with @strega-nil. She advised I do not pre-define triplets since users might define their own custom ones hence ended up loading available triplets.
Since an environment variable is missing for emscripten
I am confused why vcpkg marks it as available. Shouldn't there be a check that marks this triplet as not available since all the requirements required for building it are not there. I am not sure if that's similar with platform specific triplets i.e you can't load windows triplets on linux
/bsd
variants.
One shouldn't check the triplet here, since someone might define their own android triplet.
_Originally posted by @strega-nil in https://github.com/microsoft/vcpkg/pull/10271#discussion_r392461896_.
Additionally, it shouldn't require all of the triplets: you can build an aar/prefab with as few architectures as you wish.
Are there any news or possible solutions?
Describe the bug It is currently not possible to create android prefabs (AAR) because of the emscripten support.
During the export command vcpkg tries to extract triplet information by running cmake with the toolchain file. However, the toolchain for emscripten returns a FATAL_ERROR in case emscripten is not present/installed. This results in vcpkg aborting.
A fix for this particular issue is to remove the emscripten present checks in the triplet, but this may break other things?
Environment
To Reproduce Steps to reproduce the behavior:
./vcpkg install jsoncpp:arm-android jsoncpp:arm64-android jsoncpp:x64-android jsoncpp:x86-android
2.3./vcpkg export --triplet arm64-android jsoncpp --prefab --prefab-debug
Expected behavior Should create the AAR prefab for jsoncpp
Failure logs
Additional context Add any other context about the problem here. The first commit where this problem is present is the merge of the emscripten PR: a6257ac262f441a97869b7ec40ddc4bcce19570d