You won't the possible compatibility problem until the scheduler.ll IR file is 
dynamically used (so in Work Stealing Scheduler mode)

Stéphane


Le 18 oct. 2013 à 00:31, Steven Yi <[email protected]> a écrit :

> I think things are working alright here as the system clang is:
> 
> cmu-878166:installer stevenyi$ clang++ --version
> Apple LLVM version 5.0 (clang-500.2.75) (based on LLVM 3.3svn)
> Target: x86_64-apple-darwin12.5.0
> Thread model: posix
> 
> I'll chalk it up to luck then that it happens to be compatible.
> 
> I'm in the middle of putting together a software release at the moment
> and don't want to build/install clang on this system, as it could
> interfere with the builds.
> 
> I just tried a change to allow overriding of LLVM_CLANG (git diff
> below). This just does an ifndef.  This allowed me to set LLVM_CLANG
> from the commandline with an export.  I imagine in the future, if I
> need to build this again, I'll build clang in a separate directory and
> not install it so it won't interfere with the system clang, and at
> least I can specify which clang to use with faust.
> 
> 
> 
> 
> 
> diff --git a/compiler/Makefile.unix b/compiler/Makefile.unix
> index 4179749..2f6615c 100755
> --- a/compiler/Makefile.unix
> +++ b/compiler/Makefile.unix
> @@ -12,7 +12,7 @@ system        ?= $(shell uname -s)
> ## On Darwin build both 32 and 64-bits intel versions
> ifeq ($(system), Darwin)
> ARCHFLAGS      :=  -arch i386 -arch x86_64
> -LIBFLAGS       :=
> +LIBFLAGS       :=
> CXX            = clang++
> CXXFLAGS       = -Wexit-time-destructors -Wglobal-constructors
> LIB_EXT        = dylib
> @@ -28,7 +28,9 @@ endif
> 
> LLVM_VERSION = $(shell $(LLVM_CONFIG) --version)
> 
> +ifndef LLVM_CLANG
> LLVM_CLANG = $(shell $(LLVM_CONFIG) --prefix)/bin/clang++
> +endif
> 
> ifeq ($(LLVM_VERSION), 3.0)
> LLVM_VERSION = LLVM_30
> @@ -76,7 +78,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-`$(LL
> +       libtool -dynamic $(LIBFLAGS) $(objects) libmain.o global.o
> -lstdc++ `$(LLVM_CONFIG) --ldflags` `$(LLVM_CONF
> 
> 
> On Thu, Oct 17, 2013 at 5:52 PM, Stéphane Letz <[email protected]> wrote:
>> It is mandatory  to define LLVM_CLANG = $(shell $(LLVM_CONFIG) 
>> --prefix)/bin/clang++
>> 
>> The reason is that LLVM_CLANG  is used to compile scheduler.cpp in 
>> scheduler.ll (LLVM IR) which has to be the *same version* as the one define 
>> with LLVM_VERSION
>> 
>> I've look at the static LLVM link issues.
>> 
>> Stéphane
>> 
>> 
>> 
>> Le 17 oct. 2013 à 21:36, Steven Yi <[email protected]> a écrit :
>> 
>>> Just to note, I did get the csound faust opcode compiled and tested to
>>> run alright, so it will be in the 10.8 release to come out shortly.
>>> 
>>> On Thu, Oct 17, 2013 at 3:12 PM, Steven Yi <[email protected]> wrote:
>>>> 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
>> 


------------------------------------------------------------------------------
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

Reply via email to