Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 515114 - dev-lang/ispc-1.7.0 injects -Werror
Summary: dev-lang/ispc-1.7.0 injects -Werror
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Christoph Junghans (RETIRED)
URL: https://github.com/ispc/ispc/pull/807
Whiteboard:
Keywords:
Depends on:
Blocks: werror
  Show dependency tree
 
Reported: 2014-06-25 17:53 UTC by Freddie Witherden
Modified: 2014-06-26 05:53 UTC (History)
2 users (show)

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


Attachments
Suggested patch for the Makefile (ispc-1.7.0-llvm_version.patch,499 bytes, patch)
2014-06-25 19:10 UTC, Jouni Kosonen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Freddie Witherden 2014-06-25 17:53:29 UTC
When attempting to compile dev-lang/ispc-1.7.0:

>>> Emerging (1 of 1) dev-lang/ispc-1.7.0::gentoo
 * ispc-1.7.0.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                    [ ok ]
>>> Unpacking source...
>>> Unpacking ispc-1.7.0.tar.gz to /var/tmp/portage/dev-lang/ispc-1.7.0/work
>>> Source unpacked in /var/tmp/portage/dev-lang/ispc-1.7.0/work
>>> Preparing source in /var/tmp/portage/dev-lang/ispc-1.7.0/work/ispc-1.7.0 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-lang/ispc-1.7.0/work/ispc-1.7.0 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-lang/ispc-1.7.0/work/ispc-1.7.0 ...
make -j8 'LDFLAGS=-Wl,-O1 -Wl,--as-needed' 'OPT=-O2 -pipe -march=native -Wno-error' CXX=x86_64-pc-linux-gnu-g++ CPP=x86_64-pc-linux-gnu-cpp 
 ============================== !!! WARNING !!! =============================== 
 Location of LLVM files in your PATH is different than path in LLVM_HOME 
 variable (or LLVM_HOME is not set). The most likely this means that you are 
 using default LLVM installation on your system, which is very bad sign. 
 Note, that ISPC uses LLVM optimizer and is highly dependent on it. We recommend 
 using *patched* version of LLVM 3.3 or 3.4. Patches are availible in 
 llvm_patches folder. You can build LLVM manually, or run our scripts, which 
 will do all the work for you. Do the following: 
 1. Create a folder, where LLVM will reside and set LLVM_HOME variable to its 
   path. 
 2. Set ISPC_HOME variable to your ISPC location (probably current folder). 3. Run alloy.py tool to checkout and build LLVM: 
   alloy.py -b --version=3.4 
 4. Add $LLVM_HOME/bin-3.4/bin path to your PATH. 
 ==============================================================================
Updating dependencies
Using LLVM 3.4.2 from /usr/lib64
Creating objs/ directory
Using compiler to build: x86_64-pc-linux-gnu-g++ (Gentoo 4.8.3 p1.1, pie-0.5.9) 4.8.3
Compiling ast.cpp
<command-line>:0:9: error: missing whitespace after the macro name [-Werror]
Compiling builtins.cpp
<command-line>:0:9: error: missing whitespace after the macro name [-Werror]
Compiling cbackend.cpp
<command-line>:0:9: error: missing whitespace after the macro name [-Werror]
Compiling ctx.cpp
<command-line>:0:9: error: missing whitespace after the macro name [-Werror]
Compiling decl.cpp
<command-line>:0:9: error: missing whitespace after the macro name [-Werror]
Compiling expr.cpp
<command-line>:0:9: error: missing whitespace after the macro name [-Werror]
Compiling func.cpp
<command-line>:0:9: error: missing whitespace after the macro name [-Werror]
Compiling ispc.cpp
<command-line>:0:9: error: missing whitespace after the macro name [-Werror]
cc1plus: all warnings being treated as errors
Makefile:257: recipe for target 'objs/ast.o' failed
make: *** [objs/ast.o] Error 1
make: *** Waiting for unfinished jobs....
cc1plus: all warnings being treated as errors
Makefile:257: recipe for target 'objs/decl.o' failed
make: *** [objs/decl.o] Error 1
cc1plus: all warnings being treated as errors
Makefile:257: recipe for target 'objs/builtins.o' failed
make: *** [objs/builtins.o] Error 1
cc1plus: all warnings being treated as errors
Makefile:257: recipe for target 'objs/ctx.o' failed
make: *** [objs/ctx.o] Error 1
cc1plus: all warnings being treated as errors
Makefile:257: recipe for target 'objs/ispc.o' failed
make: *** [objs/ispc.o] Error 1
cc1plus: all warnings being treated as errors
Makefile:257: recipe for target 'objs/func.o' failed
make: *** [objs/func.o] Error 1
cc1plus: all warnings being treated as errors
Makefile:257: recipe for target 'objs/expr.o' failed
make: *** [objs/expr.o] Error 1
cc1plus: all warnings being treated as errors
Makefile:261: recipe for target 'objs/cbackend.o' failed
make: *** [objs/cbackend.o] Error 1

This appears to be because the -Werror flag is being used and hence:

  <command-line>:0:9: error: missing whitespace after the macro name [-Werror]

Reproducible: Always
Comment 1 Jouni Kosonen 2014-06-25 19:10:42 UTC
Created attachment 379660 [details, diff]
Suggested patch for the Makefile

With llvm 3.4.2 the command line ends up containing -DLLVM_3_4.2 
 
The code seems to be expecting something like -DLLVM_3_4 for this case, so having -Werror stop the compilation here is likely a good thing.

Looks like the sed expression in the Makefile can only remove the micro version if it's zero. There's also something strange in the escaping levels...

Attaching a patch that should make this work better.
Comment 2 Christoph Junghans (RETIRED) gentoo-dev 2014-06-26 05:53:26 UTC
+  26 Jun 2014; Christoph Junghans <ottxor@gentoo.org>
+  +files/ispc-1.7.0-llvm-version.patch, ispc-1.7.0.ebuild:
+  fix build with llvm-3.4.2 (bug #515114)
+