0
votes

I am a newbie on chromium. I got a problem while building from the source code.

I follow the official guides:

https://www.chromium.org/developers/how-tos/get-the-code https://chromium.googlesource.com/chromium/src/+/master/docs/mac_build_instructions.md

After the step "./build/gyp_chromium", I run "ninja -C out/Release chrome"

An error occur, while it starts to build the "Native Client"

How can I get pass this error?

Is the native client necessary for chrome??

[112/19703] ACTION gio_lib: build glibc x86-64 nso_f9b445103aafa60092cbc8a215b3b734 FAILED: cd ../../native_client/src/shared/gio; .....

src/native_client/toolchain/mac_x86/nacl_x86_glibc/bin/../lib/gcc/x86_64-nacl/4.4.3/../../../../x86_64-nacl/bin/ld: cannot find crti.o: No such file or directory src/native_client/toolchain/mac_x86/nacl_x86_glibc/bin/../lib/gcc/x86_64-nacl/4.4.3/../../../../x86_64-nacl/bin/ld: cannot find crtbeginS.o: No such file or directory src/native_client/toolchain/mac_x86/nacl_x86_glibc/bin/../lib/gcc/x86_64-nacl/4.4.3/../../../../x86_64-nacl/bin/ld: cannot find -lstdc++ src/native_client/toolchain/mac_x86/nacl_x86_glibc/bin/../lib/gcc/x86_64-nacl/4.4.3/../../../../x86_64-nacl/bin/ld: cannot find -lm src/native_client/toolchain/mac_x86/nacl_x86_glibc/bin/../lib/gcc/x86_64-nacl/4.4.3/../../../../x86_64-nacl/bin/ld: cannot find -lgcc_s src/native_client/toolchain/mac_x86/nacl_x86_glibc/bin/../lib/gcc/x86_64-nacl/4.4.3/../../../../x86_64-nacl/bin/ld: cannot find -lc src/native_client/toolchain/mac_x86/nacl_x86_glibc/bin/../lib/gcc/x86_64-nacl/4.4.3/../../../../x86_64-nacl/bin/ld: cannot find -lgcc_s src/native_client/toolchain/mac_x86/nacl_x86_glibc/bin/../lib/gcc/x86_64-nacl/4.4.3/../../../../x86_64-nacl/bin/ld: cannot find crtendS.o: No such file or directory src/native_client/toolchain/mac_x86/nacl_x86_glibc/bin/../lib/gcc/x86_64-nacl/4.4.3/../../../../x86_64-nacl/bin/ld: cannot find crtn.o: No such file or directory

1

1 Answers

0
votes

To enable Native Client support in Chromium, you need to use a Native Client-enabled compiler to build certain pieces. For automated and official builds, we use prebuilt toolchains which are downloaded via the gyp hooks mechanism. If you use gclient from depot_tools to sync all of Chromium's dependencies, then it also downloads binary toolchain packages which are used by default to build the untrusted nexe parts of Chromium (this is primarily x86_64-nacl-clang). If your build is failing to find Native Client toolchains (which seems to be the case here) you should check that the toolchain binaries are getting downloaded.

Some packagers are unwilling to use pre-built toolchains. In that case you can also build the Native Client clang toolchain from source using the instructions here, and use that in the Chromium build. (If there are problems with those instructions, please post to [email protected] or file a bug report.

In either case, if you just want to build Chromium (and not the NaCl SDK or all of the many Native Client tests in the Chromium repo), you can add build_glibc=0 to your gyp defines. You will likely want to do that if you build your own clang toolchain, to avoid also having to build the NaCl gcc compiler.

Chromium can also be built entirely without Native Client support by setting DISABLE_NACL=1 in your gyp defines.