Compiled chromium source code and the execution wi

2019-07-23 03:33发布

问题:

I've downloaded the chromium source and finally got it compiled. It took super long time to build the source.

I've followed the instruction in the official site

https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment

Unfortunately, the error is still there.

What I've done:

sudo cp out/Debug/chrome_sandbox /usr/local/sbin/chrome-devel-sandbox #needed if you build on NFS!
sudo chown root:root /usr/local/sbin/chrome-devel-sandbox
sudo chmod 4755 /usr/local/sbin/chrome-devel-sandbox

and I export this in my .bashrc

export CHROME_DEVEL_SANDBOX=/usr/local/sbin/chrome-devel-sandbox

and then I executed the executable and got the following error

chromium/src/out/Debug$./chrome
[22051:22051:0929/151724:FATAL:browser_main_loop.cc(160)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
#0 0x7f0051e91d3e base::debug::StackTrace::StackTrace()
#1 0x7f0051f01b05 logging::LogMessage::~LogMessage()
#2 0x7f0056a470f2 content::(anonymous namespace)::SetupSandbox()
#3 0x7f0056a46a16 content::BrowserMainLoop::EarlyInitialization()
#4 0x7f0056a52bb6 content::BrowserMainRunnerImpl::Initialize()
#5 0x7f0056a45c7f content::BrowserMain()
#6 0x7f0051e3a4af content::RunNamedProcessTypeMain()
#7 0x7f0051e3ca08 content::ContentMainRunnerImpl::Run()
#8 0x7f0051e39a95 content::ContentMain()
#9 0x7f0050d3aab5 ChromeMain
#10 0x7f0050d3aa62 main
#11 0x7f0047ef176d __libc_start_main
#12 0x7f0050d3a945 <unknown>

================================================================================

By following what official site suggests,

I ran a script and got the following message:

/chromium/src/build$ sudo ./update-linux-sandbox.sh
Your setuid sandbox is up to date
Make sure you have "export CHROME_DEVEL_SANDBOX=/usr/local/sbin/chrome-devel-sandbox" somewhere in your .bashrc
This variable is currently: empty

when I typed

echo $CHROME_DEVEL_SANDBOX
/usr/local/sbin/chrome-devel-sandbox:

So I guee the export works well.

I have searched around the answer to this question but no luck so far.

Any feedback will be appreciated. Thanks

回答1:

Here is what I did:

  1. build on a diff machine (in my case I used a server, Ubuntu 12.04)
  2. copy to my laptop (Ubuntu 13.10)
  3. run it

I was able to run it but unfortunately I am still not 100% sure what the problem was. :(

I guess the build environment would be different since I share the server with others.

Hope this helps,