Skip to content

Android prefab broken due to emscripten support #12359

Open
@AlexAUT

Description

@AlexAUT

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

  • OS: Linux (should not matter)
  • Compiler: gcc 10.1, newest android ndk (should not matter)

To Reproduce
Steps to reproduce the behavior:

  1. Do not install emscripten / remove from PATH
  2. Try the android AAR example
    2.1 Add android triplets
    2.2 ./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

./vcpkg export --triplet arm64-android jsoncpp --prefab --prefab-debug
The following packages are already built and will be exported:
    jsoncpp:arm64-android
d8187afd-ea4a-4fc3-9aa4-a6782e1ed9af
CMake Error at buildtrees/29.vcpkg_tags.cmake:8 (message):
  The EMSDK environment variable must be defined
Call Stack (most recent call first):
  scripts/vcpkg_get_tags.cmake:3 (vcpkg_triplet_file)
  buildtrees/29.vcpkg_tags.cmake:23 (vcpkg_get_tags)

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: a6257ac

Metadata

Metadata

Labels

category:community-tripletA PR or issue related to community triplets not officially validated by the vcpkg team.category:vcpkg-bugThe issue is with the vcpkg system (including helper scripts in `scripts/cmake/`)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions