Re: [Faudiostream-users] faudiostream build stuck on llvm libs

2014-02-18 Thread Albert Graef
On Mon, Feb 17, 2014 at 5:40 PM, James Hearon j_hea...@hotmail.com wrote:
  llvm-config --ldflags-L/usr/lib64/llvm  -lz -lpthread -lffi -ldl -lm

Ok, so the libs are supposed to be under /usr/lib64. Just wanted to make sure.

 I have both 32 and 64-bit packages for llvm and devel files installed.
 /usr/lib64/llvm contains:  BugpointPasses.so libclang.so, libLLVM-3.3.so,
 libLTO.so, libprofile_rt.so, and LLVMgold.so.

No *.a files there? After an installation of LLVM 3.3 from source I
get a bunch of static libraries along with libLLVM-3.3.so, and I guess
that these are what llvm-config --libs lists. If you have the -devel
packages installed then you should have these as well, if LLVM is
properly packaged on Fedora, and then the linker would be able to find
those libraries, too. It certainly does on my Arch system. Maybe the
static libraries are in a separate package?

Anyway, since you have libLLVM-3.3.so, that's all you need to link
against. You just need to fix up the linker command in the Makefile
accordingly. Here's how the corresponding target in
compiler/Makefile.unix (line 83) should look like in your case:

faust : $(objects) main.o libmain.o global.o scheduler.ll
$(CXX) $(CXXFLAGS) $(objects) main.o libmain.o global.o
`$(LLVM_CONFIG) --ldflags` -lLLVM-3.3 -ldl -o faust

Or try the patch against Makefile.unix attached to this post. This
should work whenever the shared LLVM lib is installed. Just tried this
over here (using LLVM 3.4, however) and it seems to work fine.

Stephane, I'd suggest to have the Makefile check for a shared LLVM lib
before relying on `llvm-config --libs`. The attached patch against
Makefile.unix does the trick for me. Ok to commit? (You should first
give this a whirl on OS X, though, to see if it works there as well.)

HTH,
Albert

-- 
Dr. Albert Graf
Dept. of Music-Informatics, University of Mainz, Germany
Email:  aggr...@gmail.com
WWW:https://plus.google.com/+AlbertGraef
diff --git a/compiler/Makefile.unix b/compiler/Makefile.unix
index 11211f8..46466f4 100755
--- a/compiler/Makefile.unix
+++ b/compiler/Makefile.unix
@@ -63,6 +63,13 @@ CXXFLAGS += -fvisibility=hidden -Wno-overloaded-virtual -Wno-parentheses $(addpr
 CXXFLAGS += -I`$(LLVM_CONFIG) --includedir` -I../architecture -D$(LLVM_VERSION) -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS
 CXXFLAGS += $(ARCHFLAGS)
 
+LLVMSHLIB = $(wildcard $(shell $(LLVM_CONFIG) --libdir)/libLLVM-$(shell $(LLVM_CONFIG) --version).$(LIB_EXT))
+
+ifeq ($(LLVMSHLIB),)
+LLVMLIBS = $(shell $(LLVM_CONFIG) --libs)
+else
+LLVMLIBS = -l$(patsubst lib%,%,$(notdir $(basename $(LLVMSHLIB
+endif
 
 ifeq ($(system), Darwin)
 all : faust libfaust.a
@@ -81,7 +88,7 @@ main.o : main.cpp
 	$(CXX) $(CXXFLAGS) main.cpp -c -o main.o
 
 faust : $(objects) main.o libmain.o global.o scheduler.ll
-	$(CXX) $(CXXFLAGS) $(objects) main.o libmain.o global.o `$(LLVM_CONFIG) --ldflags --libs all` -ldl -o faust
+	$(CXX) $(CXXFLAGS) $(objects) main.o libmain.o global.o `$(LLVM_CONFIG) --ldflags` $(LLVMLIBS) -ldl -o faust
 
 scheduler.ll : ../architecture/scheduler.cpp
 	$(LLVM_CLANG) -O3 -D$(LLVM_VERSION) -emit-llvm -S ../architecture/scheduler.cpp -o scheduler.ll
--
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471iu=/4140/ostg.clktrk___
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users


Re: [Faudiostream-users] faudiostream build stuck on llvm libs

2014-02-17 Thread Albert Graef
On Mon, Feb 17, 2014 at 2:54 AM, James Hearon j_hea...@hotmail.com wrote:
 /usr/bin/llvm-config --ldflags --libs all` -ldl -o faust

What's the output of: /usr/bin/llvm-config --ldflags?

-- 
Dr. Albert Graf
Dept. of Music-Informatics, University of Mainz, Germany
Email:  aggr...@gmail.com
WWW:https://plus.google.com/+AlbertGraef

--
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151iu=/4140/ostg.clktrk
___
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users