[LU-2982] autoconf check for linux kernel arch isnt sandbox friendly Created: 18/Mar/13  Updated: 17/Apr/14  Resolved: 17/Apr/14

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.4.0
Fix Version/s: Lustre 2.6.0

Type: Improvement Priority: Trivial
Reporter: Alexey Shvetsov Assignee: Dmitry Eremin (Inactive)
Resolution: Fixed Votes: 0
Labels: build, patch
Environment:

Linux


Rank (Obsolete): 7267

 Description   

Current autoconf check isnt sandbox friendly so it may fail if package build in sandbox envirement



 Comments   
Comment by Alexey Shvetsov [ 18/Mar/13 ]

Suggested patch that i tested on Gentoo linux (getoo build system used sandbox)
http://review.whamcloud.com/5751

Comment by Alexey Shvetsov [ 19/Mar/13 ]

Sandbox violation:

checking Linux kernel architecture...  * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.1907.tmp
rm: cannot remove '.1907.tmp': Permission denied
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.1907.o
rm: cannot remove '.1907.o': Permission denied
 * ACCESS DENIED:  open_wr:      /usr/src/linux-3.8.3-gentoo-r1/.1911.tmp
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.1911.tmp
rm: cannot remove '.1911.tmp': Permission denied
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.1911.o
rm: cannot remove '.1911.o': Permission denied
 * ACCESS DENIED:  open_wr:      /usr/src/linux-3.8.3-gentoo-r1/.1916.tmp
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.1916.tmp
rm: cannot remove '.1916.tmp': Permission denied
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.1916.o
rm: cannot remove '.1916.o': Permission denied
 * ACCESS DENIED:  open_wr:      /usr/src/linux-3.8.3-gentoo-r1/.1926.tmp
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.1926.tmp
rm: cannot remove '.1926.tmp': Permission denied
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.1926.o
rm: cannot remove '.1926.o': Permission denied
 * ACCESS DENIED:  open_wr:      /usr/src/linux-3.8.3-gentoo-r1/.1932.tmp
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.1932.tmp
rm: cannot remove '.1932.tmp': Permission denied
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.1932.o
rm: cannot remove '.1932.o': Permission denied
 * ACCESS DENIED:  open_wr:      /usr/src/linux-3.8.3-gentoo-r1/.1938.tmp
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.1938.tmp
rm: cannot remove '.1938.tmp': Permission denied
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.1938.o
rm: cannot remove '.1938.o': Permission denied
 * ACCESS DENIED:  open_wr:      /usr/src/linux-3.8.3-gentoo-r1/.1944.tmp
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.1944.tmp
rm: cannot remove '.1944.tmp': Permission denied
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.1944.o
rm: cannot remove '.1944.o': Permission denied
 * ACCESS DENIED:  open_wr:      /usr/src/linux-3.8.3-gentoo-r1/.1950.tmp
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.1950.tmp
rm: cannot remove '.1950.tmp': Permission denied
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.1950.o
rm: cannot remove '.1950.o': Permission denied
 * ACCESS DENIED:  open_wr:      /usr/src/linux-3.8.3-gentoo-r1/.1956.tmp
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.1956.tmp
rm: cannot remove '.1956.tmp': Permission denied
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.1956.o
rm: cannot remove '.1956.o': Permission denied
 * ACCESS DENIED:  open_wr:      /usr/src/linux-3.8.3-gentoo-r1/.1962.tmp
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.1962.tmp
rm: cannot remove '.1962.tmp': Permission denied
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.1962.o
rm: cannot remove '.1962.o': Permission denied
 * ACCESS DENIED:  open_wr:      /usr/src/linux-3.8.3-gentoo-r1/.1967.tmp
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.1967.tmp
rm: cannot remove '.1967.tmp': Permission denied
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.1967.o
rm: cannot remove '.1967.o': Permission denied
 * ACCESS DENIED:  open_wr:      /usr/src/linux-3.8.3-gentoo-r1/.1972.tmp
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.1972.tmp
rm: cannot remove '.1972.tmp': Permission denied
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.1972.o
rm: cannot remove '.1972.o': Permission denied
 * ACCESS DENIED:  open_wr:      /usr/src/linux-3.8.3-gentoo-r1/.1977.tmp
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.1977.tmp
rm: cannot remove '.1977.tmp': Permission denied
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.1977.o
rm: cannot remove '.1977.o': Permission denied
 * ACCESS DENIED:  open_wr:      /usr/src/linux-3.8.3-gentoo-r1/.1983.tmp
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.1983.tmp
rm: cannot remove '.1983.tmp': Permission denied
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.1983.o
rm: cannot remove '.1983.o': Permission denied
 * ACCESS DENIED:  open_wr:      /usr/src/linux-3.8.3-gentoo-r1/.1988.tmp
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.1988.tmp
rm: cannot remove '.1988.tmp': Permission denied
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.1988.o
rm: cannot remove '.1988.o': Permission denied
 * ACCESS DENIED:  open_wr:      /usr/src/linux-3.8.3-gentoo-r1/.1993.tmp
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.1993.tmp
rm: cannot remove '.1993.tmp': Permission denied
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.1993.o
rm: cannot remove '.1993.o': Permission denied
 * ACCESS DENIED:  open_wr:      /usr/src/linux-3.8.3-gentoo-r1/.1998.tmp
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.1998.tmp
rm: cannot remove '.1998.tmp': Permission denied
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.1998.o
rm: cannot remove '.1998.o': Permission denied
 * ACCESS DENIED:  open_wr:      /usr/src/linux-3.8.3-gentoo-r1/.2003.tmp
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.2003.tmp
rm: cannot remove '.2003.tmp': Permission denied
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.2003.o
rm: cannot remove '.2003.o': Permission denied
 * ACCESS DENIED:  open_wr:      /usr/src/linux-3.8.3-gentoo-r1/.2011.tmp
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.2011.tmp
rm: cannot remove '.2011.tmp': Permission denied
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.2011.o
rm: cannot remove '.2011.o': Permission denied
 * ACCESS DENIED:  open_wr:      /usr/src/linux-3.8.3-gentoo-r1/.2018.tmp
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.2018.tmp
rm: cannot remove '.2018.tmp': Permission denied
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.2018.o
rm: cannot remove '.2018.o': Permission denied
 * ACCESS DENIED:  open_wr:      /usr/src/linux-3.8.3-gentoo-r1/.2025.tmp
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.2025.tmp
rm: cannot remove '.2025.tmp': Permission denied
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.2025.o
rm: cannot remove '.2025.o': Permission denied
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.2039.tmp
rm: cannot remove ‘.2039.tmp’: Permission denied
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.2039.o
rm: cannot remove ‘.2039.o’: Permission denied
 * ACCESS DENIED:  open_wr:      /usr/src/linux-3.8.3-gentoo-r1/.2043.tmp
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.2043.tmp
rm: cannot remove ‘.2043.tmp’: Permission denied
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.2043.o
rm: cannot remove ‘.2043.o’: Permission denied
 * ACCESS DENIED:  open_wr:      /usr/src/linux-3.8.3-gentoo-r1/.2048.tmp
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.2048.tmp
rm: cannot remove ‘.2048.tmp’: Permission denied
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.2048.o
rm: cannot remove ‘.2048.o’: Permission denied
 * ACCESS DENIED:  open_wr:      /usr/src/linux-3.8.3-gentoo-r1/.2054.tmp
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.2054.tmp
rm: cannot remove ‘.2054.tmp’: Permission denied
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.2054.o
rm: cannot remove ‘.2054.o’: Permission denied
 * ACCESS DENIED:  open_wr:      /usr/src/linux-3.8.3-gentoo-r1/.2060.tmp
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.2060.tmp
rm: cannot remove ‘.2060.tmp’: Permission denied
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.2060.o
rm: cannot remove ‘.2060.o’: Permission denied
 * ACCESS DENIED:  open_wr:      /usr/src/linux-3.8.3-gentoo-r1/.2066.tmp
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.2066.tmp
rm: cannot remove ‘.2066.tmp’: Permission denied
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.2066.o
rm: cannot remove ‘.2066.o’: Permission denied
 * ACCESS DENIED:  open_wr:      /usr/src/linux-3.8.3-gentoo-r1/.2072.tmp
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.2072.tmp
rm: cannot remove ‘.2072.tmp’: Permission denied
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.2072.o
rm: cannot remove ‘.2072.o’: Permission denied
 * ACCESS DENIED:  open_wr:      /usr/src/linux-3.8.3-gentoo-r1/.2078.tmp
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.2078.tmp
rm: cannot remove ‘.2078.tmp’: Permission denied
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.2078.o
rm: cannot remove ‘.2078.o’: Permission denied
 * ACCESS DENIED:  open_wr:      /usr/src/linux-3.8.3-gentoo-r1/.2084.tmp
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.2084.tmp
rm: cannot remove ‘.2084.tmp’: Permission denied
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.2084.o
rm: cannot remove ‘.2084.o’: Permission denied
 * ACCESS DENIED:  open_wr:      /usr/src/linux-3.8.3-gentoo-r1/.2089.tmp
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.2089.tmp
rm: cannot remove ‘.2089.tmp’: Permission denied
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.2089.o
rm: cannot remove ‘.2089.o’: Permission denied
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.tmp_quiet_recordmcount
rm: cannot remove ‘.tmp_quiet_recordmcount’: Permission denied
make[1]: *** [scripts_basic] Error 1
 * ACCESS DENIED:  open_wr:      /usr/src/linux-3.8.3-gentoo-r1/.2098.tmp
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.2098.tmp
rm: cannot remove '.2098.tmp': Permission denied
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.2098.o
rm: cannot remove '.2098.o': Permission denied
 * ACCESS DENIED:  open_wr:      /usr/src/linux-3.8.3-gentoo-r1/.2105.tmp
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.2105.tmp
rm: cannot remove '.2105.tmp': Permission denied
 * ACCESS DENIED:  unlinkat:     /usr/src/linux-3.8.3-gentoo-r1/.2105.o
