Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fresh checkout doesn't build #1

Closed
cdisselkoen opened this issue Oct 27, 2017 · 7 comments
Closed

Fresh checkout doesn't build #1

cdisselkoen opened this issue Oct 27, 2017 · 7 comments

Comments

@cdisselkoen
Copy link
Collaborator

From a fresh checkout (branch master, commit b79af46), I get the following build error:

Exception: Cannot find a toolchain for x86-32 in [...]/Sandboxing_NaCl/native_client/toolchain/linux_x86/nacl_x86_glibc_raw: 
  File "[...]/Sandboxing_NaCl/native_client/SConstruct", line 2823:
    RANDOM_LIBS = ['nacl_random_private'],
  File "[...]/Sandboxing_NaCl/third_party/scons-2.0.1/engine/SCons/Environment.py", line 1315:
    apply_tools(clone, tools, toolpath)
[...]

It keeps going, but I think that's the relevant part.

I'm running the command ./scons --nacl_glibc --verbose from the native_client directory as suggested in the README.

Note, it is looking in a directory [...]/Sandboxing_NaCl/native_client/toolchain that doesn't exist in this repo. Similarly named directories native_client/toolchain_build and native_client/toolchain_revisions exist, but neither contains a linux_x86 directory which the build system seems to be looking for.

I'll keep investigating, just documenting the issue here.

@cdisselkoen
Copy link
Collaborator Author

cdisselkoen commented Oct 27, 2017

The exception seems to actually be raised in native_client/site_scons/site_tools/naclsdk.py line 108.

I've traced the problem back to the function GetToolchainDir() defined in native_client/SConstruct. On line 1153 we see the culprit, where it is assumed that the toolchain lives in a toolchain directory that apparently doesn't exist.

@shravanrn
Copy link
Owner

shravanrn commented Oct 30, 2017

So can you run the following commands and retry

sudo native_client/tools/linux.x86_64.prep.sh
#Also make sure to have gclient installed and then run 
gclient runhooks

@cdisselkoen
Copy link
Collaborator Author

cdisselkoen commented Oct 30, 2017

How do I acquire gclient? Package manager on Ubuntu 17.04 doesn't have it.

Interestingly, my WSL (Ubuntu 16.04) system failed to run the prep script due to unable to install libtinfo5:i386, while the other Linux box (one of David's) that I have access to (Ubuntu 17.04) succeeded in installing that. 16.04 and 17.04 have the same apt entries for libtinfo5, so maybe that package is one of the rare ones that actually runs into issues on WSL vs. a real Linux system.

@shravanrn
Copy link
Owner

shravanrn commented Oct 30, 2017

gClient is a part of depot tools software. See
http://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up

I wouldn't worry about the prep script failing... I think your build may succeed independent of that. If not, we can always revisit that part

@cdisselkoen
Copy link
Collaborator Author

gclient runhooks gives error Error: client not configured; see 'gclient config' on both machines. gclient config gives error

Usage: gclient.py config [options] [url]
gclient.py: error: Inconsistent arguments. Use either --spec or one or 2 args

The instructions linked above don't seem to cover this error. (They talk about configuring Git, but I've done that and this error still occurs.) I'm not sure what config is needed?

@shravanrn
Copy link
Owner

shravanrn commented Nov 2, 2017

I think you have to run this in the nacl directory (outside the native_client directory). Is this what you are doing? Also below are instructions for some of the tools needed

sudo apt install flex bison git g++-multilib

git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH="$(pwd)/depot_tools:$PATH"

git clone https://chromium.googlesource.com/external/gyp.git
cd gyp
sudo python setup.py install

#In nacl directory - i.e.  (outside the native_client directory)
gclient runhooks

@shravanrn
Copy link
Owner

Confirmed fix. Will update readme

@shravanrn shravanrn reopened this Nov 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants