It's now failing with -lLLVM_3.3svn. I was looking for where the llvm
version stuff was read in the Makefiles. I decided against that and I
tried rebuilding llvm again, modifying the cmake package version in
the llvm sources to be set to 3.3 instead of 3.3svn.
That got the compile to work with the Makefiles unmodified (with the
exception of changing LLVM_CLANG to use CXX). However, I still get an
error with -lLLVM_3.3 not found. I realized that's due to llvm
building static libs. I modified compiler/Makefile.unix to use
`$(LLVM_CONFIG) --libs` instead of -lLLVM-`$(LLVM_CONFIG) --version`
that it would just statically compile in llvm into libfaust.dylib.
Note: it seems compiling with system clang instead of LLVM_CLANG
compiled alright.
Other notes: LLVM doesn't build shared libs when building from source
by default. LLVM's documentation for Cmake mentions:
Flag indicating is shared libraries will be built. Its default value is
OFF. Shared libraries are not supported on Windows and not recommended in the
other OSes.
git diff of compiler/Makefile.unix below.
Steven-Yis-MacBook-Pro:faust stevenyi$ git diff
diff --git a/compiler/Makefile.unix b/compiler/Makefile.unix
index 4179749..09c5a9b 100755
--- a/compiler/Makefile.unix
+++ b/compiler/Makefile.unix
@@ -28,7 +28,8 @@ endif
LLVM_VERSION = $(shell $(LLVM_CONFIG) --version)
-LLVM_CLANG = $(shell $(LLVM_CONFIG) --prefix)/bin/clang++
+#LLVM_CLANG = $(shell $(LLVM_CONFIG) --prefix)/bin/clang++
+LLVM_CLANG = $(CXX)
ifeq ($(LLVM_VERSION), 3.0)
LLVM_VERSION = LLVM_30
@@ -76,7 +77,7 @@ libfaust.a : $(objects) libmain.o global.o
libtool $(LIBFLAGS) $(objects) libmain.o global.o -static -o libfaust.a
libfaust.$(LIB_EXT) : $(objects) libmain.o global.o
- libtool -dynamic $(LIBFLAGS) $(objects) libmain.o global.o
-lstdc++ `$(LLVM_CONFIG) --ldflags` -lLLVM-`$(LLVM_CONFIG)
+ libtool -dynamic $(LIBFLAGS) $(objects) libmain.o global.o
-lstdc++ `$(LLVM_CONFIG) --ldflags` `$(LLVM_CONFIG) --libs`
.PHONY: clean depend ctags parser
On Thu, Oct 17, 2013 at 2:35 PM, Steven Yi <[email protected]> wrote:
> From the first email:
>
> " I tried compiling with the Makefile, making
> modifications to allow "3.3svn" as a version to set LLVM_33, and
> modifying LLVM_CLANG to use the value of CXX, but that gets me a lot
> of errors for linking with i386."
>
> I also don't know if just using the system's clang++ or is it
> mandatory to use one compiled with LLVM_33. (I'd assume llvm3.3 could
> load byte code from earlier releases but I'm not sure.)
>
> I think the i386 stuff is an error on my part; I had recompiled LLVM a
> couple times yesterday to try to get this all working and the last one
> I did wasn't done as a universal build. Waiting for that to rebuild
> now.
>
>
> On Thu, Oct 17, 2013 at 1:36 PM, Stéphane Letz <[email protected]> wrote:
>> What is the problem with the regular Makefile?
>>
>> Stéphane
>>
>> Le 17 oct. 2013 à 18:21, Steven Yi <[email protected]> a écrit :
>>
>>> Thanks. Unfortunately, I spent too much time already trying to get
>>> libfaust to work for compiling/installing with both the Makefile and
>>> with CMake, so I'm giving up for now as neither work for me. As a
>>> result, the faust opcode for Csound will not be included in the 10.8
>>> release I'm putting together now, though I think they will be included
>>> in the 10.6 release.
>>>
>>> steven
>>>
>>> On Thu, Oct 17, 2013 at 11:52 AM, Stéphane Letz <[email protected]> wrote:
>>>> The regular Makefile is the most uptodate
>>>>
>>>> Please feel free to correct the CMake file
>>>>
>>>> Stéphane
>>>>
>>>> Le 17 oct. 2013 à 17:47, Steven Yi <[email protected]> a écrit :
>>>>
>>>>> Hi All,
>>>>>
>>>>> I had a question about clang versions. I see that the Makefile.unix
>>>>> in the compiler folder assumes that clang is compiled for use with the
>>>>> version of LLVM that is installed. The CMake version doesn't seem to
>>>>> make the same assumption. I tried compiling with the Makefile, making
>>>>> modifications to allow "3.3svn" as a version to set LLVM_33, and
>>>>> modifying LLVM_CLANG to use the value of CXX, but that gets me a lot
>>>>> of errors for linking with i386.
>>>>>
>>>>> The other issue I found is that running "make install" with the CMake
>>>>> file does not install the same headers/files that the the Makefile
>>>>> version does. This doesn't affect using faust, but it does give me
>>>>> errors for compiling against libfaust (missing headers, etc.).
>>>>>
>>>>> I'm sort of stuck at this point where I can build and install with
>>>>> CMake but the installation isn't correct, and I can't compile with the
>>>>> Makefile. Are there plans to keep the CMake file up to date?
>>>>>
>>>>> Thanks,
>>>>> steven
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> October Webinars: Code for Performance
>>>>> Free Intel webinars can help you accelerate application performance.
>>>>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
>>>>> from
>>>>> the latest Intel processors and coprocessors. See abstracts and register >
>>>>> http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
>>>>> _______________________________________________
>>>>> Faudiostream-devel mailing list
>>>>> [email protected]
>>>>> https://lists.sourceforge.net/lists/listinfo/faudiostream-devel
>>>>
>>>
>>> ------------------------------------------------------------------------------
>>> October Webinars: Code for Performance
>>> Free Intel webinars can help you accelerate application performance.
>>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
>>> from
>>> the latest Intel processors and coprocessors. See abstracts and register >
>>> http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> Faudiostream-devel mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/faudiostream-devel
>>
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
Faudiostream-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/faudiostream-devel