rm: cannot remove '.2105.o': Permission denied
x86
checking name of module symbol version file... Module.symvers
Comment by Brian Behlendorf [ 19/Mar/13 ]

Yeah, that's clearly bad. Have you investigated why the kernel build system is generating these temporary objects under /usr/src/linux-3.8.3-gentoo-r1/? There's likely a way to ensure they're created in your working directory. If not, then doing what you suggest in the configure test seems reasonable.

Comment by Alexey Shvetsov [ 20/Mar/13 ]

thats because of mechanism of how to determine kernel arch was used. Headers way based on config are clearly better. Especialy in case of cross-compilation (in which case current mechanism will not work at all)

Comment by Dmitry Eremin (Inactive) [ 28/Feb/14 ]

Actually compile.h header generated from environment variable $ARCH that is used now for architecture determination. So, there is no big difference in current and proposed approaches. In other way I agree we should change current approach to avoid compilation errors. I'm going to find this way or change proposed patch to make it robust.

Comment by Dmitry Eremin (Inactive) [ 04/Mar/14 ]

New patch is http://review.whamcloud.com/9458

Comment by Dmitry Eremin (Inactive) [ 03/Apr/14 ]

Patch for b2_4: http://review.whamcloud.com/9879/

Comment by Peter Jones [ 17/Apr/14 ]

Landed for 2.6

Generated at Sat Feb 10 01:29:56 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.