Git Product home page Git Product logo

Comments (3)

nasir-hussain-swat avatar nasir-hussain-swat commented on June 2, 2024

It seems that you are encountering an error while running the Bazel build command for the helloworld target in the com/google/j2cl/samples/helloworld package. The error message suggests that there are unused native files causing the build failure.

Here are a few suggestions to troubleshoot the issue:

Check the build configuration: Ensure that you have the correct dependencies and build settings configured for the J2CL project. Make sure that all required dependencies are correctly specified in the BUILD files and that your Bazel workspace is set up properly.

Verify the J2CL version: Ensure that you are using a compatible version of the J2CL transpiler. Check if there are any specific version requirements or compatibility issues mentioned in the project's documentation or release notes. You might need to update or adjust the J2CL version accordingly.

Clean and rebuild: Try cleaning the Bazel build cache and performing a clean build. Run bazel clean --expunge to remove any cached build artifacts and then try building again using the bazel build command.

Check for unused native files: The error message indicates that there are unused native files causing the build failure. Review the J2CL project's configuration and make sure that the native files are correctly included or excluded as needed. You might need to update the build configuration to address this issue.

Enable verbose output: If the issue persists, you can use the --verbose_failures flag with the bazel build command to get more detailed information about the failed build steps. This can help you identify the specific cause of the failure.

If none of these suggestions resolve the issue, I recommend consulting the J2CL project's documentation, issue tracker, or community forums for further assistance. They may have specific recommendations or workarounds for the problem you are facing.

from j2cl.

bschenkelberger avatar bschenkelberger commented on June 2, 2024

Thank you for your quick reply. But to be honest. I expect that the master contains all the appropriate dependencies. Because that is the getting started part.

I did the baszel clean and also added --verbose_failures, but the result is the same.

ERROR: C:/users/fujitsu/_bazel_fujitsu/7zwbdliw/external/com_google_j2cl/jre/java/BUILD:167:13: Transpiling to JavaScript @com_google_j2cl//jre/java:jre failed: (Exit 1): BazelJ2clBuilder.exe failed: error executing command
cd /d C:/users/fujitsu/_bazel_fujitsu/7zwbdliw/execroot/com_google_j2cl_samples_helloworld
SET LANG=en_US.UTF-8
bazel-out\x64_windows-opt-exec-2B5CBBC6\bin\external\com_google_j2cl\transpiler\java\com\google\j2cl\transpiler\BazelJ2clBuilder.exe @bazel-out/x64_windows-fastbuild/bin/external/com_google_j2cl/jre/java/jre.js-0.params

  • Configuration: 2877ba0b561476092d5c4022bf856304f1e5dc1625249de071df1a06df98703b
  • Execution platform: @local_config_platform//:host
    Error: Unused native file 'java/lang/Class.native.js'.
    Error: Unused native file 'java/lang/IntegralToString.native.js'.
    Error: Unused native file 'javaemul/internal/Casts.native.js'.
    Error: Unused native file 'javaemul/internal/ConsoleLogger.native.js'.
    Error: Unused native file 'javaemul/internal/HashCodes.native.js'.
    Error: Unused native file 'javaemul/internal/JsUtils.native.js'.
    Error: Unused native file 'javaemul/internal/Objects.native.js'.
    Error: Unused native file 'javaemul/internal/ThrowableUtils.native.js'.
    Error: Unused native file 'javaemul/internal/ValueType.native.js'.
    9 error(s), 0 warning(s).
    Target //src/main/java/com/google/j2cl/samples/helloworld:helloworld failed to build
    INFO: Elapsed time: 492.668s, Critical Path: 123.29s
    INFO: 551 processes: 42 internal, 455 local, 54 worker.
    FAILED: Build did NOT complete successfully

from j2cl.

tbroyer avatar tbroyer commented on June 2, 2024

Works for me on Linux. Could it be because you're using Windows, and outside WSL? (see https://github.com/google/j2cl#caveat-emptor)

(note: I do have the same warnings about @local_jdk//:jar and the Kotlin toUpperCaseuppercase et al., but not the libast ones about annotation processing)

from j2cl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.