Skip to content

building: When looking for build dpendencies, check pkgconfig and PATH also #56951

@solomoncyj

Description

@solomoncyj

when compiling the sdk, i repetedlyt came across issues then when running ./tools/build.py --mode release --arch <arch> create_sdk
I always get the error that some programs in ./buildtools was not present, but was installed system wide on my system, rady to use already. eg

> ./tools/build.py --no-clang --mode release --arch x64 create_sdk
Traceback (most recent call last):
  File "/home/solomoncyj/Downloads/sdk/./tools/build.py", line 325, in <module>
    sys.exit(Main())
             ~~~~^^
  File "/home/solomoncyj/Downloads/sdk/./tools/build.py", line 301, in Main
    gn_py.RunGnOnConfiguredConfigurations(options, env)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
  File "/home/solomoncyj/Downloads/sdk/tools/gn.py", line 673, in RunGnOnConfiguredConfigurations
    BuildGnCommand(args, mode, arch, target_os, sanitizer,
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                   out_dir))
                   ^^^^^^^^
  File "/home/solomoncyj/Downloads/sdk/tools/gn.py", line 642, in BuildGnCommand
    raise Exception("Couldn't find the gn binary at path: " + gn)
Exception: Couldn't find the gn binary at path: /home/solomoncyj/Downloads/sdk/buildtools/gn

> which gn
/usr/bin/gn

please make the build script check for tools alreay on the system, and run ln/ just call to thr applicvation exposed to the path

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-buildUse area-build for SDK build issues.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions