Compiling for Chromebooks with Crouton

I currently have an Asus c300 chrome book. Since it doesn't have the old boot, I use crouton to get a more standard command line environment. I was able to install gcc very easily in a chroot environment. It works very well under chroot.

Since the underlying hardware is the same, I thought the resulting executable should work for the chromebook, without me in the chroot environment. If that's true, I thought I could go into the chroot environment, compile whatever program I want / need, and exit back to the normal environment and use it.

I tried this with a simple world program. When I tried to run the executable, I got the following error:

bash: ./a.out: Permission denied.

      

I tried to run it with sudo and I get a similar error:

sudo: unable to execute ./a.out: Permission denied.

      

I even used su to login as root and I still couldn't run the program (got the first error).

I thought su / sudo would override any permission restrictions. But apparently this is not the case on Chromebooks.

What am I missing? Is this what I want to make possible?

EDIT: The file permission is already set to 777.

+3


source to share


2 answers


You may just need to change file permissions or check file ownership. The umask determines the weather, and not the generated file gets run permissions by default. What does -ls -lat show in the file?

Also try running



chmod +x ./a.out

      

0


source


You can find out more about the error with the strace

Usage: command
strace ./a.out

and check the output.
I believe you have env (path and LD_library_path)

u chroot

.



0


source







All Articles