ubuntu - cmake working for root not for other user -


i have dummy compilation running in buildbot slave. when running buildbot user get:

-- c compiler identification unknown -- cxx compiler identification unknown -- check working c compiler: /usr/bin/gcc -- check working c compiler: /usr/bin/gcc -- broken cmake error @ /usr/share/cmake-2.8/modules/cmaketestccompiler.cmake:52 (message):   c compiler "/usr/bin/gcc" not able compile simple test program. ... cc1: error: /usr/local/include/x86_64-linux-gnu: permission denied 

/usr/local/include/x86_64-linux-gnu not exist if manually run su get:

-- c compiler identification gnu -- cxx compiler identification gnu -- check working c compiler: /usr/bin/gcc -- check working c compiler: /usr/bin/gcc -- works -- detecting c compiler abi info -- detecting c compiler abi info - done -- check working cxx compiler: /usr/bin/c++ -- check working cxx compiler: /usr/bin/c++ -- works -- detecting cxx compiler abi info -- detecting cxx compiler abi info - done 

and on, can later make , run generated executable i'm assuming not related project file permissions because files belong buildbot user

command running cmake . os ubuntu 12.04.1 lts server edition

thanks

when cmake checks if gcc works, creates temporary file , tries compile it. in experience done in local cmakefiles files directory. looks reason trying in /usr/local/include (it @ least trying something in folder, hence cc1: error: /usr/local/include/x86_64-linux-gnu: permission denied).

the issue indicated only root has access read or write in folder. seems bit odd me, because other should @ least allowed read there. anyway, buildbot not have access there, , configuration fails.

you have 3 options.

  1. dig cmake doing when tries access file, , change doing in location own.
  2. change permissions of /usr/local/include can write /usr/local/include
  3. create new group buildbot belongs to, , change group ownership of /usr/local/include that. make sure change permissions 770.

personally, try first, because prefer cmake do things local, not in bowels of system. there log files in cmakefiles directory can poke around in.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -