compiling ispc on ubuntu

651 views
Skip to first unread message

Steve Heistand

unread,
Jul 8, 2016, 11:43:59 AM7/8/16
to Intel SPMD Program Compiler Users
Hi folks,
Im running into some issues trying to compile ispc on a linux machine.
the ispc build process goes nicely up until:
...
Compiling objs/lex.cpp
Creating ispc executable
objs/module.o: In function `Module::execPreprocessor(char const*, llvm::raw_string_ostream*) const':
module.cpp:(.text+0xc36): undefined reference to `llvm::sys::getDefaultTargetTriple()'
objs/ctx.o: In function `FunctionEmitContext::BroadcastValue(llvm::Value*, llvm::Type*, char const*)':
ctx.cpp:(.text+0x71b6): undefined reference to `llvm::Twine::str() const'
objs/ispc.o: In function `Target::GetTripleString() const':
ispc.cpp:(.text+0x2211): undefined reference to `llvm::sys::getDefaultTargetTriple()'
objs/opt.o: In function `IntrinsicsOpt::runOnBasicBlock(llvm::BasicBlock&)':
opt.cpp:(.text+0x1a6a): undefined reference to `llvm::Intrinsic::getName(llvm::Intrinsic::ID, llvm::ArrayRef<llvm::Type*>)'
opt.cpp:(.text+0x1af6): undefined reference to `llvm::Intrinsic::getName(llvm::Intrinsic::ID, llvm::ArrayRef<llvm::Type*>)'
opt.cpp:(.text+0x1bd2): undefined reference to `llvm::Intrinsic::getName(llvm::Intrinsic::ID, llvm::ArrayRef<llvm::Type*>)'
opt.cpp:(.text+0x1c5e): undefined reference to `llvm::Intrinsic::getName(llvm::Intrinsic::ID, llvm::ArrayRef<llvm::Type*>)'
opt.cpp:(.text+0x1d22): undefined reference to `llvm::Intrinsic::getName(llvm::Intrinsic::ID, llvm::ArrayRef<llvm::Type*>)'
objs/opt.o:opt.cpp:(.text+0x1dd7): more undefined references to `llvm::Intrinsic::getName(llvm::Intrinsic::ID, llvm::ArrayRef<llvm::Type*>)' follow
clang-3.8: error: linker command failed with exit code 1 (use -v to see invocation)
Makefile:264: recipe for target 'ispc' failed

Ive tried this using the llvm/clang build with the alloy.py script, Ive tried with the binary versions apt-get installs. Ive build llvm/clang from the tarballs
all give the same result. All are 3.8 versions if it matters.  and version 5 of gcc which might matter more then anything. I have Intel compilers on the machine
but they fail in the build process way earlier.

thoughts/suggestions?

thanks

steve
 

Dmitry Babokin

unread,
Jul 8, 2016, 12:49:07 PM7/8/16
to ispc-...@googlegroups.com
Hi,

Alloy.py build should work, but not sure about other options. Just to make sure - have you checked that you correctly added clang built by alloy.py to your path? I.e, "which clang" points to newly built clang.

Dmitry.

--
You received this message because you are subscribed to the Google Groups "Intel SPMD Program Compiler Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ispc-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Steve Heistand

unread,
Jul 8, 2016, 12:52:53 PM7/8/16
to ispc-...@googlegroups.com
I do get the clang (and llvm) that is built with the alloy.py script.
even trying older versions of llvm/clang/ispc result in the end with the same error.
At the moment I using a build script that has worked for other, its using a really
old 3.6.2 version of llvm and the latest ispc. will see how that goes.

s


On 07/08/2016 09:49 AM, Dmitry Babokin wrote:
> Hi,
>
> Alloy.py build should work, but not sure about other options. Just to make sure - have you checked that you correctly added clang built by
> alloy.py to your path? I.e, "which clang" points to newly built clang.
>
> Dmitry.
>
> <mailto:ispc-users+...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups "Intel SPMD Program Compiler Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ispc-users+...@googlegroups.com
> <mailto:ispc-users+...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

--
"Why is it so hot inside this handbasket?"
--
Steve Heistand steveh...@gmail.com
--

signature.asc

Dmitry Babokin

unread,
Jul 8, 2016, 1:00:47 PM7/8/16
to ispc-...@googlegroups.com
That's weird. Can you run check_env.py and copy its output here?

I was going to build a docker image with ispc build environment (including clang), this may probably help debugging your issue. I think I'll build it over the weekend. 

To unsubscribe from this group and stop receiving emails from it, send an email to ispc-users+...@googlegroups.com.

Steve Heistand

unread,
Jul 8, 2016, 1:16:26 PM7/8/16
to ispc-...@googlegroups.com
cd /usr/local/src/ispc
export ISPC_HOME=`pwd`
export LLVM_HOME=`pwd`
./alloy.py -b --version=3.8
export PATH=$LLVM_HOME/bin-3.8/bin:$PATH
which clang
/usr/local/src/ispc/bin-3.8/bin/clang
./check_env.py
=== in PATH: ===
Tools:
m4 (GNU M4) 1.4.17
bison (GNU Bison) 3.0.4
flex 2.6.0
Tools' versions are ok

SDE:
Warning: you don't have sde

ISPC:
Warning: you don't have ispc

C/C++ compilers:
clang version 3.8.0 (tags/RELEASE_380/final 274880)
gcc (Ubuntu 5.3.1-14ubuntu2.1) 5.3.1 20160413
Warning: you don't have icc

=== in ISPC specific environment variables: ===
Your LLVM_HOME:/usr/local/src/ispc
Your ISPC_HOME:/usr/local/src/ispc
Warning: you don't have ISPC in your ISPC_HOME
Warning: You have no SDE_HOME


On 07/08/2016 10:00 AM, Dmitry Babokin wrote:
> That's weird. Can you run check_env.py and copy its output here?
>
> I was going to build a docker image with ispc build environment (including clang), this may probably help debugging your issue. I think I'll
> build it over the weekend.
>
> > To unsubscribe from this group and stop receiving emails from it, send an email to ispc-users+...@googlegroups.com <mailto:ispc-users%2Bunsu...@googlegroups.com>
> > <mailto:ispc-users+...@googlegroups.com <mailto:ispc-users%2Bunsu...@googlegroups.com>>.
> > For more options, visit https://groups.google.com/d/optout.
> >
> >
> > --
> > You received this message because you are subscribed to the Google Groups "Intel SPMD Program Compiler Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to ispc-users+...@googlegroups.com <mailto:ispc-users%2Bunsu...@googlegroups.com>
> > <mailto:ispc-users+...@googlegroups.com <mailto:ispc-users%2Bunsu...@googlegroups.com>>.
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> "Why is it so hot inside this handbasket?"
> --
> Steve Heistand steveh...@gmail.com <mailto:steveh...@gmail.com>
> --
>
> --
> You received this message because you are subscribed to the Google Groups "Intel SPMD Program Compiler Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ispc-users+...@googlegroups.com
> <mailto:ispc-users%2Bunsu...@googlegroups.com>.
signature.asc

Dmitry Babokin

unread,
Jul 8, 2016, 1:38:04 PM7/8/16
to ispc-...@googlegroups.com
Everything looks perfectly correct. And your ispc sources are based on fresh https://github.com/ispc/ispc.git, right?

To unsubscribe from this group and stop receiving emails from it, send an email to ispc-users+...@googlegroups.com.

Steve Heistand

unread,
Jul 8, 2016, 1:47:04 PM7/8/16
to ispc-...@googlegroups.com
yep, fresh git on the source at least yesterday maybe today as well. been
trying a lot lately and not sure what happened when..



On 07/08/2016 10:38 AM, Dmitry Babokin wrote:
> Everything looks perfectly correct. And your ispc sources are based on fresh https://github.com/ispc/ispc.git, right?
>
> <mailto:ispc-users%2Bunsu...@googlegroups.com <mailto:ispc-users%252Buns...@googlegroups.com>>
> > > <mailto:ispc-users+...@googlegroups.com <mailto:ispc-users%2Bunsu...@googlegroups.com>
> <mailto:ispc-users%2Bunsu...@googlegroups.com <mailto:ispc-users%252Buns...@googlegroups.com>>>.
> > > For more options, visit https://groups.google.com/d/optout.
> > >
> > >
> > > --
> > > You received this message because you are subscribed to the Google Groups "Intel SPMD Program Compiler Users" group.
> > > To unsubscribe from this group and stop receiving emails from it, send an email to ispc-users+...@googlegroups.com <mailto:ispc-users%2Bunsu...@googlegroups.com>
> <mailto:ispc-users%2Bunsu...@googlegroups.com <mailto:ispc-users%252Buns...@googlegroups.com>>
> > > <mailto:ispc-users+...@googlegroups.com <mailto:ispc-users%2Bunsu...@googlegroups.com>
> <mailto:ispc-users%2Bunsu...@googlegroups.com <mailto:ispc-users%252Buns...@googlegroups.com>>>.
> > > For more options, visit https://groups.google.com/d/optout.
> >
> > --
> > "Why is it so hot inside this handbasket?"
> > --
> > Steve Heistand steveh...@gmail.com <mailto:steveh...@gmail.com> <mailto:steveh...@gmail.com <mailto:steveh...@gmail.com>>
> > --
> >
> > --
> > You received this message because you are subscribed to the Google Groups "Intel SPMD Program Compiler Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to ispc-users+...@googlegroups.com <mailto:ispc-users%2Bunsu...@googlegroups.com>
> > <mailto:ispc-users%2Bunsu...@googlegroups.com <mailto:ispc-users%252Buns...@googlegroups.com>>.
signature.asc

steve heistand

unread,
Jul 8, 2016, 5:06:33 PM7/8/16
to ispc-...@googlegroups.com
fyi with the release of 1.9, I grabbed the 1.9.1 tree (using git https://github.com/ispc/ispc.git returns 1.9.2dev btw)

still had the same problem, as did 1.9.2dev. When I picked llvm version 3.8.

if I use alloy.py --version=trunk both 1.9 versions compile fine.

1.8.X fails on trying to build llvm with the trunk option.

so Im good at this point. you might want to update what make in the ispc directory returns when

llvm_home is defined not appropriately.


thanks


s


<https://github.com/ispc/ispc.git>

On 07/08/2016 10:38 AM, Dmitry Babokin wrote:
> Everything looks perfectly correct. And your ispc sources are based on fresh https://github.com/ispc/ispc.git, right?
>
> > > To unsubscribe from this group and stop receiving emails from it, send an email to ispc-users+...@googlegroups.com <mailto:ispc-users%2Bunsu...@googlegroups.com> <mailto:ispc-users%2Bunsu...@googlegroups.com <mailto:ispc-users%252Buns...@googlegroups.com>>
> > > <mailto:ispc-users+...@googlegroups.com <mailto:ispc-users%2Bunsu...@googlegroups.com> <mailto:ispc-users%2Bunsu...@googlegroups.com <mailto:ispc-users%252Buns...@googlegroups.com>>>.
> > > For more options, visit https://groups.google.com/d/optout.
> > >
> > >
> > > --
> > > You received this message because you are subscribed to the Google Groups "Intel SPMD Program Compiler Users" group.
> > > To unsubscribe from this group and stop receiving emails from it, send an email to ispc-users+...@googlegroups.com <mailto:ispc-users%2Bunsu...@googlegroups.com> <mailto:ispc-users%2Bunsu...@googlegroups.com <mailto:ispc-users%252Buns...@googlegroups.com>>
> > > <mailto:ispc-users+...@googlegroups.com <mailto:ispc-users%2Bunsu...@googlegroups.com> <mailto:ispc-users%2Bunsu...@googlegroups.com <mailto:ispc-users%252Buns...@googlegroups.com>>>.
> > > For more options, visit https://groups.google.com/d/optout.
> >
> > --
> > "Why is it so hot inside this handbasket?"
> > --
> > Steve Heistand steveh...@gmail.com <mailto:steveh...@gmail.com> <mailto:steveh...@gmail.com <mailto:steveh...@gmail.com>>
> > --
> >
> > --
> > You received this message because you are subscribed to the Google Groups "Intel SPMD Program Compiler Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to ispc-users+...@googlegroups.com <mailto:ispc-users%2Bunsu...@googlegroups.com>
> > <mailto:ispc-users%2Bunsu...@googlegroups.com <mailto:ispc-users%252Buns...@googlegroups.com>>.
signature.asc

Dmitry Babokin

unread,
Jul 9, 2016, 9:47:23 AM7/9/16
to ispc-...@googlegroups.com
I've reproduced the problem.

It comes from some incompatibility of clang (which is used by default to build ispc) and gcc (which is used to build the clang itself). To fix the problem you have to either build clang with clang (basically add --selfbuild to alloy.py command line) or build ispc with gcc (i.e. run "make gcc", not just "make"). This is something new, it used to work well.

 

To unsubscribe from this group and stop receiving emails from it, send an email to ispc-users+...@googlegroups.com.

Aristid Breitkreuz

unread,
Sep 4, 2016, 10:06:24 AM9/4/16
to Intel SPMD Program Compiler Users
Do I understand it correctly that it's the GCC 5 ABI Tag issue?

If so, using Clang 3.9 should also work, right?

Also, is the SKX patch for LLVM 3.8 still applicable to 3.9?


Cheers,

Aristid
>     >     >     To unsubscribe from this group and stop receiving emails from it, send an email to ispc-users+...@googlegroups.com <mailto:ispc-users%2Bunsu...@googlegroups.com> <mailto:ispc-users%2Bunsu...@googlegroups.com <mailto:ispc-users%252Bunsubscribe@googlegroups.com>>
>     >     >     <mailto:ispc-users+unsub...@googlegroups.com <mailto:ispc-users%2Bunsu...@googlegroups.com> <mailto:ispc-users%2Bunsu...@googlegroups.com <mailto:ispc-users%252Bunsubscribe@googlegroups.com>>>.

>     >     >     For more options, visit https://groups.google.com/d/optout.
>     >     >
>     >     >
>     >     > --
>     >     > You received this message because you are subscribed to the Google Groups "Intel SPMD Program Compiler Users" group.

>     >     > For more options, visit https://groups.google.com/d/optout.
>     >
>     >     --
>     >     "Why is it so hot inside this handbasket?"
>     >     --
>     >     Steve Heistand         steveh...@gmail.com <mailto:steveh...@gmail.com> <mailto:steveh...@gmail.com <mailto:steveh...@gmail.com>>
>     >     --
>     >
>     >     --
>     >     You received this message because you are subscribed to the Google Groups "Intel SPMD Program Compiler Users" group.
>     >     To unsubscribe from this group and stop receiving emails from it, send an email to ispc-users+...@googlegroups.com <mailto:ispc-users%2Bunsu...@googlegroups.com>
>     >     For more options, visit https://groups.google.com/d/optout.
>     >
>     >
>     > --
>     > You received this message because you are subscribed to the Google Groups "Intel SPMD Program Compiler Users" group.
>     > To unsubscribe from this group and stop receiving emails from it, send an email to ispc-users+...@googlegroups.com <mailto:ispc-users%2Bunsu...@googlegroups.com>

>     > For more options, visit https://groups.google.com/d/optout.
>
>     --
>     "Why is it so hot inside this handbasket?"
>     --
>     Steve Heistand         steveh...@gmail.com <mailto:steveh...@gmail.com>
>     --
>
>     --
>     You received this message because you are subscribed to the Google Groups "Intel SPMD Program Compiler Users" group.
>     To unsubscribe from this group and stop receiving emails from it, send an email to ispc-users+...@googlegroups.com <mailto:ispc-users%2Bunsu...@googlegroups.com>.
>     For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups "Intel SPMD Program Compiler Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ispc-users+...@googlegroups.com <mailto:ispc-users+unsub...@googlegroups.com>.

> For more options, visit https://groups.google.com/d/optout.

--
--
"Why is it so hot inside this handbasket?"
--
Steve Heistand         steveh...@gmail.com


--

Dmitry Babokin

unread,
Sep 4, 2016, 1:53:23 PM9/4/16
to ispc-...@googlegroups.com
Not sure if this is gcc 5 ABI Tag issue, but it's definetly some kind of ABI incompatibility between gcc and clang. So if you see this issue - either use clang self build or use gcc for ispc build.

SKX patch is not need for 3.9, it was back ported from 3.9.


>     >     >     For more options, visit https://groups.google.com/d/optout.
>     >     >
>     >     >
>     >     > --
>     >     > You received this message because you are subscribed to the Google Groups "Intel SPMD Program Compiler Users" group.

>     >     > For more options, visit https://groups.google.com/d/optout.
>     >
>     >     --
>     >     "Why is it so hot inside this handbasket?"
>     >     --
>     >     Steve Heistand         steveh...@gmail.com <mailto:steveh...@gmail.com> <mailto:steveh...@gmail.com <mailto:steveh...@gmail.com>>
>     >     --
>     >
>     >     --
>     >     You received this message because you are subscribed to the Google Groups "Intel SPMD Program Compiler Users" group.
>     >     To unsubscribe from this group and stop receiving emails from it, send an email to ispc-users+...@googlegroups.com <mailto:ispc-users%2Bunsubscrib...@googlegroups.com>
>     >     <mailto:ispc-users%2Bunsubscri...@googlegroups.com <mailto:ispc-users%252Bunsubscri...@googlegroups.com>>.
>     >     For more options, visit https://groups.google.com/d/optout.
>     >
>     >
>     > --
>     > You received this message because you are subscribed to the Google Groups "Intel SPMD Program Compiler Users" group.
>     > To unsubscribe from this group and stop receiving emails from it, send an email to ispc-users+...@googlegroups.com <mailto:ispc-users%2Bunsubscrib...@googlegroups.com>
>     > <mailto:ispc-users+unsubscribe@googlegroups.com <mailto:ispc-users%2Bunsubscrib...@googlegroups.com>>.

>     > For more options, visit https://groups.google.com/d/optout.
>
>     --
>     "Why is it so hot inside this handbasket?"
>     --
>     Steve Heistand         steveh...@gmail.com <mailto:steveh...@gmail.com>
>     --
>
>     --
>     You received this message because you are subscribed to the Google Groups "Intel SPMD Program Compiler Users" group.
>     To unsubscribe from this group and stop receiving emails from it, send an email to ispc-users+...@googlegroups.com <mailto:ispc-users%2Bunsubscrib...@googlegroups.com>.

>     For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups "Intel SPMD Program Compiler Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ispc-users+...@googlegroups.com <mailto:ispc-users+unsubscribe@googlegroups.com>.

> For more options, visit https://groups.google.com/d/optout.

--
--
"Why is it so hot inside this handbasket?"
--
Steve Heistand         steveh...@gmail.com


--
You received this message because you are subscribed to the Google Groups "Intel SPMD Program Compiler Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ispc-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Intel SPMD Program Compiler Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ispc-users+unsubscribe@googlegroups.com.

Aristid Breitkreuz

unread,
Sep 4, 2016, 1:58:55 PM9/4/16
to ispc-...@googlegroups.com
I found that gcc-built clang 3.9 does not have the ABI issue anymore, so I'm just using that now.

>     >     >     To unsubscribe from this group and stop receiving emails from it, send an email to ispc-users+...@googlegroups.com <mailto:ispc-users%2Bunsu...@googlegroups.com> <mailto:ispc-users%2Bunsu...@googlegroups.com <mailto:ispc-users%252Buns...@googlegroups.com>>

>     >     >     For more options, visit https://groups.google.com/d/optout.
>     >     >
>     >     >
>     >     > --
>     >     > You received this message because you are subscribed to the Google Groups "Intel SPMD Program Compiler Users" group.
>     >     > To unsubscribe from this group and stop receiving emails from it, send an email to ispc-users+...@googlegroups.com <mailto:ispc-users%2Bunsu...@googlegroups.com> <mailto:ispc-users%2Bunsu...@googlegroups.com <mailto:ispc-users%252Buns...@googlegroups.com>>

>     >     > For more options, visit https://groups.google.com/d/optout.
>     >
>     >     --
>     >     "Why is it so hot inside this handbasket?"
>     >     --
>     >     Steve Heistand         steveh...@gmail.com <mailto:steveh...@gmail.com> <mailto:steveh...@gmail.com <mailto:steveh...@gmail.com>>
>     >     --
>     >
>     >     --
>     >     You received this message because you are subscribed to the Google Groups "Intel SPMD Program Compiler Users" group.
>     >     To unsubscribe from this group and stop receiving emails from it, send an email to ispc-users+...@googlegroups.com <mailto:ispc-users%2Bunsu...@googlegroups.com>
>     >     For more options, visit https://groups.google.com/d/optout.
>     >
>     >
>     > --
>     > You received this message because you are subscribed to the Google Groups "Intel SPMD Program Compiler Users" group.
>     > To unsubscribe from this group and stop receiving emails from it, send an email to ispc-users+...@googlegroups.com <mailto:ispc-users%2Bunsu...@googlegroups.com>

>     > For more options, visit https://groups.google.com/d/optout.
>
>     --
>     "Why is it so hot inside this handbasket?"
>     --
>     Steve Heistand         steveh...@gmail.com <mailto:steveh...@gmail.com>
>     --
>
>     --
>     You received this message because you are subscribed to the Google Groups "Intel SPMD Program Compiler Users" group.
>     To unsubscribe from this group and stop receiving emails from it, send an email to ispc-users+...@googlegroups.com <mailto:ispc-users%2Bunsu...@googlegroups.com>.

>     For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups "Intel SPMD Program Compiler Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ispc-users+...@googlegroups.com <mailto:ispc-users+...@googlegroups.com>.

> For more options, visit https://groups.google.com/d/optout.

--
--
"Why is it so hot inside this handbasket?"
--
Steve Heistand         steveh...@gmail.com


--
You received this message because you are subscribed to the Google Groups "Intel SPMD Program Compiler Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ispc-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Intel SPMD Program Compiler Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ispc-users+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Intel SPMD Program Compiler Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ispc-users/luWwKgGE1M0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ispc-users+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages