Building Mozart in MacOS

211 views
Skip to first unread message

Manuel Bravo

unread,
Oct 11, 2013, 11:59:38 AM10/11/13
to mozart-...@googlegroups.com
Hello everyone,

First of all I want to introduce myself. My name is Manuel Bravo, I am a PhD candidate at UCL. I have just started. For my thesis, I am going to use Mozart; therefore, we thought that a good way of understanding how Mozart works is trying to contribute.

Unfortunately I got stuck pretty soon. I am simply trying to build Mozart 2 in MacOs 10.8.5. I have followed the instructions proposed in https://github.com/mozart/mozart2/blob/master/README.MacOS.md but I got stuck when building Mozart:

$ git clone --recursive https://github.com/mozart/mozart2.git
    $ mkdir build && cd build
    $ cmake -DCMAKE_BUILD_TYPE=Release \
            -DCMAKE_CXX_COMPILER=/usr/local/bin/g++-4.7 \
            -DLLVM_SRC_DIR=LLVM_SOURCES -DLLVM_BUILD_DIR=LLVM_BUILD \
            ../mozart2/
    $ make
    $ make install

I do clone and I am also able to execute cmake without any problem. However, when running the make command, I quickly get the following error:

Scanning dependencies of target generator
[  0%] Building CXX object vm/generator/main/CMakeFiles/generator.dir/generator.cc.o
In file included from /Users/manuelbravo/mozart2/vm/generator/main/generator.cc:25:
In file included from /Users/manuelbravo/mozart2/vm/generator/main/generator.hh:30:
In file included from /Users/manuelbravo/Dependences/llvm/tools/clang/include/clang/Frontend/ASTUnit.h:17:
In file included from /Users/manuelbravo/Dependences/llvm/tools/clang/include/clang/Serialization/ASTBitCodes.h:20:
In file included from /Users/manuelbravo/Dependences/llvm/tools/clang/include/clang/AST/Type.h:17:
In file included from /Users/manuelbravo/Dependences/llvm/tools/clang/include/clang/Basic/Diagnostic.h:21:
In file included from /Users/manuelbravo/Dependences/llvm/include/llvm/ADT/ArrayRef.h:13:
In file included from /Users/manuelbravo/Dependences/llvm/include/llvm/ADT/SmallVector.h:17:
/Users/manuelbravo/Dependences/llvm/include/llvm/Support/AlignOf.h:90:1: error: 'alignas' attribute cannot be applied to types
LLVM_ALIGNEDCHARARRAY_TEMPLATE_ALIGNMENT(1);
^
/Users/manuelbravo/Dependences/llvm/include/llvm/Support/AlignOf.h:79:10: note: expanded from macro 'LLVM_ALIGNEDCHARARRAY_TEMPLATE_ALIGNMENT'
    char alignas(x) aligned; \
         ^
/Users/manuelbravo/Dependences/llvm/include/llvm/Support/AlignOf.h:91:1: error: 'alignas' attribute cannot be applied to types
LLVM_ALIGNEDCHARARRAY_TEMPLATE_ALIGNMENT(2);
^
/Users/manuelbravo/Dependences/llvm/include/llvm/Support/AlignOf.h:79:10: note: expanded from macro 'LLVM_ALIGNEDCHARARRAY_TEMPLATE_ALIGNMENT'
    char alignas(x) aligned; \
         ^
/Users/manuelbravo/Dependences/llvm/include/llvm/Support/AlignOf.h:92:1: error: 'alignas' attribute cannot be applied to types
LLVM_ALIGNEDCHARARRAY_TEMPLATE_ALIGNMENT(4);
^
/Users/manuelbravo/Dependences/llvm/include/llvm/Support/AlignOf.h:79:10: note: expanded from macro 'LLVM_ALIGNEDCHARARRAY_TEMPLATE_ALIGNMENT'
    char alignas(x) aligned; \
         ^
/Users/manuelbravo/Dependences/llvm/include/llvm/Support/AlignOf.h:93:1: error: 'alignas' attribute cannot be applied to types
LLVM_ALIGNEDCHARARRAY_TEMPLATE_ALIGNMENT(8);
^
.... and so on....


Any idea how to solve the problem or at least what is causing the problem?

Thank you,
Manuel

Manuel Bravo

unread,
Oct 11, 2013, 12:30:44 PM10/11/13
to mozart-...@googlegroups.com
I kind of manage to solve that problem. Not sure whether what I am doing make any sense or not, but at least the problem did not arise again. I used the following link:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=714215. I just swapped alignas(x) and char in line 79 of llvm/include/llvm/Support/AlignOf.h.

However, I am now getting this other error:

[ 10%] Built target mozartvm
Scanning dependencies of target vmtest
[ 11%] Building CXX object vm/vm/test/CMakeFiles/vmtest.dir/testutils.cc.o
In file included from /Users/manuelbravo/mozart2/vm/vm/test/testutils.cc:1:
In file included from /Users/manuelbravo/mozart2/vm/vm/test/testutils.hh:5:
In file included from /Users/manuelbravo/build-mozart/externals/Source/gtest/include/gtest/gtest.h:58:
/Users/manuelbravo/build-mozart/externals/Source/gtest/include/gtest/internal/gtest-internal.h:384:51: error: use of undeclared identifier 'FLT_MAX'
inline float FloatingPoint<float>::Max() { return FLT_MAX; }
                                                  ^
/Users/manuelbravo/build-mozart/externals/Source/gtest/include/gtest/internal/gtest-internal.h:386:53: error: use of undeclared identifier 'DBL_MAX'
inline double FloatingPoint<double>::Max() { return DBL_MAX; }
                                                    ^

Any idea?

Cheers,
Manuel

Stewart Mackenzie

unread,
Oct 11, 2013, 3:21:04 PM10/11/13
to mozart-...@googlegroups.com
Hello there!

Can you please make sure your llvm and clasg versions are up to date.

I suggest you also follow the Linux guide to get the llvm + clang + gtest sources.

Regarding contributing, what did you want to start with? Any itches you need to scratch? We'll help as best as we can!

Kind regards
Stewart
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Sébastien Doeraene

unread,
Oct 11, 2013, 4:00:16 PM10/11/13
to Stewart Mackenzie, mozart-...@googlegroups.com
Hi,

I see you're trying to build with gcc:
-DCMAKE_CXX_COMPILER=/usr/local/bin/g++-4.7
Don't. Use the clang compiler on Mac OS (ideally >= 3.2; 3.1 should work too).
Well of course if anyone actually using Mac OS contradicts me, follow their advice above mine ;-)

Cheers,
Sébastien


--
You received this message because you are subscribed to the Google Groups "Mozart Hackers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mozart-hacker...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Manuel Bravo

unread,
Oct 14, 2013, 8:25:03 AM10/14/13
to mozart-...@googlegroups.com, Stewart Mackenzie
Hi again!

@Sebatien

I am sorry, but I wrongly copied my building code. I was actually doing what you suggest:


    $ mkdir build && cd build
    $ cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
            -DLLVM_SRC_DIR=LLVM_SOURCES -DLLVM_BUILD_DIR=LLVM_BUILD \
            -DCMAKE_BUILD_TYPE=Release ../mozart2/
    $ make
    $ make install
@Stewart

I have re-download llvm, clang and guest following the instructions of the Linux building section. Still getting the same errors. I believe I am using the updated versions. Anyway not completely sure how to check where those are the used versions when building firstly, llvm and, secondly, mozart2.

If I run $clang --version, I get the following:

Apple LLVM version 5.0 (clang-500.2.75) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin12.5.0
Thread model: posix

It looks ok for me :S (correct me if I am wrong). What can I do for testing that the proper versions are being used when building?

Thank you in advance and sorry for bothering you with these "basic" matters...

Best,
Manuel

Stewart Mackenzie

unread,
Oct 14, 2013, 8:33:13 AM10/14/13
to mozart-...@googlegroups.com
Hello there!

Please echo the variables LLVM_SOURCES and LLVM_BUILD
I think you can point it to your newly downloaded versions.

Also if you get an issue regarding not being able to find the libs then do '-DMOZART_BOOST_USE_STATIC_LIBS=OFF'. See how that goes.

Stewart

Manuel Bravo

unread,
Oct 14, 2013, 8:40:08 AM10/14/13
to mozart-...@googlegroups.com
I am already pointing the variables to my newly downloaded versions. I have the following directory structure:

$projects
  $mozart2 (source code of mozart2)
  $externals (source code of the newly downloaded versions)
    $llvm
    $gtest
  $builds
    $gtest-debug
    $llvm-build
    $mozart-build

I am executing the "cmake" command form mozart-build.

cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_SRC_DIR=../../externals/llvm/ -DLLVM_BUILD_DIR=../llvm-build/ -DCMAKE_BUILD_TYPE=Release ../../mozart2/

Best,
Manuel

stewart mackenzie

unread,
Oct 14, 2013, 9:37:58 AM10/14/13
to mozart-...@googlegroups.com
Hmm try drop the -DCMAKE_C*_COMPILER flags.

I don't use them on Linux.... maybe you don't need them on osx.

Now the below is what I use. Its pretty customized for the nixos linux distribution, I also include a new CLANG flag. Notice there aren't any CMAKE_C*_COMPILER flags. I suspect the system is using the local clang++ to do the compilation when it should be using the new one, ie the one you just build from externals.

cmake -DCMAKE_BUILD_TYPE=Release -DGTEST_SRC_DIR=../../externals/gtest -DGTEST_BUILD_DIR=../gtest-debug -DLLVM_SRC_DIR=~/.nix-profile/include/llvm -DLLVM_BUILD_DIR=~/.nix-profile/ -DCLANG_BUILD_DIR=~/.nix-profile/include -DCLANG_SRC_DIR=~/.nix-profile/ -DMOZART_BOOST_USE_STATIC_LIBS=OFF -DBOOST_INCLUDEDIR=~/.nix-profile/include -DBOOST_LIBRARYDIR=~/.nix-profile/lib -DMOZART_GENERATOR_FLAGS="-I/home/stewart/.nix-profile/include/c++/4.7.3;-I/home/stewart/.nix-profile/include/c++/4.7.3/x86_64-unknown-linux-gnu;-I/home/stewart/.nix-profile/include" ../../mozart2-test

Manuel Bravo

unread,
Oct 23, 2013, 4:14:40 AM10/23/13
to mozart-...@googlegroups.com
Hi again,

I do not know what else to try. I have tried to follow both readme instructions (unix and macOS). I have dropped -DCMAKE_C*_COMPILER flags. I have tried to use Stewart's customized cmake. I have installed LLVM and CLANG following the instructions from the their website.

Has anyone been able to build Mozart2 in MacOs >10.8?

Thank you,
Manuel

stewart mackenzie

unread,
Oct 23, 2013, 6:24:45 AM10/23/13
to mozart-...@googlegroups.com
Hi there,

I just spoke with Kenny, he has a MacOS > 10.8 and he mentioned that
he precompiled his LLVM and CLANG then did a standard cmake.

Please try this:

$ cmake -DCMAKE_BUILD_TYPE=Release
-DGTEST_SRC_DIR=../../externals/gtest -DGTEST_BUILD_DIR=../gtest-debug
-DLLVM_SRC_DIR=../../externals/llvm -DLLVM_BUILD_DIR=../llvm-release
../../mozart2

If it fails please give the exact output make sure you don't
abbreviate any paths in the cmake command when you respond.

Stewart

Manuel Bravo

unread,
Oct 23, 2013, 6:42:21 AM10/23/13
to mozart-...@googlegroups.com
I think I am messing with LLVM and CLANG versions. Can you ask him which versions of those he is using?

Thank you,
Manuel

Manuel Bravo

unread,
Oct 23, 2013, 7:28:17 AM10/23/13
to mozart-...@googlegroups.com
The error I get:

Linking CXX executable generator
Undefined symbols for architecture x86_64:
  "llvm::raw_ostream::write(char const*, unsigned long)", referenced from:
      openFileOutputStream(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in generator.cc.o
      InterfaceDef::makeOutput(clang::ClassTemplateSpecializationDecl const*, llvm::raw_fd_ostream&) in interfaces.cc.o
      withFileOutputStream(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::function<void (llvm::raw_fd_ostream&)>) in interfaces.cc.o
      ImplementationDef::makeOutputDeclBefore(llvm::raw_fd_ostream&) in implementations.cc.o
      ImplementationDef::makeOutputDeclAfter(llvm::raw_fd_ostream&) in implementations.cc.o
      ImplementationDef::makeOutput(llvm::raw_fd_ostream&) in implementations.cc.o
      ImplementationDef::makeContentsOfAutoGCollect(llvm::raw_fd_ostream&, bool) in implementations.cc.o
      ...
  "llvm::raw_ostream::write(unsigned char)", referenced from:
      printTemplateParameters(llvm::raw_fd_ostream&, clang::TemplateParameterList const*, clang::TemplateArgumentList const*) in utils.cc.o
      printActualTemplateParameters(llvm::raw_fd_ostream&, clang::TemplateParameterList const*, clang::TemplateArgumentList const*) in utils.cc.o

..... (keeps going)

stewart mackenzie

unread,
Oct 23, 2013, 8:44:28 AM10/23/13
to mozart-...@googlegroups.com
Hi Manuel,

Please keep it on list, this will help others solve the problem.

So I sent an email saying that Apple's 4.2 is the SVN's 3.2 version.

So please download Apple's 4.2 version and not the 3.2 version and try again.

Kind regards
Stewart

On Wed, Oct 23, 2013 at 2:40 PM, Manuel Bravo
<manuelbra...@gmail.com> wrote:
> Thank you very much for your help. However, I have not been able to build it
> yet :S
>
> Can you send me Kenny's email? Maybe talking directly to him I can solve.
>
> Anyway this has been my last try:
>
> - I have downloaded the prebuilt clang 3.2
> - I have also downloaded the source code of both clang 3.2 and llvm 3.2.
> - I have put the source code of clang 3.2 in ~/llvm3.2/tools/clang
> - I have dowloaded Mozart2 source code
> - I have executed the following cake command:
>
> cmake -DCMAKE_BUILD_TYPE=Release -DGTEST_SRC_DIR=../../externals/gtest
> -DGTEST_BUILD_DIR=../gtest-debug -DLLVM_SRC_DIR=../../externals/llvm-3.2.src
> -DLLVM_BUILD_DIR=../clang+llvm-3.2-x86_64-apple-darwin11/ ../../mozart2
>
> - I execute make and I get the following error:
>
> Scanning dependencies of target generator
> [ 1%] Building CXX object
> vm/generator/main/CMakeFiles/generator.dir/generator.cc.o
> In file included from
> /Users/manuelbravo/mozart2/vm/generator/main/generator.cc:25:
> In file included from
> /Users/manuelbravo/mozart2/vm/generator/main/generator.hh:30:
> In file included from
> /Users/manuelbravo/builds/clang+llvm-3.2-x86_64-apple-darwin11/include/clang/Frontend/ASTUnit.h:17:
> In file included from
> /Users/manuelbravo/builds/clang+llvm-3.2-x86_64-apple-darwin11/include/clang/Serialization/ASTBitCodes.h:20:
> In file included from
> /Users/manuelbravo/builds/clang+llvm-3.2-x86_64-apple-darwin11/include/clang/AST/Type.h:17:
> In file included from
> /Users/manuelbravo/builds/clang+llvm-3.2-x86_64-apple-darwin11/include/clang/Basic/Diagnostic.h:21:
> In file included from
> /Users/manuelbravo/externals/llvm-3.2.src/include/llvm/ADT/ArrayRef.h:13:
> In file included from
> /Users/manuelbravo/externals/llvm-3.2.src/include/llvm/ADT/SmallVector.h:17:
> /Users/manuelbravo/externals/llvm-3.2.src/include/llvm/Support/AlignOf.h:90:1:
> error: 'alignas' attribute cannot be applied to types
> LLVM_ALIGNEDCHARARRAY_TEMPLATE_ALIGNMENT(1);
> ^
> /Users/manuelbravo/externals/llvm-3.2.src/include/llvm/Support/AlignOf.h:79:10:
> note: expanded from macro 'LLVM_ALIGNEDCHARARRAY_TEMPLATE_ALIGNMENT'
> char alignas(x) aligned; \
> ^
> /Users/manuelbravo/externals/llvm-3.2.src/include/llvm/Support/AlignOf.h:91:1:
> error: 'alignas' attribute cannot be applied to types
> LLVM_ALIGNEDCHARARRAY_TEMPLATE_ALIGNMENT(2);
> ^
> /Users/manuelbravo/externals/llvm-3.2.src/include/llvm/Support/AlignOf.h:79:10:
> note: expanded from macro 'LLVM_ALIGNEDCHARARRAY_TEMPLATE_ALIGNMENT'
> char alignas(x) aligned; \
> ^
> /Users/manuelbravo/externals/llvm-3.2.src/include/llvm/Support/AlignOf.h:92:1:
> error: 'alignas' attribute cannot be applied to types
> LLVM_ALIGNEDCHARARRAY_TEMPLATE_ALIGNMENT(4);
> ^
> /Users/manuelbravo/externals/llvm-3.2.src/include/llvm/Support/AlignOf.h:79:10:
> note: expanded from macro 'LLVM_ALIGNEDCHARARRAY_TEMPLATE_ALIGNMENT'
> char alignas(x) aligned; \
> ^
> /Users/manuelbravo/externals/llvm-3.2.src/include/llvm/Support/AlignOf.h:93:1:
> error: 'alignas' attribute cannot be applied to types
> LLVM_ALIGNEDCHARARRAY_TEMPLATE_ALIGNMENT(8);
> ^
> /Users/manuelbravo/externals/llvm-3.2.src/include/llvm/Support/AlignOf.h:79:10:
> note: expanded from macro 'LLVM_ALIGNEDCHARARRAY_TEMPLATE_ALIGNMENT'
> char alignas(x) aligned; \
> ^
> /Users/manuelbravo/externals/llvm-3.2.src/include/llvm/Support/AlignOf.h:94:1:
> error: 'alignas' attribute cannot be applied to types
> LLVM_ALIGNEDCHARARRAY_TEMPLATE_ALIGNMENT(16);
> ^
> /Users/manuelbravo/externals/llvm-3.2.src/include/llvm/Support/AlignOf.h:79:10:
> note: expanded from macro 'LLVM_ALIGNEDCHARARRAY_TEMPLATE_ALIGNMENT'
> char alignas(x) aligned; \
> ^
>
> I was getting exactly the same error when building llvm and clang by myself.
> When using the latest version of both clang and llvm, I got the error posted
> in my last post in the email group.
>
> Do not really know what to try now :S
>
> Thank you again,
> Manuel
>
> On Oct 23, 2013, at 1:43 PM, Stewart Mackenzie <seto...@gmail.com> wrote:
>
> Apple's 4.2 == svn's 3.2 version.

Manuel Bravo

unread,
Oct 23, 2013, 9:45:06 AM10/23/13
to mozart-...@googlegroups.com
Ok, I will keep using the email group. I thought I was flooding the group with useless questions :S

As you said, Apple's 4.2 is the SVN's 3.2 version. I just found this website for downloading the prebuilt clang (http://llvm.org/releases/download.html). I believe I have downloaded the proper one. Therefore, I think thats not the problem.

When using cmake for Mozart2, I get the following output:

-- The CXX compiler identification is Clang 5.0.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found Git: /usr/bin/git (found version "1.8.3.4 (Apple Git-47)") 
-- The C compiler identification is Clang 5.0.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Mozart 2.0.0-alpha.0+build.3789.5da5d28 (Tue, 17 Sep 2013 19:11:38 +0200)
-- Boost version: 1.54.0
-- Found the following Boost libraries:
--   random
--   system
--   thread
--   filesystem
--   chrono
-- Found Java: /usr/bin/java (found version "1.6.0.51") 
-- Boost version: 1.54.0
-- Found the following Boost libraries:
--   program_options
--   random
--   system
--   thread
--   filesystem
--   chrono
-- Using emacs from: /Applications/Aquamacs.app/Contents/MacOS/Aquamacs
-- Found Tclsh: /usr/bin/tclsh (found version "8.5") 
-- Found TCL: /System/Library/Frameworks/tcl.framework  
-- Found TCLTK: /System/Library/Frameworks/tcl.framework  
-- Found TK: /System/Library/Frameworks/tk.framework  
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/manuelbravo/builds/mozart-build

As you can see, it finds clang version 5.0.0 (equivalent to SVN's 3.3). This is my cmake:

cmake -DCMAKE_BUILD_TYPE=Release -DGTEST_SRC_DIR=../../externals/gtest -DGTEST_BUILD_DIR=../gtest-debug -DLLVM_SRC_DIR=../../externals/llvm-3.2.src -DLLVM_BUILD_DIR=../clang+llvm-3.2-x86_64-apple-darwin11/ -DCLANG_BUILD_DIR=../clang+llvm-3.2-x86_64-apple-darwin11/bin -DCLANG_SRC_DIR=../../externals/llvm-3.2.src/tools/clang ../../mozart2

Even using the -DCLANG flags, it always finds the version 5.0.0. I guess that might be the problem, but I do not know how to solve it. That version is automatically installed by Xcode, I believe. I guess it is not easy to downgrade. (I do not even know if this might solve the problem)

Any idea?

Manuel

Stewart Mackenzie

unread,
Oct 23, 2013, 9:59:45 AM10/23/13
to mozart-...@googlegroups.com
Hi Manuel,

You're definitely not flooding the group. We're here to support as much as we can. Others will need it too. Hence it'll make our lives easier if everything is kept public.

Though do assist others here just as you have been assisted ;-)

So using this new Clang 5.0.0 configuration please copy paste the entirety of the make's output.

Stewart

Manuel Bravo

unread,
Oct 23, 2013, 10:03:31 AM10/23/13
to mozart-...@googlegroups.com
The problem is that I do not wanna use the 5.0.0 (equivalent to 3.3), I want to use the one I downloaded (3.2). 

Anyway, the output of the make is:

/Users/manuelbravo/externals/llvm-3.2.src/include/llvm/Support/AlignOf.h:95:1: error: 'alignas' attribute cannot be applied to types
LLVM_ALIGNEDCHARARRAY_TEMPLATE_ALIGNMENT(32);
^
/Users/manuelbravo/externals/llvm-3.2.src/include/llvm/Support/AlignOf.h:79:10: note: expanded from macro 'LLVM_ALIGNEDCHARARRAY_TEMPLATE_ALIGNMENT'
    char alignas(x) aligned; \
         ^
/Users/manuelbravo/externals/llvm-3.2.src/include/llvm/Support/AlignOf.h:96:1: error: 'alignas' attribute cannot be applied to types
LLVM_ALIGNEDCHARARRAY_TEMPLATE_ALIGNMENT(64);
^
/Users/manuelbravo/externals/llvm-3.2.src/include/llvm/Support/AlignOf.h:79:10: note: expanded from macro 'LLVM_ALIGNEDCHARARRAY_TEMPLATE_ALIGNMENT'
    char alignas(x) aligned; \
         ^
/Users/manuelbravo/externals/llvm-3.2.src/include/llvm/Support/AlignOf.h:97:1: error: 'alignas' attribute cannot be applied to types
LLVM_ALIGNEDCHARARRAY_TEMPLATE_ALIGNMENT(128);
^
/Users/manuelbravo/externals/llvm-3.2.src/include/llvm/Support/AlignOf.h:79:10: note: expanded from macro 'LLVM_ALIGNEDCHARARRAY_TEMPLATE_ALIGNMENT'
    char alignas(x) aligned; \
         ^
/Users/manuelbravo/externals/llvm-3.2.src/include/llvm/Support/AlignOf.h:98:1: error: 'alignas' attribute cannot be applied to types
LLVM_ALIGNEDCHARARRAY_TEMPLATE_ALIGNMENT(512);
^
/Users/manuelbravo/externals/llvm-3.2.src/include/llvm/Support/AlignOf.h:79:10: note: expanded from macro 'LLVM_ALIGNEDCHARARRAY_TEMPLATE_ALIGNMENT'
    char alignas(x) aligned; \
         ^
/Users/manuelbravo/externals/llvm-3.2.src/include/llvm/Support/AlignOf.h:99:1: error: 'alignas' attribute cannot be applied to types
LLVM_ALIGNEDCHARARRAY_TEMPLATE_ALIGNMENT(1024);
^
/Users/manuelbravo/externals/llvm-3.2.src/include/llvm/Support/AlignOf.h:79:10: note: expanded from macro 'LLVM_ALIGNEDCHARARRAY_TEMPLATE_ALIGNMENT'
    char alignas(x) aligned; \
         ^
/Users/manuelbravo/externals/llvm-3.2.src/include/llvm/Support/AlignOf.h:100:1: error: 'alignas' attribute cannot be applied to types
LLVM_ALIGNEDCHARARRAY_TEMPLATE_ALIGNMENT(2048);
^
/Users/manuelbravo/externals/llvm-3.2.src/include/llvm/Support/AlignOf.h:79:10: note: expanded from macro 'LLVM_ALIGNEDCHARARRAY_TEMPLATE_ALIGNMENT'
    char alignas(x) aligned; \
         ^
/Users/manuelbravo/externals/llvm-3.2.src/include/llvm/Support/AlignOf.h:101:1: error: 'alignas' attribute cannot be applied to types
LLVM_ALIGNEDCHARARRAY_TEMPLATE_ALIGNMENT(4096);
^
/Users/manuelbravo/externals/llvm-3.2.src/include/llvm/Support/AlignOf.h:79:10: note: expanded from macro 'LLVM_ALIGNEDCHARARRAY_TEMPLATE_ALIGNMENT'
    char alignas(x) aligned; \
         ^
/Users/manuelbravo/externals/llvm-3.2.src/include/llvm/Support/AlignOf.h:102:1: error: 'alignas' attribute cannot be applied to types
LLVM_ALIGNEDCHARARRAY_TEMPLATE_ALIGNMENT(8192);
^
/Users/manuelbravo/externals/llvm-3.2.src/include/llvm/Support/AlignOf.h:79:10: note: expanded from macro 'LLVM_ALIGNEDCHARARRAY_TEMPLATE_ALIGNMENT'
    char alignas(x) aligned; \
         ^
13 errors generated.
make[2]: *** [vm/generator/main/CMakeFiles/generator.dir/generator.cc.o] Error 1
make[1]: *** [vm/generator/main/CMakeFiles/generator.dir/all] Error 2
make: *** [all] Error 2

Manuel

Stewart Mackenzie

unread,
Oct 23, 2013, 10:10:04 AM10/23/13
to mozart-...@googlegroups.com
Okay, then, please put the full cmake command + configuration output + make's output for the clang version you want to use.

Manuel Bravo

unread,
Oct 23, 2013, 10:15:43 AM10/23/13
to mozart-...@googlegroups.com
CMAKE:

cmake -DCMAKE_BUILD_TYPE=Release -DGTEST_SRC_DIR=../../externals/gtest -DGTEST_BUILD_DIR=../gtest-debug -DLLVM_SRC_DIR=../../externals/llvm-3.2.src -DLLVM_BUILD_DIR=../clang+llvm-3.2-x86_64-apple-darwin11/ -DCLANG_BUILD_DIR=../clang+llvm-3.2-x86_64-apple-darwin11 -DCLANG_SRC_DIR=../../externals/llvm-3.2.src/tools/clang ../../mozart2

CMAKE OUTPUT (I guess the configuration output you refer to)

MAKE's OUTPUT

Nicholas Rutherford

unread,
Nov 22, 2013, 6:41:18 PM11/22/13
to mozart-...@googlegroups.com
Was this ever resolved? I've just tried to build and eventually got the same problem:

  error: 'alignas' attribute cannot be applied to types

Paul Cleary

unread,
Dec 18, 2013, 8:57:15 PM12/18/13
to mozart-...@googlegroups.com
Ditto, I am trying the same thing on a Mac and getting the exact same issue.  Was this ever resolved?

Manuel Bravo

unread,
Dec 23, 2013, 8:36:23 AM12/23/13
to mozart-...@googlegroups.com
Hi everyone,

I was finally able to build Mozart on a Mac (Mavericks). It did not work for Mountain Lion.

I basically followed the following video tutorial: http://vimeo.com/78914718. Instead of using the repository proposed in the video tutorial, I used the following:

https://github.com/ggutierrez/mozart2 and I checked-out in the task/mavericks-build branch (git checkout task/mavericks-build).

Hope this solved your problems.

Best,
Manuel

Nicholas Rutherford

unread,
Dec 23, 2013, 8:47:52 AM12/23/13
to Manuel Bravo, mozart-...@googlegroups.com
There is also some discussion here: https://github.com/mozart/mozart2/pull/114

--
You received this message because you are subscribed to a topic in the Google Groups "Mozart Hackers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mozart-hackers/IspaGQH2aXo/unsubscribe.
To unsubscribe from this group and all of its topics, send an email to mozart-hacker...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages