Michel Dänzer wrote:
> On Mon, 2009-03-09 at 16:12 +0530, Kamalneet Singh wrote:
>> I got link errors while building gallium-mesa-7.4 branch with "make
>> linux-llvm". The attached patch fixes it.
>>
>> But I wonder which is the right branch for running mesa with llvm,
>> preferably with softpipe. Can someone please tell that.. :)
>
> It might work, but the master branch is probably best for this.
>
> The existing set of LLVM components worked for me when I checked it in.
> Out of curiosity, what kind of failure are you getting without your
> change? Also, which version of LLVM are you using?
>
Thanks.. :)
The master doesn't build with "make linux-llvm" either. It gives lots of
"template with C linkage" errors, because of an unclosed "extern C" in
p_refcnt.h. Attaching a patch.
The link errors are with LLVM 2.4. Just tested with 2.5, it builds fine.
Which version do you recommend for mesa? I guess 2.5 or svn?
Errors with LLVM 2.4:
../../lib/libGL.so: undefined reference to
`llvm::createFunctionProfilerPass()'
../../lib/libGL.so: undefined reference to `llvm::createRSProfilingPass()'
../../lib/libGL.so: undefined reference to `llvm::createEdgeProfilerPass()'
../../lib/libGL.so: undefined reference to
`llvm::createNullProfilerRSPass()'
../../lib/libGL.so: undefined reference to `llvm::createBlockProfilerPass()'
../../lib/libGL.so: undefined reference to `llvm::LinkInInterpreter()'
collect2: ld returned 1 exit status
make[3]: *** [singlebuffer] Error 1
make[3]: Leaving directory `/lap/kammal/xorg/mesa/progs/demos'
These are solved by explicitly asking llvm-config for "interpreter
instrumentation" libraries.
~kammal
From b9cf047b548fb2751d9fef52e4f572f497d02d1f Mon Sep 17 00:00:00 2001
From: Kamalneet Singh <kamalnee...@samsung.com>
Date: Mon, 9 Mar 2009 18:59:22 +0530
Subject: [PATCH] Add a missing "}" corresponding to extern "C"
---
src/gallium/include/pipe/p_refcnt.h | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/gallium/include/pipe/p_refcnt.h b/src/gallium/include/pipe/p_refcnt.h
index 50b7aa9..27b4e8f 100644
--- a/src/gallium/include/pipe/p_refcnt.h
+++ b/src/gallium/include/pipe/p_refcnt.h
@@ -80,5 +80,8 @@ pipe_reference(struct pipe_reference **ptr, struct pipe_reference *reference)
return destroy;
}
+#ifdef __cplusplus
+}
+#endif
#endif /* P_REFCNT_H */
--
1.5.6.3
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev