Building parrot with clang

Andy Dougherty doughera at lafayette.edu
Mon Jun 22 16:56:19 UTC 2009


On Mon, 22 Jun 2009, Moritz Lenz wrote:

> (I'm sending this to both the parrot and the clang list since I have no
> ideawho will be involved in fixing some of the things)
> 
> Today I tried to build parrot with clang on linux/amd64.
> (Used versions: parrot r39691, llvm r73859, clang r73854)
> I configured parrot with
> perl Configure.pl --cc=$path/to/clang_executable/clang
> Configure finished fine, however during 'make' there was an error:

[bizarre APPLE_CC error omitted ]

> Configuring parrot with --ccflags=-U__APPLE_CC__ works around this,
> leading to
> the next failure, apparently in the linking step:
> 
> src/pmc/bignum.o: In function `__gmpz_abs':
> /usr/include/gmp.h:1611: multiple definition of `__gmpz_abs'
> src/pmc/bigint.o:/usr/include/gmp.h:1611: first defined here

> I have no idea if parrot or clang is to blame here.

One thing to watch out for:  Parrot's Configure.pl is very bad at guessing 
the correct programs and flags to use if you try to build parrot with any 
compiler other than the one used to build the supporting perl 5.  I 
strongly encourage you to run

	perl Configure.pl --cc=$path/to/clang_executable/clang --ask

to step through the questions to see what programs and flags Configure.pl 
will choose, and to allow you to choose the correct ones instead.  You can 
then note your answers and re-run Configure.pl with all the correct 
settings.

-- 
    Andy Dougherty		doughera at lafayette.edu


More information about the parrot-dev mailing list