[llvm-bugs] [Bug 26164] New: check-libomp fails on darwin
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Jan 15 11:46:33 PST 2016
https://llvm.org/bugs/show_bug.cgi?id=26164
Bug ID: 26164
Summary: check-libomp fails on darwin
Product: OpenMP
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Runtime Library
Assignee: unassignedbugs at nondot.org
Reporter: hans at chromium.org
CC: howarth.mailing.lists at gmail.com,
llvm-bugs at lists.llvm.org
Blocks: 26059
Classification: Unclassified
http://lab.llvm.org:8011/builders/libomp-clang-x86_64-linux-debian/ has been
red for a while.
Is there a bot running them on Darwin?
Are these tests even known to be passing? This is preventing me from building
the 3.8 release on Darwin.
Can someone please help get these working, and ideally also try building the
3.8 branch? If we don't get this working soon I'll have to exclude the openmp
runtime from the release.
First problem:
********************
FAIL: libomp :: worksharing/sections/omp_sections_reduction.c (67 of 67)
[....]
Command 0: "/work/llvm/build.release/./bin/clang" "-fopenmp=libomp" "-I"
"/work/llvm/projects/openmp/runtime/test" "-I"
"/work/llvm/build.release/projects/openmp/runtime/src" "-L"
"/work/llvm/build.release/lib" "-Wl,-rpath,/work/llvm/build.release/lib"
"/work/llvm/projects/
openmp/runtime/test/worksharing/sections/omp_sections_reduction.c" "-o"
"/work/llvm/build.release/projects/openmp/runtime/test/worksharing/sections/Output/omp_sections_reduction.c.tmp"
"-lm"
Command 0 Result: 1
Command 0 Output:
Command 0 Stderr:
/work/llvm/projects/openmp/runtime/test/worksharing/sections/omp_sections_reduction.c:2:10:
fatal error: 'stdio.h' file not found
#include <stdio.h>
^
1 error generated.
When using recently-built Clang, -isysroot needs to be passed on recent
versions of Darwin. This can be done like so:
diff --git a/runtime/test/lit.cfg b/runtime/test/lit.cfg
index 2f258ef..e6d4467 100644
--- a/runtime/test/lit.cfg
+++ b/runtime/test/lit.cfg
@@ -2,6 +2,7 @@
# Configuration file for the 'lit' test runner.
import os
+import subprocess
import lit.formats
# Tell pylint that we know config and lit_config exist somewhere.
@@ -57,6 +58,16 @@ if config.operating_system == 'Darwin':
if config.using_hwloc:
config.test_cflags += " -Wl,-rpath," + config.hwloc_library_dir
+# Find the SDK on Darwin
+if config.operating_system == 'Darwin':
+ cmd = subprocess.Popen(['xcrun', '--show-sdk-path'],
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ out, err = cmd.communicate()
+ out = out.strip()
+ res = cmd.wait()
+ if res == 0 and out:
+ config.test_cflags += " -isysroot " + out
+
# substitutions
config.substitutions.append(("%libomp-compile-and-run", \
"%clang %cflags %s -o %t -lm && %t"))
With that applied, the tests now fail or hang instead:
For example:
********************
FAIL: libomp :: worksharing/single/omp_single_private.c (57 of 67)
******************** TEST 'libomp :: worksharing/single/omp_single_private.c'
FAILED ********************
Script:
--
/work/llvm/build.release/./bin/clang -fopenmp=libomp -I
/work/llvm/projects/openmp/runtime/test -I
/work/llvm/build.release/projects/openmp/runtime/src -L
/work/llvm/build.release/lib -Wl,-rpath,/work/llvm/build.release/lib -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk
/work/llvm/projects/openmp/runtime/test/worksharing/single/omp_single_private.c
-o
/work/llvm/build.release/projects/openmp/runtime/test/worksharing/single/Output/omp_single_private.c.tmp
-lm &&
/work/llvm/build.release/projects/openmp/runtime/test/worksharing/single/Output/omp_single_private.c.tmp
--
Exit Code: -10
Command Output (stdout):
--
Command 0: "/work/llvm/build.release/./bin/clang" "-fopenmp=libomp" "-I"
"/work/llvm/projects/openmp/runtime/test" "-I"
"/work/llvm/build.release/projects/openmp/runtime/src" "-L"
"/work/llvm/build.release/lib" "-Wl,-rpath,/work/llvm/build.release/lib"
"-isysroot"
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk"
"/work/llvm/projects/openmp/runtime/test/worksharing/single/omp_single_private.c"
"-o"
"/work/llvm/build.release/projects/openmp/runtime/test/worksharing/single/Output/omp_single_private.c.tmp"
"-lm"
Command 0 Result: 0
Command 0 Output:
Command 0 Stderr:
Command 1:
"/work/llvm/build.release/projects/openmp/runtime/test/worksharing/single/Output/omp_single_private.c.tmp"
Command 1 Result: -10
And omp_threadprivate_for.c just hangs.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160115/d09c3429/attachment.html>
More information about the llvm-bugs
mailing list