Impossible to configure/build ANGLE on Linux

161 views
Skip to first unread message

Lord0fDragons

unread,
Dec 18, 2024, 10:56:03 AM12/18/24
to angleproject
I try building ANGLE to evaluate using it but to no avail. I follow the instructions on https://github.com/google/angle/blob/main/doc/DevSetup.md . I'm hitting these problems:

1) Checking out submodules is working except this one: https://chrome-internal.googlesource.com/angle/es-cts => third_party/gles1_conform . I have no permission to check those out. This should not be the case. The checkout process though seems to run through even with that one not working

2) Trying to run "gn args out/Release" fails because "buildtools/linux64/gn" is not found. To solve this I have to symlink "depot_tools" repository directory to "buildtools/linux64". This should not be required. Doing the symlink allows me to continue.

3) Running "gn args out/Release" or "gn gen out/Release" is not working. Instead it fork-bombs my system by recursively creating thousands of child-process until my 64G are all filled up and my system becomes unresponsive and has to be rebooted. Fork-bombs really are a no-go in a build system!

So what can be done? Is there a command line option I can use or a modification to the build system to prevent it fork-bombing my system?

Yuly Novikov

unread,
Dec 18, 2024, 11:05:07 AM12/18/24
to rol...@rptd.ch, angleproject
It sounds like you're not actually following the instructions.
"fetch angle" is supposed to get you all the needed dependencies, and you shouldn't check out submodules manually.
Not having permission to check out gles1_conform is expected, and this should be hidden from you if you use "fetch angle".
"fetch angle" is also supposed to get you "buildtools/linux64/gn" (unless you're on linux arm64?).

--
You received this message because you are subscribed to the Google Groups "angleproject" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angleproject...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/angleproject/73abaa30-b47f-48b4-b4ae-03205409fcean%40googlegroups.com.

Lord0fDragons

unread,
Dec 18, 2024, 11:15:51 AM12/18/24
to angleproject
I tried now doing this:
> rm -rf angle
> git clone https://chromium.googlesource.com/angle/angle
> cd angle
> fetch angle
> Running: gclient root
> Your current directory appears to already contain, or be part of,
> a checkout. "fetch" is used only to get new checkouts. Use
> "gclient sync" to update existing checkouts.
>
> Fetch also does not yet deal with partial checkouts, so if fetch
> failed, delete the checkout and start over (crbug.com/230691).

Running then
> ./build/install-build-deps.sh
complains with
> bash: ./build/install-build-deps.sh: No such file or directory

Any ideas what to do next?

Lord0fDragons

unread,
Dec 18, 2024, 11:44:55 AM12/18/24
to angleproject
Okay, I get it now. The "fetch" command expects an empty directory no clone. So far so good but it is still not working:
> gn args out/Release
> Waiting for editor on "/source/angle/out/Release/args.gn"...
>sh: 1: vi: not found
Needs installing "vim" package first. Something to add to the dependency install script inside ANGLE.

Lord0fDragons

unread,
Dec 18, 2024, 11:52:27 AM12/18/24
to angleproject
I can now set the configuration with "gn args out/Release" but I get this errors:

"""
Waiting for editor on "/source/angle/out/Release/args.gn"...
Generating files...
ERROR at //build/config/compiler/pgo/BUILD.gn:104:23: Script returned non-zero exit code.
pgo_data_path = exec_script("//tools/update_pgo_profiles.py",
^----------
Current dir: /source/angle/out/Release/
Command: python3 /source/angle/tools/update_pgo_profiles.py --target linux get_profile_path
Returned 2.
stderr:

python3: can't open file '/source/angle/tools/update_pgo_profiles.py': [Errno 2] No such file or directory

See //build/config/BUILDCONFIG.gn:365:3: which caused the file to be included.
"//build/config/compiler/pgo:default_pgo_flags",
^----------------------------------------------
"""

Calling "gn args..." again shows the configuration written so I'm not sure if this is an important error or not.

Lord0fDragons

unread,
Dec 18, 2024, 11:53:37 AM12/18/24
to angleproject
Correction... it IS an important error. Calling "gn gen out/Release" throws the same error and no building is done

Lord0fDragons

unread,
Dec 19, 2024, 2:10:21 PM12/19/24
to angleproject
I tried searching for the file "update_pgo_profiles.py" in the entire code base but it is nowhere. Can somebody fix this with code access?

Lord0fDragons

unread,
Dec 20, 2024, 12:06:09 PM12/20/24
to angleproject
I managed to work around the build system bug to get it compiling. Unfortunately ANGLE is not working at all. With all test applications build by ANGLE I get "Illegal instruction" and the tests crash. I checked the libraries and test binaries to be properly compiled for the test system but no dice. ANGLE is just not working on Linux => CRASH!

Shahbaz Youssefi

unread,
Dec 25, 2024, 11:26:33 PM12/25/24
to angleproject
Hi,

Could you please provide some information about the environment in which you are building ANGLE? Like, the fact that `gn args` couldn't find an editor makes me believe this is a very restricted distribution.

Also, looking at the context around the failure from //build/config/compiler/pgo/BUILD.gn, it looks like somehow your ANGLE checkout thinks it's a Chromium checkout and tries to use PGO. What configuration did you put in args.gn?

Lord0fDragons

unread,
Dec 26, 2024, 8:35:16 AM12/26/24
to angleproject
Environment is an ubuntu noble docker image. Required since I'm on Gentoo and the build system expects "sudo" to be present which is banned from my system.


Here the content of args.gn:
```
angle_build_tests = false
is_debug = false
is_official_build = true
treat_warnings_as_errors = false
is_component_build = false
```

Shahbaz Youssefi

unread,
Dec 27, 2024, 5:36:16 AM12/27/24
to angleproject
`is_official_build=true` is the problem, that's not used with ANGLE builds. Please remove that.

Which part of the build system needs `sudo`? Is that for anything more than installing dependencies (via build/install-build-deps.sh)?

Harshel Malawade

unread,
Dec 27, 2024, 5:50:32 AM12/27/24
to angleproject
Hello,

Is it compulsory that the `PGO Profiles` should be enabled?

Harshel Malawade

unread,
Dec 27, 2024, 5:50:38 AM12/27/24
to angleproject
Yes, `is_official_build=true` is the problem.

And as per my observation, only the ./build/install-build-deps.sh, needs `sudo`

Shahbaz Youssefi

unread,
Dec 27, 2024, 5:52:56 AM12/27/24
to angleproject
`is_official_build` is a flag used in chromium builds only, standalone ANGLE doesn't use PGO currently.

> And as per my observation, only the ./build/install-build-deps.sh, needs `sudo`

Ack. Supposedly, if you install the equivalent packages yourself you won't need that script, but I suspect a Docker image is indeed still much simpler.

Lord0fDragons

unread,
Dec 27, 2024, 5:08:44 PM12/27/24
to angleproject
I see. Might be a good idea then to update the build documentation since this one requires you to enable this flag to get a proper non-debug build.

Shahbaz Youssefi

unread,
Dec 27, 2024, 10:22:04 PM12/27/24
to angleproject
Only the Android setup mentions `is_official_build = true`. That might indeed be incorrect now, but otherwise we don't claim anywhere that you'd need this flag. You definitely don't need it for a "proper non-debug build", `is_debug=false` is enough.
Reply all
Reply to author
Forward
0 new messages