Igalia / wolvic

A fast and secure browser for standalone virtual-reality and augmented-reality headsets.
https://wolvic.org
Mozilla Public License 2.0
813 stars 105 forks source link

[Build] Building fails with "src/main/cpp/vrb/src" which is not an existing directory #1476

Closed yuripourre closed 4 months ago

yuripourre commented 4 months ago

Configuration

Wolvic version: latest Wolvic build ID: ?

Hardware: Dell Inspiron P70F, Fedora 40

Steps to Reproduce

  1. Follow the README, build the aar files
  2. Import the project to Android Studio
  3. Select the Chromium variant
  4. Try to build the project

Current Behavior

APK file cannot be generated because vrb files are missing (I am almost sure that those shouldn't be required for chromium builds)

Expected Behavior

APK file can be generated

Possible Solution

Remove the requirements for those files when build variant is chromium

Context

Error Logs and Stack Traces

``` CMake Error at CMakeLists.txt:15 (add_subdirectory): add_subdirectory given source "src/main/cpp/vrb/src" which is not an existing directory. at com.android.build.gradle.internal.cxx.process.ExecuteProcessKt.execute(ExecuteProcess.kt:288) at com.android.build.gradle.internal.cxx.process.ExecuteProcessKt$executeProcess$1.invoke(ExecuteProcess.kt:108) at com.android.build.gradle.internal.cxx.process.ExecuteProcessKt$executeProcess$1.invoke(ExecuteProcess.kt:106) at com.android.build.gradle.internal.cxx.timing.TimingEnvironmentKt.time(TimingEnvironment.kt:32) at com.android.build.gradle.internal.cxx.process.ExecuteProcessKt.executeProcess(ExecuteProcess.kt:106) at com.android.build.gradle.internal.cxx.process.ExecuteProcessKt.executeProcess$default(ExecuteProcess.kt:85) at com.android.build.gradle.tasks.CmakeQueryMetadataGenerator.executeProcess(CmakeFileApiMetadataGenerator.kt:59) at com.android.build.gradle.tasks.ExternalNativeJsonGenerator$configureOneAbi$1$1$3.invoke(ExternalNativeJsonGenerator.kt:246) at com.android.build.gradle.tasks.ExternalNativeJsonGenerator$configureOneAbi$1$1$3.invoke(ExternalNativeJsonGenerator.kt:246) at com.android.build.gradle.internal.cxx.timing.TimingEnvironmentKt.time(TimingEnvironment.kt:32) at com.android.build.gradle.tasks.ExternalNativeJsonGenerator.configureOneAbi(ExternalNativeJsonGenerator.kt:246) at com.android.build.gradle.tasks.ExternalNativeJsonGenerator.configure(ExternalNativeJsonGenerator.kt:112) at com.android.build.gradle.internal.ide.v2.NativeModelBuilder.generateBuildFilesAndCompileCommandsJson(NativeModelBuilder.kt:209) at com.android.build.gradle.internal.ide.v2.NativeModelBuilder.buildAll(NativeModelBuilder.kt:174) at com.android.build.gradle.internal.ide.v2.NativeModelBuilder.buildAll(NativeModelBuilder.kt:58) at org.gradle.tooling.provider.model.internal.DefaultToolingModelBuilderRegistry$BuilderWithParameter.build(DefaultToolingModelBuilderRegistry.java:289) at org.gradle.tooling.provider.model.internal.DefaultToolingModelBuilderRegistry$UserCodeAssigningBuilder.lambda$build$0(DefaultToolingModelBuilderRegistry.java:374) at org.gradle.configuration.internal.DefaultUserCodeApplicationContext$CurrentApplication.reapply(DefaultUserCodeApplicationContext.java:109) at org.gradle.tooling.provider.model.internal.DefaultToolingModelBuilderRegistry$UserCodeAssigningBuilder.build(DefaultToolingModelBuilderRegistry.java:374) at org.gradle.tooling.provider.model.internal.DefaultToolingModelBuilderRegistry$LockSingleProjectBuilder.lambda$build$0(DefaultToolingModelBuilderRegistry.java:304) at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.lambda$fromMutableState$2(DefaultProjectStateRegistry.java:418) at org.gradle.internal.work.DefaultWorkerLeaseService.withReplacedLocks(DefaultWorkerLeaseService.java:345) at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.fromMutableState(DefaultProjectStateRegistry.java:418) at org.gradle.tooling.provider.model.internal.DefaultToolingModelBuilderRegistry$LockSingleProjectBuilder.build(DefaultToolingModelBuilderRegistry.java:304) at org.gradle.tooling.provider.model.internal.DefaultToolingModelBuilderRegistry$BuildOperationWrappingBuilder$1.call(DefaultToolingModelBuilderRegistry.java:337) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199) at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66) at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59) at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53) at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73) at org.gradle.tooling.provider.model.internal.DefaultToolingModelBuilderRegistry$BuildOperationWrappingBuilder.build(DefaultToolingModelBuilderRegistry.java:334) at org.gradle.internal.build.DefaultBuildToolingModelController$AbstractToolingScope.getModel(DefaultBuildToolingModelController.java:85) at org.gradle.tooling.internal.provider.runner.DefaultBuildController.getModel(DefaultBuildController.java:108) at org.gradle.tooling.internal.consumer.connection.ParameterAwareBuildControllerAdapter.getModel(ParameterAwareBuildControllerAdapter.java:39) at org.gradle.tooling.internal.consumer.connection.UnparameterizedBuildController.getModel(UnparameterizedBuildController.java:113) at org.gradle.tooling.internal.consumer.connection.NestedActionAwareBuildControllerAdapter.getModel(NestedActionAwareBuildControllerAdapter.java:31) at org.gradle.tooling.internal.consumer.connection.UnparameterizedBuildController.findModel(UnparameterizedBuildController.java:97) at org.gradle.tooling.internal.consumer.connection.NestedActionAwareBuildControllerAdapter.findModel(NestedActionAwareBuildControllerAdapter.java:31) at org.jetbrains.plugins.gradle.model.DefaultBuildController.findModel(DefaultBuildController.java:101) at com.android.tools.idea.gradle.project.sync.SyncActionRunnerKt$toMeasuringController$1$findModel$4.invoke(SyncActionRunner.kt:289) at com.android.tools.idea.projectsystem.gradle.sync.Counter.invoke(PerformanceMeasurementUtil.kt:108) at com.android.tools.idea.gradle.project.sync.SyncActionRunnerKt.measure(SyncActionRunner.kt:330) at com.android.tools.idea.gradle.project.sync.SyncActionRunnerKt.access$measure(SyncActionRunner.kt:1) at com.android.tools.idea.gradle.project.sync.SyncActionRunnerKt$toMeasuringController$1.findModel(SyncActionRunner.kt:289) at com.android.tools.idea.gradle.project.sync.ActionToRun$toSafeController$1.findModel(SyncActionRunner.kt:160) at com.android.tools.idea.gradle.project.sync.ModelFetchersKt.findNativeVariantAbiModel(ModelFetchers.kt:141) at com.android.tools.idea.gradle.project.sync.VariantDiscovery$toFetchVariantDependenciesAction$1$1.invoke(VariantDiscovery.kt:210) at com.android.tools.idea.gradle.project.sync.VariantDiscovery$toFetchVariantDependenciesAction$1$1.invoke(VariantDiscovery.kt:199) at com.android.tools.idea.gradle.project.sync.ModelResult$Companion.create(ModelResult.kt:32) at com.android.tools.idea.gradle.project.sync.VariantDiscovery$toFetchVariantDependenciesAction$1.invoke(VariantDiscovery.kt:199) at com.android.tools.idea.gradle.project.sync.VariantDiscovery$toFetchVariantDependenciesAction$1.invoke(VariantDiscovery.kt:194) at com.android.tools.idea.gradle.project.sync.ActionToRun$map$1.invoke(SyncActionRunner.kt:66) at com.android.tools.idea.gradle.project.sync.ActionToRun$map$1.invoke(SyncActionRunner.kt:66) at com.android.tools.idea.gradle.project.sync.ActionToRun.run$intellij_android_projectSystem_gradle_sync(SyncActionRunner.kt:77) at com.android.tools.idea.gradle.project.sync.SyncActionRunner$runActions$1.invoke(SyncActionRunner.kt:223) at com.android.tools.idea.gradle.project.sync.SyncActionRunner$runActions$1.invoke(SyncActionRunner.kt:223) at com.android.tools.idea.gradle.project.sync.SyncActionRunner.runAction(SyncActionRunner.kt:250) at com.android.tools.idea.gradle.project.sync.SyncActionRunner.runActions(SyncActionRunner.kt:223) at com.android.tools.idea.gradle.project.sync.VariantDiscovery.discoverVariantsAndSync(VariantDiscovery.kt:125) at com.android.tools.idea.gradle.project.sync.SyncProjectActionWorker$populateAndroidModels$2.invoke(SyncProjectActionWorker.kt:72) at com.android.tools.idea.gradle.project.sync.SyncProjectActionWorker$populateAndroidModels$2.invoke(SyncProjectActionWorker.kt:58) at com.android.tools.idea.projectsystem.gradle.sync.Counter.invoke(PerformanceMeasurementUtil.kt:108) at com.android.tools.idea.gradle.project.sync.SyncProjectActionWorker.populateAndroidModels(SyncProjectActionWorker.kt:58) at com.android.tools.idea.gradle.project.sync.AndroidExtraModelProviderWorker.populateBuildModels(AndroidExtraModelProviderWorker.kt:102) at com.android.tools.idea.gradle.project.sync.AndroidExtraModelProviderImpl.populateBuildModels(AndroidExtraModelProvider.kt:113) at com.android.tools.idea.gradle.project.sync.AndroidExtraModelProvider.populateBuildModels(AndroidExtraModelProvider.kt:55) at com.intellij.gradle.toolingExtension.impl.modelAction.GradleModelFetchAction.lambda$addBuildModels$9(GradleModelFetchAction.java:209) at com.intellij.gradle.toolingExtension.impl.telemetry.GradleOpenTelemetry.lambda$runWithSpan$1(GradleOpenTelemetry.java:87) at com.intellij.gradle.toolingExtension.impl.telemetry.GradleOpenTelemetry.callWithSpan(GradleOpenTelemetry.java:73) at com.intellij.gradle.toolingExtension.impl.telemetry.GradleOpenTelemetry.callWithSpan(GradleOpenTelemetry.java:61) at com.intellij.gradle.toolingExtension.impl.telemetry.GradleOpenTelemetry.runWithSpan(GradleOpenTelemetry.java:86) at com.intellij.gradle.toolingExtension.impl.modelAction.GradleModelFetchAction.addBuildModels(GradleModelFetchAction.java:208) at com.intellij.gradle.toolingExtension.impl.modelAction.GradleModelFetchAction.lambda$addModels$6(GradleModelFetchAction.java:175) at com.intellij.gradle.toolingExtension.impl.telemetry.GradleOpenTelemetry.lambda$runWithSpan$1(GradleOpenTelemetry.java:87) at com.intellij.gradle.toolingExtension.impl.telemetry.GradleOpenTelemetry.callWithSpan(GradleOpenTelemetry.java:73) at com.intellij.gradle.toolingExtension.impl.telemetry.GradleOpenTelemetry.callWithSpan(GradleOpenTelemetry.java:61) at com.intellij.gradle.toolingExtension.impl.telemetry.GradleOpenTelemetry.runWithSpan(GradleOpenTelemetry.java:86) at com.intellij.gradle.toolingExtension.impl.modelAction.GradleModelFetchAction.lambda$addModels$7(GradleModelFetchAction.java:172) at com.intellij.gradle.toolingExtension.impl.modelAction.GradleModelFetchAction.lambda$forEachModelFetchPhase$4(GradleModelFetchAction.java:158) at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) at java.base/java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:357) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:510) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.forEachOrdered(ReferencePipeline.java:601) at com.intellij.gradle.toolingExtension.impl.modelAction.GradleModelFetchAction.forEachModelFetchPhase(GradleModelFetchAction.java:158) at com.intellij.gradle.toolingExtension.impl.modelAction.GradleModelFetchAction.addModels(GradleModelFetchAction.java:163) at com.intellij.gradle.toolingExtension.impl.modelAction.GradleModelFetchAction.lambda$execute$1(GradleModelFetchAction.java:73) at com.intellij.gradle.toolingExtension.impl.telemetry.GradleOpenTelemetry.lambda$runWithSpan$1(GradleOpenTelemetry.java:87) at com.intellij.gradle.toolingExtension.impl.telemetry.GradleOpenTelemetry.callWithSpan(GradleOpenTelemetry.java:73) at com.intellij.gradle.toolingExtension.impl.telemetry.GradleOpenTelemetry.callWithSpan(GradleOpenTelemetry.java:61) at com.intellij.gradle.toolingExtension.impl.telemetry.GradleOpenTelemetry.runWithSpan(GradleOpenTelemetry.java:86) at com.intellij.gradle.toolingExtension.impl.modelAction.GradleModelFetchAction.execute(GradleModelFetchAction.java:73) at org.jetbrains.plugins.gradle.model.ProjectImportAction.doExecute(ProjectImportAction.java:170) at org.jetbrains.plugins.gradle.model.ProjectImportAction.lambda$execute$1(ProjectImportAction.java:111) at com.intellij.gradle.toolingExtension.impl.telemetry.GradleOpenTelemetry.callWithSpan(GradleOpenTelemetry.java:73) at com.intellij.gradle.toolingExtension.impl.telemetry.GradleOpenTelemetry.callWithSpan(GradleOpenTelemetry.java:61) at org.jetbrains.plugins.gradle.model.ProjectImportAction.execute(ProjectImportAction.java:110) at org.jetbrains.plugins.gradle.model.ProjectImportAction.execute(ProjectImportAction.java:43) at org.gradle.tooling.internal.consumer.connection.InternalBuildActionAdapter.execute(InternalBuildActionAdapter.java:64) at org.gradle.tooling.internal.provider.runner.AbstractClientProvidedBuildActionRunner$ActionAdapter.runAction(AbstractClientProvidedBuildActionRunner.java:131) at org.gradle.tooling.internal.provider.runner.AbstractClientProvidedBuildActionRunner$ActionAdapter.fromBuildModel(AbstractClientProvidedBuildActionRunner.java:104) at org.gradle.tooling.internal.provider.runner.AbstractClientProvidedBuildActionRunner$ActionAdapter.fromBuildModel(AbstractClientProvidedBuildActionRunner.java:84) at org.gradle.internal.buildtree.DefaultBuildTreeModelCreator.fromBuildModel(DefaultBuildTreeModelCreator.java:57) at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.lambda$fromBuildModel$2(DefaultBuildTreeLifecycleController.java:81) at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.lambda$runBuild$4(DefaultBuildTreeLifecycleController.java:98) at org.gradle.internal.model.StateTransitionController.lambda$transition$6(StateTransitionController.java:169) at org.gradle.internal.model.StateTransitionController.doTransition(StateTransitionController.java:266) at org.gradle.internal.model.StateTransitionController.lambda$transition$7(StateTransitionController.java:169) at org.gradle.internal.work.DefaultSynchronizer.withLock(DefaultSynchronizer.java:44) at org.gradle.internal.model.StateTransitionController.transition(StateTransitionController.java:169) at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.runBuild(DefaultBuildTreeLifecycleController.java:95) at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.fromBuildModel(DefaultBuildTreeLifecycleController.java:73) at org.gradle.tooling.internal.provider.runner.AbstractClientProvidedBuildActionRunner.runClientAction(AbstractClientProvidedBuildActionRunner.java:43) at org.gradle.tooling.internal.provider.runner.ClientProvidedPhasedActionRunner.run(ClientProvidedPhasedActionRunner.java:53) at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35) at org.gradle.internal.buildtree.ProblemReportingBuildActionRunner.run(ProblemReportingBuildActionRunner.java:49) at org.gradle.launcher.exec.BuildOutcomeReportingBuildActionRunner.run(BuildOutcomeReportingBuildActionRunner.java:65) at org.gradle.tooling.internal.provider.FileSystemWatchingBuildActionRunner.run(FileSystemWatchingBuildActionRunner.java:140) at org.gradle.launcher.exec.BuildCompletionNotifyingBuildActionRunner.run(BuildCompletionNotifyingBuildActionRunner.java:41) at org.gradle.launcher.exec.RootBuildLifecycleBuildActionExecutor.lambda$execute$0(RootBuildLifecycleBuildActionExecutor.java:40) at org.gradle.composite.internal.DefaultRootBuildState.run(DefaultRootBuildState.java:122) at org.gradle.launcher.exec.RootBuildLifecycleBuildActionExecutor.execute(RootBuildLifecycleBuildActionExecutor.java:40) at org.gradle.internal.buildtree.InitDeprecationLoggingActionExecutor.execute(InitDeprecationLoggingActionExecutor.java:58) at org.gradle.internal.buildtree.DefaultBuildTreeContext.execute(DefaultBuildTreeContext.java:40) at org.gradle.launcher.exec.BuildTreeLifecycleBuildActionExecutor.lambda$execute$0(BuildTreeLifecycleBuildActionExecutor.java:65) at org.gradle.internal.buildtree.BuildTreeState.run(BuildTreeState.java:53) at org.gradle.launcher.exec.BuildTreeLifecycleBuildActionExecutor.execute(BuildTreeLifecycleBuildActionExecutor.java:65) at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor$3.call(RunAsBuildOperationBuildActionExecutor.java:61) at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor$3.call(RunAsBuildOperationBuildActionExecutor.java:57) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199) at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66) at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59) at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53) at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73) at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor.execute(RunAsBuildOperationBuildActionExecutor.java:57) at org.gradle.launcher.exec.RunAsWorkerThreadBuildActionExecutor.lambda$execute$0(RunAsWorkerThreadBuildActionExecutor.java:36) at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:249) at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:109) at org.gradle.launcher.exec.RunAsWorkerThreadBuildActionExecutor.execute(RunAsWorkerThreadBuildActionExecutor.java:36) at org.gradle.tooling.internal.provider.continuous.ContinuousBuildActionExecutor.execute(ContinuousBuildActionExecutor.java:110) at org.gradle.tooling.internal.provider.SubscribableBuildActionExecutor.execute(SubscribableBuildActionExecutor.java:64) at org.gradle.internal.session.DefaultBuildSessionContext.execute(DefaultBuildSessionContext.java:46) at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter$ActionImpl.apply(BuildSessionLifecycleBuildActionExecuter.java:100) at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter$ActionImpl.apply(BuildSessionLifecycleBuildActionExecuter.java:88) at org.gradle.internal.session.BuildSessionState.run(BuildSessionState.java:69) at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter.execute(BuildSessionLifecycleBuildActionExecuter.java:62) at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter.execute(BuildSessionLifecycleBuildActionExecuter.java:41) at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:64) at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:32) at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:50) at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:38) at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:47) at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:31) at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:65) at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104) at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:39) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104) at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:29) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104) at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:35) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104) at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:78) at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:75) at org.gradle.util.internal.Swapper.swap(Swapper.java:38) at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:75) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104) at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:64) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104) at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:63) at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104) at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:84) at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104) at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:52) at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:47) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:840) Caused by: com.android.ide.common.process.ProcessException: Error while executing process /home/yuri/Android/Sdk/cmake/3.22.1/bin/cmake with arguments {-H/home/yuri/git/wolvic/app -DCMAKE_SYSTEM_NAME=Android -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_SYSTEM_VERSION=24 -DANDROID_PLATFORM=android-24 -DANDROID_ABI=arm64-v8a -DCMAKE_ANDROID_ARCH_ABI=arm64-v8a -DANDROID_NDK=/home/yuri/Android/Sdk/ndk/25.1.8937393 -DCMAKE_ANDROID_NDK=/home/yuri/Android/Sdk/ndk/25.1.8937393 -DCMAKE_TOOLCHAIN_FILE=/home/yuri/Android/Sdk/ndk/25.1.8937393/build/cmake/android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=/home/yuri/Android/Sdk/cmake/3.22.1/bin/ninja -DCMAKE_CXX_FLAGS=-std=c++14 -fexceptions -frtti -Werror -I/home/yuri/git/wolvic/app/src/main/cpp -I/home/yuri/git/wolvic/app/src/main/cpp/vrb/include -DANDROID -DCHROMIUM -DAOSP -DOPENXR -I/home/yuri/git/wolvic/app/src/openxr/cpp -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/home/yuri/git/wolvic/app/build/intermediates/cxx/RelWithDebInfo/506n196m/obj/arm64-v8a -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/home/yuri/git/wolvic/app/build/intermediates/cxx/RelWithDebInfo/506n196m/obj/arm64-v8a -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_FIND_ROOT_PATH=/home/yuri/git/wolvic/app/.cxx/RelWithDebInfo/506n196m/prefab/arm64-v8a/prefab -B/home/yuri/git/wolvic/app/.cxx/RelWithDebInfo/506n196m/arm64-v8a -GNinja -DANDROID_STL=c++_shared -DCHROMIUM=ON -DAOSP=ON -DOPENXR=ON} at com.android.build.gradle.internal.process.GradleProcessResult.buildProcessException(GradleProcessResult.java:73) at com.android.build.gradle.internal.process.GradleProcessResult.assertNormalExitValue(GradleProcessResult.java:48) at com.android.build.gradle.internal.cxx.process.ExecuteProcessKt.execute(ExecuteProcess.kt:277) ... 190 more Caused by: org.gradle.process.internal.ExecException: Process 'command '/home/yuri/Android/Sdk/cmake/3.22.1/bin/cmake'' finished with non-zero exit value 1 at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:415) at com.android.build.gradle.internal.process.GradleProcessResult.assertNormalExitValue(GradleProcessResult.java:46) ... 191 more ```
yuripourre commented 4 months ago

Ok, some updates:

If I remove this line on CMakeLists.txt:

#add_subdirectory(src/main/cpp/vrb/src)

The build goes a little further but it fails later with the following error:

CMake Error at CMakeLists.txt:17 (add_library):
  Cannot find source file:

    /home/yuri/git/wolvic/app/src/main/cpp/tinygltf/tiny_gltf.cc

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .h
  .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc

CMake Warning:
  Manually-specified variables were not used by the project:

    CHROMIUM

I believe it's a Igalia closed-source repo but if you guys could give some advices on how to create their structure, it would be amazing.

yuripourre commented 4 months ago

For tinygltf I've found the Igalia's fork and adding those to the specific folder fixed the issue.

Now I am I still getting some errors related to vrb:

I am using Mozilla's vrb, I copied the folders src and include to cpp folder but the build still fails:

/home/yuri/git/wolvic/app/src/main/cpp/OneEuroFilter.cpp:13:31: error: no member named 'Slerp' in 'vrb::Quaternion'
      auto q = vrb::Quaternion::Slerp({mHatxprev[0], mHatxprev[1], mHatxprev[2], mHatxprev[3]}, {x[0], x[1], x[2], x[3]}, alpha).Normalize();
               ~~~~~~~~~~~~~~~~~^

Indeed, the method Slerp can't be found: https://github.com/MozillaReality/vrb/blob/main/src/Quaternion.cpp

I will try to find an older version.

svillar commented 4 months ago

The vrb folder is a must, it's the 3D library used to render the Wolvic contents. It isn't closed source, it's in a git submodule, have you initialized/updated your submodules?

The web engine used (gecko/chromium) has nothing to do with VRB, not sure why you say that you're almost sure is not needed. It is an integral part of Wolvic.

yuripourre commented 4 months ago

@svillar thanks for clarifying, I thought vrb was part of Gecko-dev, that's why I assumed that it wasn't needed to by the chromium build.

I also assumed that the submodules wouldonly be available to Igalia's members, I didn't even try to fetch the submodules.

I will try it later today, thank you so much!

yuripourre commented 4 months ago

The vrb folder is a must, it's the 3D library used to render the Wolvic contents. It isn't closed source, it's in a git submodule, have you initialized/updated your submodules?

You were right, I had to fetch the submodules. Now I can generate the APK or run into Oculus Quest 2 but it's not working as expected.

If I build the app as Debug, when the app opens in immersive mode and shows a black screen and nothing happens.

If I build it as Release the app opens as a window and I get the following messages on logcat:

--------- beginning of kernel
--------- beginning of tracking
--------- beginning of system
--------- beginning of main
2024-07-12 15:43:22.931  3865-14516 OVRLibrary              pid-3865                             W  null cursor received for query content://com.oculus.ocms.library/apps/com.igalia.wolvic
2024-07-12 15:43:27.634  3865-14516 OVRLibrary              pid-3865                             W  null cursor received for query content://com.oculus.ocms.library/apps/com.igalia.wolvic
2024-07-12 15:43:31.916  3865-14516 OVRLibrary              com.oculus.systemux                  W  null cursor received for query content://com.oculus.ocms.library/apps/com.igalia.wolvic
2024-07-12 15:43:35.943  3235-3476  Interstiti...gerSession com.oculus.vrruntimeservice          I  ---------- InterstitialRenderer LoggerSession Begin ----------
                                                                                                    ID: a34861162d29e3729bb3229cdba73d1a
                                                                                                    Frame Type: Black[2]
                                                                                                    Event Type: start
                                                                                                    Status: Started [3]
                                                                                                    [Start Time 9168630]
                                                                                                         [event_type: start]
                                                                                                         [last_top_activity_start: com.igalia.wolvic]
                                                                                                         [top_activity_start: com.oculus.shellenv]
                                                                                                         [description: Guardian black]
                                                                                                         [client_package_name: com.oculus.shellenv]
                                                                                                         [transition_type: 0]
                                                                                                         [frame_type: 2]

                                                                                                    ---------- InterstitialRenderer LoggerSession End ----------

Did I forgot something? I am using OpenXR-SDK-release-1.0.34 and also added ovr_openxr_mobile_sdk_66.0 to the project.

Any ideas?

svillar commented 4 months ago

The logcat does not clarify much what's going on. Not sure how you build chromium but if you build release you have to disable minification in Wolvic, because with minification on many chromium code is removed/discarded and things just break randomly.

yuripourre commented 4 months ago

The logcat does not clarify much what's going on. Not sure how you build chromium but if you build release you have to disable minification in Wolvic, because with minification on many chromium code is removed/discarded and things just break randomly.

Thanks for the suggestion, now my build.gradle looks like this:

    buildTypes {
        release {
            minifyEnabled false
            shrinkResources false
        }
    }

The app has the same behavior as in debug mode, when it's installed on Oculus Quest 2 it sits in the lower bar and a window/panel opens.

I tried to grab the icon from the lower bar and drop in the front panel and then it crashes with some error messages, finally. It's a huge log so I will paste only the useful information:

...
2024-07-13 12:20:30.247 10415-10467 VRB                     com.igalia.wolvic                    I  OpenXR: supported extension: XR_EXT_local_floor
2024-07-13 12:20:30.247 10415-10467 VRB                     com.igalia.wolvic                    I  OpenXR: supported extension: XR_EXT_user_presence
2024-07-13 12:20:30.247 10415-10467 OpenXR-Loader           com.igalia.wolvic                    V  Verbose [GENERAL | xrEnumerateApiLayerProperties | OpenXR-Loader] : Entering loader trampoline
2024-07-13 12:20:30.248 10415-10467 OpenXR-Loader           com.igalia.wolvic                    V  Verbose [GENERAL | xrEnumerateApiLayerProperties | OpenXR-Loader] : Entering loader trampoline
2024-07-13 12:20:30.248 10415-10467 OpenXR-Loader           com.igalia.wolvic                    V  Verbose [GENERAL | xrCreateInstance | OpenXR-Loader] : Entering loader trampoline
2024-07-13 12:20:30.248 10415-10467 OpenXR-Loader           com.igalia.wolvic                    E  Error [GENERAL | xrCreateInstance | OpenXR-Loader] : xrCreateInstance called with invalid API version 1.1.  Max supported version is 1.0
2024-07-13 12:20:30.248 10415-10467 libc++abi               com.igalia.wolvic                    E  terminating with uncaught exception of type std::logic_error: XrResult failure [XR_ERROR_API_VERSION_UNSUPPORTED]
                                                                                                        Origin: xrCreateInstance(&createInfo, &instance)
                                                                                                        Source: /home/yuri/git/wolvic/app/src/openxr/cpp/DeviceDelegateOpenXR.cpp:227
2024-07-13 12:20:30.248 10415-10467 libc                    com.igalia.wolvic                    A  Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 10467 (Thread-5), pid 10415 (m.igalia.wolvic)
2024-07-13 12:20:30.432 10415-10415 VRB[Session]            com.igalia.wolvic                    D  Loading URI: https://wolvic.com/start
2024-07-13 12:20:30.484 10511-10511 DEBUG                   pid-10511                            A  APK-Location: /data/app/~~6cflvDCSsTkpgHFQ8LWY0w==/com.igalia.wolvic-qdLNRdl3onkcD8cWqZ0asg==/base.apk
2024-07-13 12:20:30.484 10511-10511 DEBUG                   pid-10511                            A  Cmdline: com.igalia.wolvic
2024-07-13 12:20:30.484 10511-10511 DEBUG                   pid-10511                            A  pid: 10415, tid: 10467, name: Thread-5  >>> com.igalia.wolvic <<<
2024-07-13 12:20:30.484 10511-10511 DEBUG                   pid-10511                            A  Abort message: 'terminating with uncaught exception of type std::logic_error: XrResult failure [XR_ERROR_API_VERSION_UNSUPPORTED]
                                                                                                        Origin: xrCreateInstance(&createInfo, &instance)
                                                                                                        Source: /home/yuri/git/wolvic/app/src/openxr/cpp/DeviceDelegateOpenXR.cpp:227'
2024-07-13 12:20:30.484 10511-10511 DEBUG                   pid-10511                            A        #01 pc 00000000000d1cc0  /data/app/~~6cflvDCSsTkpgHFQ8LWY0w==/com.igalia.wolvic-qdLNRdl3onkcD8cWqZ0asg==/lib/arm64/libc++_shared.so (BuildId: a59088f9640cd272bc9542d94dc84a0c88afd558)
2024-07-13 12:20:30.484 10511-10511 DEBUG                   pid-10511                            A        #02 pc 00000000000d1e74  /data/app/~~6cflvDCSsTkpgHFQ8LWY0w==/com.igalia.wolvic-qdLNRdl3onkcD8cWqZ0asg==/lib/arm64/libc++_shared.so (BuildId: a59088f9640cd272bc9542d94dc84a0c88afd558)
2024-07-13 12:20:30.484 10511-10511 DEBUG                   pid-10511                            A        #03 pc 00000000000e6b74  /data/app/~~6cflvDCSsTkpgHFQ8LWY0w==/com.igalia.wolvic-qdLNRdl3onkcD8cWqZ0asg==/lib/arm64/libc++_shared.so (BuildId: a59088f9640cd272bc9542d94dc84a0c88afd558)
2024-07-13 12:20:30.484 10511-10511 DEBUG                   pid-10511                            A        #04 pc 00000000000e6208  /data/app/~~6cflvDCSsTkpgHFQ8LWY0w==/com.igalia.wolvic-qdLNRdl3onkcD8cWqZ0asg==/lib/arm64/libc++_shared.so (BuildId: a59088f9640cd272bc9542d94dc84a0c88afd558)
2024-07-13 12:20:30.484 10511-10511 DEBUG                   pid-10511                            A        #05 pc 00000000000e6160  /data/app/~~6cflvDCSsTkpgHFQ8LWY0w==/com.igalia.wolvic-qdLNRdl3onkcD8cWqZ0asg==/lib/arm64/libc++_shared.so (__cxa_throw+124) (BuildId: a59088f9640cd272bc9542d94dc84a0c88afd558)
2024-07-13 12:20:30.484 10511-10511 DEBUG                   pid-10511                            A        #06 pc 0000000000127e58  /data/app/~~6cflvDCSsTkpgHFQ8LWY0w==/com.igalia.wolvic-qdLNRdl3onkcD8cWqZ0asg==/lib/arm64/libnative-lib.so (crow::Throw(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, char const*, char const*)+152) (BuildId: 91ccf0ff4fa61c5448e4103f79de3b10c36971c2)
2024-07-13 12:20:30.484 10511-10511 DEBUG                   pid-10511                            A        #07 pc 000000000012d1c8  /data/app/~~6cflvDCSsTkpgHFQ8LWY0w==/com.igalia.wolvic-qdLNRdl3onkcD8cWqZ0asg==/lib/arm64/libnative-lib.so (crow::ThrowXrResult(XrResult, char const*, char const*)+60) (BuildId: 91ccf0ff4fa61c5448e4103f79de3b10c36971c2)
2024-07-13 12:20:30.484 10511-10511 DEBUG                   pid-10511                            A        #08 pc 0000000000125ecc  /data/app/~~6cflvDCSsTkpgHFQ8LWY0w==/com.igalia.wolvic-qdLNRdl3onkcD8cWqZ0asg==/lib/arm64/libnative-lib.so (crow::DeviceDelegateOpenXR::State::Initialize()+5188) (BuildId: 91ccf0ff4fa61c5448e4103f79de3b10c36971c2)
2024-07-13 12:20:30.484 10511-10511 DEBUG                   pid-10511                            A        #09 pc 0000000000124a5c  /data/app/~~6cflvDCSsTkpgHFQ8LWY0w==/com.igalia.wolvic-qdLNRdl3onkcD8cWqZ0asg==/lib/arm64/libnative-lib.so (crow::DeviceDelegateOpenXR::Create(std::__ndk1::shared_ptr<vrb::RenderContext>&, crow::JavaContext*)+608) (BuildId: 91ccf0ff4fa61c5448e4103f79de3b10c36971c2)
2024-07-13 12:20:30.484 10511-10511 DEBUG                   pid-10511                            A        #10 pc 0000000000123668  /data/app/~~6cflvDCSsTkpgHFQ8LWY0w==/com.igalia.wolvic-qdLNRdl3onkcD8cWqZ0asg==/lib/arm64/libnative-lib.so (android_main+424) (BuildId: 91ccf0ff4fa61c5448e4103f79de3b10c36971c2)
2024-07-13 12:20:30.484 10511-10511 DEBUG                   pid-10511                            A        #11 pc 00000000001a568c  /data/app/~~6cflvDCSsTkpgHFQ8LWY0w==/com.igalia.wolvic-qdLNRdl3onkcD8cWqZ0asg==/lib/arm64/libnative-lib.so (BuildId: 91ccf0ff4fa61c5448e4103f79de3b10c36971c2)
2024-07-13 12:20:30.503  1067-10533 ActivityTaskManager     system_server                        W    Force finishing activity com.igalia.wolvic/.VRBrowserActivity

I believe this is the error:

E  Error [GENERAL | xrCreateInstance | OpenXR-Loader] : xrCreateInstance called with invalid API version 1.1.  Max supported version is 1.0

I am going to try other versions and see how it goes.

Edit: Using the OpenXR-SDK-release-1.0.33 gives me a different error (XR_ERROR_RUNTIME_UNAVAILABLE), the app still crashes:

024-07-13 12:39:06.362 13498-13545 OpenXR-Loader           com.igalia.wolvic                    E  Could access neither the installable nor system runtime broker.
2024-07-13 12:39:06.362 13498-13545 OpenXR-Loader           com.igalia.wolvic                    I  Info [GENERAL |  | OpenXR-Loader] : RuntimeManifestFile::FindManifestFiles - using global runtime file /system/etc/openxr/1/active_runtime.json
2024-07-13 12:39:06.362 13498-13545 OpenXR-Loader           com.igalia.wolvic                    I  Info [GENERAL |  | OpenXR-Loader] : RuntimeManifestFile::CreateIfValid - attempting to load /system/etc/openxr/1/active_runtime.json
2024-07-13 12:39:06.363 13498-13545 OpenXR-Loader           com.igalia.wolvic                    E  Error [GENERAL |  | OpenXR-Loader] : /system/etc/openxr/1/active_runtime.json library /system/priv-app/VrDriver/VrDriver.apk!/lib/arm64-v8a/libopenxr_forwardloader.so does not appear to exist
2024-07-13 12:39:06.363 13498-13545 OpenXR-Loader           com.igalia.wolvic                    E  Error [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : RuntimeInterface::LoadRuntimes - failed to load a runtime
2024-07-13 12:39:06.363 13498-13545 OpenXR-Loader           com.igalia.wolvic                    E  Error [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : Failed to find default runtime with RuntimeInterface::LoadRuntime()
2024-07-13 12:39:06.363 13498-13545 OpenXR-Loader           com.igalia.wolvic                    E  Error [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : Failed querying extension properties
2024-07-13 12:39:06.364 13498-13547 MtpDeviceJNI            com.igalia.wolvic                    D  register_android_mtp_MtpDevice
2024-07-13 12:39:06.365 13498-13545 libc++abi               com.igalia.wolvic                    E  terminating with uncaught exception of type std::logic_error: XrResult failure [XR_ERROR_RUNTIME_UNAVAILABLE]
                                                                                                        Origin: xrEnumerateInstanceExtensionProperties(nullptr, 0, &extensionCount, nullptr)
                                                                                                        Source: /home/yuri/git/wolvic/app/src/openxr/cpp/OpenXRExtensions.cpp:33
2024-07-13 12:39:06.365 13498-13545 libc                    com.igalia.wolvic                    A  Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 13545 (Thread-5), pid 13498 (m.igalia.wolvic)

Seems that the XR runtime cannot be found.

yuripourre commented 4 months ago

It works!!!!! Thank you so much @svillar for helping me out!

To fix this I had to use the latest ovr_openxr_mobile_sdk (66.0). Also, I had to use the matching OpenXR-SDK (1.0.34).

And also, the final step, I had to include the following line to the build.gradle file:

implementation 'org.khronos.openxr:openxr_loader_for_android:1.0.34'

Now the app doesn't crash.

com-oculus-vrshell-20240713-134406

svillar commented 4 months ago

I'm glad it worked, but you shouldn't actually need those. We have much older versions in third_party repo and works fine with that.

Regarding that extra line in gradle, we do already have a PR to allow wolvic to use the khronos loader from the runtime whenever supported.

But again, you must have skipped some step in the setup process (which I agree is not easy).

yuripourre commented 4 months ago

I'm glad it worked, but you shouldn't actually need those. We have much older versions in third_party repo and works fine with that.

Regarding that extra line in gradle, we do already have a PR to allow wolvic to use the khronos loader from the runtime whenever supported.

But again, you must have skipped some step in the setup process (which I agree is not easy).

Yes, I probably skipped something.

Also, there is a page from Oculus saying that any OpenXR-SDK older than 1.0.34 will crash, I can link here if I find it again. Maybe that's the issue with Oculus Quest 2.

https://developer.oculus.com/documentation/native/android/mobile-openxr/

Screenshot_20240714-112041