dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.22k stars 1.57k forks source link

Build fails: ERROR at //BUILD.gn:5:1: Can't load input file. import("build/config/gclient_args.gni") #56507

Closed yurivict closed 1 month ago

yurivict commented 2 months ago

Build is attempted according to .

Build fails:

===>  Building for dart-3.5.1
cd /usr/ports/lang/dart/work/sdk-3.5.1 &&  /usr/bin/env XDG_DATA_HOME=/usr/ports/lang/dart/work  XDG_CONFIG_HOME=/usr/ports/lang/dart/work  XDG_CACHE_HOME=/usr/ports/lang/dart/work/.cache  HOME=/usr/ports/lang/dart/work PATH=/usr/local/libexec/ccache:/usr/ports/lang/dart/work/.bin:/home/yuri/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin PKG_CONFIG_LIBDIR=/usr/ports/lang/dart/work/.pkgconfig:/usr/local/libdata/pkgconfig:/usr/local/share/pkgconfig:/usr/libdata/pkgconfig MK_DEBUG_FILES=no MK_KERNEL_SYMBOLS=no SHELL=/bin/sh NO_LINT=YES PREFIX=/usr/local  LOCALBASE=/usr/local  CC="cc" CFLAGS="-O2 -pipe  -fstack-protector-strong -fno-strict-aliasing "  CPP="cpp" CPPFLAGS=""  LDFLAGS=" -fstack-protector-strong " LIBS=""  CXX="c++" CXXFLAGS="-O2 -pipe -fstack-protector-strong -fno-strict-aliasing  " CCACHE_DIR="/tmp/.ccache" BSD_INSTALL_PROGRAM="install  -s -m 555"  BSD_INSTALL_LIB="install  -s -m 0644"  BSD_INSTALL_SCRIPT="install  -m 555"  BSD_INSTALL_DATA="install  -m 0644"  BSD_INSTALL_MAN="install  -m 444" ./tools/build.py --mode release --arch x64 create_sdk
ERROR at //BUILD.gn:5:1: Can't load input file.
import("build/config/gclient_args.gni")
^-------------------------------------
Unable to load:
  /usr/ports/lang/dart/work/sdk-3.5.1/build/config/gclient_args.gni
I also checked in the secondary tree for:
  /usr/ports/lang/dart/work/sdk-3.5.1/build/secondary/build/config/gclient_args.gni
Command failed: /usr/ports/lang/dart/work/sdk-3.5.1/buildtools/gn gen out/ReleaseX64 --args=target_os="freebsd" host_cpu="x64" target_cpu="x64" dart_target_arch="x64" dart_use_compressed_pointers=false dart_use_crashpad=false dart_snapshot_kind="app-jit" bssl_use_clang_integrated_as=true is_debug=false is_release=true is_product=false dart_debug=false dart_runtime_mode="develop" exclude_kernel_service=false is_clang=true dart_vm_code_coverage=false is_asan=false is_lsan=false is_msan=false is_tsan=false is_ubsan=false is_qemu=false dart_platform_sdk=false dart_stripped_binary="exe.stripped/dart" dart_precompiled_runtime_stripped_binary="exe.stripped/dart_precompiled_runtime_product" gen_snapshot_stripped_binary="exe.stripped/gen_snapshot_product" analyze_snapshot_binary="exe.stripped/analyze_snapshot" wasm_opt_stripped_binary="exe.stripped/wasm-opt" use_rbe=false verify_sdk_hash=true dart_version_git_info=true
buildtools/ninja/ninja -C out/ReleaseX64 create_sdk

The file build/config/gclient_args.gni referenced in BUILD.gn isn't in the repository.

Version: 3.5.1

dart-github-bot commented 2 months ago

Summary: The user is attempting to build the Dart SDK from source but the build fails because the file build/config/gclient_args.gni is missing from the repository. This file is referenced in the BUILD.gn file, which is responsible for configuring the build process.

athomas commented 2 months ago

Did you follow these steps to get the source or just clone the repo from GH? https://github.com/dart-lang/sdk/blob/main/docs/Building.md#source

build/config/gclient_args.gni file isn't checked in, it's generated from DEPS. So if you have a plain checkout not generated by gclient, it wouldn't have a necessary dependencies to do a build.

github-actions[bot] commented 1 month ago

Without additional information we're not able to resolve this issue. Feel free to add more info or respond to any questions above and we can reopen the case. Thanks for your contribution!