Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 397559 - sys-devel/clang-9999: 'make check': OSError: [Errno 2] No such file or directory
Summary: sys-devel/clang-9999: 'make check': OSError: [Errno 2] No such file or directory
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Bernard Cafarelli
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-03 22:12 UTC by Michał Górny
Modified: 2012-01-13 22:25 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Compressed build log (20120103-211932.log.bz2,46.62 KB, application/octet-stream)
2012-01-03 22:12 UTC, Michał Górny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-01-03 22:12:05 UTC
Created attachment 297845 [details]
Compressed build log

As stated below, 'make check' fails immediately being unable to launch 'llc'. I guess it expects clang to be compiled in built llvm directory. 

--
>>> Test phase [test]: sys-devel/clang-9999
make -j6 -j1 VERBOSE=1 test 
make[1]: Entering directory `/tmp/portage/sys-devel/clang-9999/work/llvm/tools/clang/test'
Making Clang 'lit.site.cfg' file...
Making Clang 'Unit/lit.site.cfg' file...
--- Running clang tests for x86_64-pc-linux-gnu ---
lit.py: lit.cfg:146: note: using clang: '/tmp/portage/sys-devel/clang-9999/work/llvm/Release/bin/clang'
Traceback (most recent call last):
  File "/tmp/portage/sys-devel/clang-9999/work/llvm/utils/lit/lit.py", line 5, in <module>
    lit.main()
  File "/tmp/portage/sys-devel/clang-9999/work/llvm/utils/lit/lit/main.py", line 517, in main
    testSuiteCache, localConfigCache)[1])
  File "/tmp/portage/sys-devel/clang-9999/work/llvm/utils/lit/lit/main.py", line 230, in getTests
    ts,path_in_suite = getTestSuite(path, litConfig, testSuiteCache)
  File "/tmp/portage/sys-devel/clang-9999/work/llvm/utils/lit/lit/main.py", line 199, in getTestSuite
    ts, relative = search(item)
  File "/tmp/portage/sys-devel/clang-9999/work/llvm/utils/lit/lit/main.py", line 183, in search
    cache[path] = res = search1(path)
  File "/tmp/portage/sys-devel/clang-9999/work/llvm/utils/lit/lit/main.py", line 174, in search1
    cfg = TestingConfig.frompath(cfgpath, None, litConfig, mustExist = True)
  File "/tmp/portage/sys-devel/clang-9999/work/llvm/utils/lit/lit/TestingConfig.py", line 52, in frompath
    exec f in cfg_globals
  File "/tmp/portage/sys-devel/clang-9999/work/llvm/tools/clang/test/lit.site.cfg", line 21, in <module>
    lit.load_config(config, "/tmp/portage/sys-devel/clang-9999/work/llvm/tools/clang/test/../test/lit.cfg")
  File "/tmp/portage/sys-devel/clang-9999/work/llvm/utils/lit/lit/LitConfig.py", line 66, in load_config
    config = config)
  File "/tmp/portage/sys-devel/clang-9999/work/llvm/utils/lit/lit/TestingConfig.py", line 52, in frompath
    exec f in cfg_globals
  File "/tmp/portage/sys-devel/clang-9999/work/llvm/tools/clang/test/../test/lit.cfg", line 221, in <module>
    llc_props = get_llc_props(os.path.join(llvm_tools_dir, 'llc'))
  File "/tmp/portage/sys-devel/clang-9999/work/llvm/tools/clang/test/../test/lit.cfg", line 201, in get_llc_props
    cmd = subprocess.Popen([tool, '-version'], stdout=subprocess.PIPE)
  File "/usr/lib64/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib64/python2.7/subprocess.py", line 1228, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
make[1]: *** [all] Error 1
make[1]: Leaving directory `/tmp/portage/sys-devel/clang-9999/work/llvm/tools/clang/test'
make: *** [test] Error 2
emake failed
 * ERROR: sys-devel/clang-9999 failed (test phase):
 *   Make test failed. See above for details.
 * 
 * Call stack:
 *     ebuild.sh, line  85:  Called src_test
 *   environment, line 4816:  Called die
 * The specific snippet of code:
 *           has test $FEATURES && die "Make test failed. See above for details.";
 * 
 * If you need support, post the output of 'emerge --info =sys-devel/clang-9999',
 * the complete build log and the output of 'emerge -pqv =sys-devel/clang-9999'.
 * The complete build log is located at '/var/log/portage/sys-devel:clang-9999:20120103-211932.log'.
 * The ebuild environment file is located at '/tmp/portage/sys-devel/clang-9999/temp/environment'.
 * S: '/tmp/portage/sys-devel/clang-9999/work/llvm'
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-01-03 22:17:43 UTC
After some testing, it seems that the following line is reponsible (in test/lit.cfg):

llc_cmd = subprocess.Popen([os.path.join(llvm_tools_dir, 'llc'), '-version'],
                           stdout = subprocess.PIPE)

where llvm_tools_dir is path to the build directory. I think it should be '/usr/bin' in our case instead.

Replacing that path by hand fixes the issue.
Comment 2 Bernard Cafarelli gentoo-dev 2012-01-13 22:25:12 UTC
Indeed, 3.0 works around this by compiling llvm too when testing.

3.0-r1 and 9999 now have the good sed line to change clang's test/lit.cfg to use system llc, 3.0 test now work without re-compiling llvm (file in live version has not changed that much, so it should work too)