Date: Wed, 05 Aug 2015 22:21:26 +0930 From: Shane Ambler <FreeBSD@ShaneWare.Biz> To: Brooks Davis <brooks@freebsd.org> Cc: ports@freebsd.org Subject: Re: Does OpenMP (iomp5) work for clang-devel? Message-ID: <55C206CE.2070904@ShaneWare.Biz> In-Reply-To: <55AE0474.5050207@ShaneWare.Biz> References: <1437439738.57135.5.camel@pki2.com> <20150721010727.GA64147@spindle.one-eyed-alien.net> <1437442196.57135.13.camel@pki2.com> <55AE0474.5050207@ShaneWare.Biz>
next in thread | previous in thread | raw e-mail | index | archive | help
On 21/07/2015 18:06, Shane Ambler wrote: > On 21/07/2015 10:59, Dennis Glatting wrote: >> On Tue, 2015-07-21 at 01:07 +0000, Brooks Davis wrote: >>> On Mon, Jul 20, 2015 at 05:48:58PM -0700, Dennis Glatting wrote: >>>> I can't seem to get this working and it appears not to emit code. I >>>> have >>>> libiomp5 installed and I compile specifying: >>>> >>>> clang++-devel -fopenmp=libiomp5 ... >>>> >>>> And the compiler says: >>>> >>>> clang: warning: argument unused during compilation: >>>> '-fopenmp=libiomp5' > > That should be just -fopenmp > > From http://blog.llvm.org/2015/05/openmp-support_22.html > > To enable OpenMP, just add ‘-fopenmp’ to the command line and provide > paths to OpenMP headers and library with ‘-I <path to omp.h> -L <LLVM > OpenMP library path>’. Having just installed devel/llvm37 and done a few tests, this doesn't appear to happen, for a single file test I also need to add -lomp clang37 -fopenmp -I/usr/local/llvm37/include -L/usr/local/llvm37/lib -lomp omp.c -o omp-test One issue is that lldb breaks qtcreator. Sounds odd but I get - [leader:~] shane% qtcreator QProcess: Destroyed while process ("/usr/local/bin/lldb-mi-devel") is still running. QProcess: Destroyed while process ("/usr/local/bin/lldb-mi37") is still running. Broken pipe [leader:~] shane% If I rename the two binaries reported qtcreator runs fine. qtcreator-3.4.0 - rebuilt while llvm37 was installed without change. My main interest in openmp is for compiling graphics/blender. This breaks llvm37 - I am running 10-stable - FreeBSD leader.local 10.2-PRERELEASE FreeBSD 10.2-PRERELEASE #16 r285937: Tue Jul 28 20:58:13 ACST 2015 root@leader.local:/usr/obj/usr/src/sys/GENERIC amd64 % pkg info -ox llvm37 llvm37-3.7.0.r1 devel/llvm37 Adding to make.conf - .if ${.CURDIR:M*/graphics/blender*} CC=clang37 CXX=clang++37 CPP=clang-cpp37 .endif The build ends with - [ 42%] Building C object source/blender/editors/datafiles/CMakeFiles/bf_editor_datafiles.dir/__/__/__/__/release/datafiles/matcaps/mc04.jpg.c.o Assertion failed: (!DMEntry && "Decl already exists in localdeclmap!"), function EmitAutoVarAlloca, file /wrkdirs/usr/ports/devel/llvm37/work/llvm-3.7.0rc1.src/tools/clang/lib/CodeGen/CGDecl.cpp, line 1016. [ 42%] Building C object source/blender/bmesh/CMakeFiles/bf_bmesh.dir/operators/bmo_create.c.o clang-3.7: error: unable to execute command: Abort trap clang-3.7: error: clang frontend command failed due to signal (use -v to see invocation) clang version 3.7.0 (tags/RELEASE_370/rc1) Target: x86_64-unknown-freebsd10.2 Thread model: posix clang-3.7: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script. clang-3.7: note: diagnostic msg: ******************** PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang-3.7: note: diagnostic msg: /tmp/BLI_kdopbvh-8090d7.c clang-3.7: note: diagnostic msg: /tmp/BLI_kdopbvh-8090d7.sh clang-3.7: note: diagnostic msg: ******************** Full build log and debug files are available at http://shaneware.biz/freebsddebugdata/clang37/ Brooks, I haven't submitted this upstream but can if you want. -- FreeBSD - the place to B...Software Developing Shane Ambler
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?55C206CE.2070904>