Once again I am unable to successfully 'make' Parrot on Darwin. I
getting the same errors I was getting when I first tried at the
Chicago hackathon on Nov 11 -- nothwithstanding (a) having succeeded
with 'make' since then several times; and (b) applying all the hack
workarounds suggested at the hackathon.
I did 'make realclean', then took two approaches depending on how I
called 'perl Configure.pl'. In both approaches, I then applied
chromatic's hack to Makefile: deleting '-bundle' from the values
assigned to LD_LOAD_FLAGS (approx line 164). But 'make' failed in
both approaches, though it got a few lines farther in the second.
perl Configure.pl
# no options
# See output in 09.12.2006.make.failure.output.txt
perl Configure.pl --without-gmp --cc=gcc --ccflags=-DAN
# options suggested as workarounds at hackathon
# See output in 09.12.2006.make.failure.output.2.txt
# See differences in two outputs of failed 'make' in diff.
09.12.2006.make.failure.output.txt
I must say I'm getting very frustrated with this inability to get
Parrot to 'make' successfully. I'm using the same OS and hardware
(Darwin, iBook G4) as many other Parrot hackers. I've upgraded to
the most recent version of GNU make (3.81). I do a 'make realclean'
and an 'svn update' every time before running Configure.pl. And
still, a month into this, I cannot get 'make' to succeed successfully.
I'm hoping to contribute to the project by phalanxing its build
tools, pmc2c.pl in particular. The ultimate test of any refactoring
I do on pmc2c.pl is: Does 'make', which calls pmc2c.pl repeatedly,
succeed at least as well when running with my refactored version as
with the trunk version? But how can I make that determination when I
cannot get 'make' to work even with the trunk version?
kid51
> # New Ticket Created by James Keenan
> # Please include the string: [perl #41064]
> # in the subject line of all future correspondence about this issue.
> # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=41064 >
>
>
> Once again I am unable to successfully 'make' Parrot on Darwin. I
> getting the same errors I was getting when I first tried at the
> Chicago hackathon on Nov 11 -- nothwithstanding (a) having succeeded
> with 'make' since then several times; and (b) applying all the hack
> workarounds suggested at the hackathon.
<SNIP>
> 60,95d58
> < ops2c.pl: Cannot open source file 'src/ops/core_ops_cgp.c.temp'
> for writing: Permission denied!
AOOGA.
> < make: *** [src/ops/core_ops_cgp.c] Error 13
> < [parrot] 523 $ ls -l src/ops/core_ops_cgp.c.temp
> < -rw-r--r-- 1 root jimk 0 Dec 7 20:59 src/ops/
> core_ops_cgp.c.temp
> < [parrot] 524 $ ls -l src/ops/
> < total 3536
> < -rw-r--r-- 1 jimk jimk 7046 Nov 12 08:08 bit.ops
> < -rw-r--r-- 1 jimk jimk 22308 Nov 12 08:08 cmp.ops
> < -rw-r--r-- 1 jimk jimk 28238 Nov 12 08:08 core.ops
> < -rw-r--r-- 1 jimk jimk 838227 Dec 9 21:32 core_ops.c
> < -rw-r--r-- 1 jimk jimk 317139 Dec 9 21:32 core_ops_cg.c
> < -rw-r--r-- 1 root jimk 0 Dec 7 20:59 core_ops_cgp.c.temp
Looks like you ran 'make' as root at one point, and are now running
it as jimk. The temp file that was left out there is owned by root,
not deletable by your normal account. This would explain why things
seem to fail only on your box.
If you're trying to work from scratch, might be easier to do a new
checkout. If you're feeling brave, you could chown all the files in
the repo to 'jimk' and try again.
This may not be everything that's going on. Fix this, try again, and
post your results.
--
Will "Coke" Coleda
wi...@coleda.com
I'm not sure how that temp file owned by root got there, but I
deleted it, did make realclean and attempted to remake. But I failed
again, as documented in the second of 3 attachments submitted yesterday.
Ok. Few questions:
What arguments did you pass to configure?
What version of the compiler are you using?
What chip architecture (you said darwin, I'm assuming OS X here: if
so, what does sw_vers say?)
Have you ever installed parrot before?
As mentioned in OP, I made two attempts. The first was to call perl
Configure.pl with no arguments. The second:
perl Configure.pl --without-gmp --cc=gcc --ccflags=-DAN
# options suggested as workarounds at hackathon
# -DAN was suggested by Chip as a dummy option to get around some problem
> What version of the compiler are you using?
gcc 3.81: the latest
Parrot: svn 16056 (see myconfig attached)
> What chip architecture (you said darwin, I'm assuming OS X here: if so,
> what does sw_vers say?)
[parrot] 624 $ sw_vers
ProductName: Mac OS X
ProductVersion: 10.4.8
BuildVersion: 8L127
... plus see perl_V attached
> Have you ever installed parrot before?
>
'make install'? No, but I was told that developers probably shouldn't
go that far. My first exposure to Parrot was at the Chicago Perl
hackathon, where I experience problems very similar to those I'm
reporting in this thread. Chip, chromatic, particle and others
suggested workarounds (described in previous threads) which got me to
the point where I could start writing tests of the build tools. I went
through the make realclean/Configure.pl/make cycle quite a few times
over the past month, succeeding to the point where I've been able to run
'make test' and file reports on failing tests.
But in the last couple of days I cannot 'make' successfully, as reported
earlier in this thread.
kid51
I'd just use the no option version.
>> What version of the compiler are you using?
>
> gcc 3.81: the latest
> Parrot: svn 16056 (see myconfig attached)
3.8.1 ?? odd. I have 4.0.1. and 3.3. Is this a gcc that came with the
OS, or is it a hand-built or otherwise non-Xcode version?
>> What chip architecture (you said darwin, I'm assuming OS X here:
>> if so, what does sw_vers say?)
>
> [parrot] 624 $ sw_vers
> ProductName: Mac OS X
> ProductVersion: 10.4.8
> BuildVersion: 8L127
Identical to mine...
> ... plus see perl_V attached
>
>> Have you ever installed parrot before?
> 'make install'? No, but I was told that developers probably
> shouldn't go that far. My first exposure to Parrot was at the
> Chicago Perl hackathon, where I experience problems very similar to
> those I'm reporting in this thread. Chip, chromatic, particle and
> others suggested workarounds (described in previous threads) which
> got me to the point where I could start writing tests of the build
> tools. I went through the make realclean/Configure.pl/make cycle
> quite a few times over the past month, succeeding to the point
> where I've been able to run 'make test' and file reports on failing
> tests.
>
> But in the last couple of days I cannot 'make' successfully, as
> reported earlier in this thread.
>
> kid51
> Summary of my parrot 0.4.7 (r16056) configuration:
> configdate='Sat Dec 9 21:57:06 2006'
> Platform:
> osname=darwin, archname=darwin-2level
> jitcapable=1, jitarchname=ppc-darwin,
> jitosname=DARWIN, jitcpuarch=ppc
> execcapable=1
> perl=perl
> Compiler:
> cc='gcc', ccflags='-DAN',
> Linker and Libraries:
> ld='c++', ldflags=' -L/usr/local/lib -L/Users/jimk/work/parrot/
> blib/lib -flat_namespace ',
> cc_ldflags='',
> libs='-lm'
> Dynamic Linking:
> share_ext='.dylib', ld_share_flags='-dynamiclib -undefined
> suppress',
> load_ext='.bundle', ld_load_flags='-bundle -undefined suppress'
> Types:
> iv=long, intvalsize=4, intsize=4, opcode_t=long, opcode_t_size=4,
> ptrsize=4, ptr_alignment=1 byteorder=4321,
> nv=double, numvalsize=8, doublesize=8
> Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
> Platform:
> osname=darwin, osvers=8.7.0, archname=darwin-2level
> uname='darwin macintosh.local 8.7.0 darwin kernel version
> 8.7.0: fri may 26 15:20:53 pdt 2006;
> root:xnu-792.6.76.obj~1release_ppc power macintosh powerpc '
> config_args='-de'
> hint=recommended, useposix=true, d_sigaction=define
> usethreads=undef use5005threads=undef useithreads=undef
> usemultiplicity=undef
> useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
> use64bitint=undef use64bitall=undef uselongdouble=undef
> usemymalloc=n, bincompat5005=undef
> Compiler:
> cc='cc', ccflags ='-fno-common -DPERL_DARWIN -no-cpp-precomp -
> fno-strict-aliasing -pipe -I/usr/local/include',
> optimize='-O3',
> cppflags='-no-cpp-precomp -fno-common -DPERL_DARWIN -no-cpp-
> precomp -fno-strict-aliasing -pipe -I/usr/local/include'
> ccversion='', gccversion='3.3 20030304 (Apple Computer, Inc.
> build 1495)', gccosandvers=''
> intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
> d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
> ivtype='long', ivsize=4, nvtype='double', nvsize=8,
> Off_t='off_t', lseeksize=8
> alignbytes=8, prototype=define
> Linker and Libraries:
> ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags =' -L/usr/
> local/lib'
> libpth=/usr/local/lib /usr/lib
> libs=-ldbm -ldl -lm -lc
> perllibs=-ldl -lm -lc
> libc=/usr/lib/libc.dylib, so=dylib, useshrplib=false,
> libperl=libperl.a
> gnulibc_version=''
> Dynamic Linking:
> dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
> cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -
> L/usr/local/lib'
>
>
> Characteristics of this binary (from libperl):
> Compile-time options: PERL_MALLOC_WRAP USE_LARGE_FILES USE_PERLIO
> Built under darwin
> Compiled at Sep 13 2006 20:15:49
> @INC:
> /usr/local/lib/perl5/5.8.8/darwin-2level
> /usr/local/lib/perl5/5.8.8
> /usr/local/lib/perl5/site_perl/5.8.8/darwin-2level
> /usr/local/lib/perl5/site_perl/5.8.8
> /usr/local/lib/perl5/site_perl/5.8.7/darwin-2level
> /usr/local/lib/perl5/site_perl/5.8.7
> /usr/local/lib/perl5/site_perl/5.8.4/darwin-2level
> /usr/local/lib/perl5/site_perl/5.8.4
> /usr/local/lib/perl5/site_perl
> .
>
> On Dec 10, 2006, at 6:50 PM, James E Keenan wrote:
>> perl Configure.pl --without-gmp --cc=gcc --ccflags=-DAN
Darwin has known difficulties with the GMP library. I've experienced
them in other contexts. particle et al created this option at the
Hackathon in response to those problems.
>> # options suggested as workarounds at hackathon
>> # -DAN was suggested by Chip as a dummy option to get around some
>> problem
>
>
> I'd just use the no option version.
At the moment, I'm trying this:
perl Configure.pl --without-gmp --cc=gcc
>
>>> What version of the compiler are you using?
>>
>>
>> gcc 3.81: the latest
My error: I have make 3.81, which is the latest make.
[CPAN] 804 $ gcc -v
Using built-in specs.
Target: powerpc-apple-darwin7.9.0
Configured with: ../gcc-4.0.3/configure : (reconfigured)
../gcc-4.0.3/configure
Thread model: posix
gcc version 4.0.3
>
> At the moment, I'm trying this:
>
> perl Configure.pl --without-gmp --cc=gcc
>
Which led to the worst results I've ever gotten from Configure.pl:
And now here's what I got with
perl Configure.pl (i.e., no options)
vi Makefile (to eliminate -bundle from LD_LOAD_FLAGS)
make
Failure at this point has now become frequently observed.
> James E Keenan wrote:
>
> And now here's what I got with
>
> perl Configure.pl (i.e., no options)
> vi Makefile (to eliminate -bundle from LD_LOAD_FLAGS)
I don't have to do this. What are your results without this manual
intervention? (but *with* --without-gmp)?
BTW, on OS X, cc=gcc shouldn't be needed:
% cc -v
Using built-in specs.
Thread model: posix
gcc version 3.3 20030304 (Apple Computer, Inc. build 1819)q
>> [parrot] 631 $ perl Configure.pl
>> [parrot] 632 $ vi Makefile # to delete -bundle from LD_LDOAD_FLAGS
>> [parrot] 633 $ make
>
> <snip most of configure/make output>
>
>> c++ -dynamiclib -undefined suppress -L/usr/local/lib -L/Users/jimk/
>> work/parrot/blib/lib -flat_namespace -o blib/lib/libparrot.
>> 0.4.7.dylib -install_name /usr/local/lib/libparrot.dylib \
>> src/ops/core_ops.o src/ops/core_ops_switch.o src/asmfun.o src/
>> ops/core_ops_cg.o src/ops/core_ops_cgp.o src/exec.o src/exec_cpu.o
>> src/exec_save.o src/charset.o src/encoding.o src/exceptions.o src/
>> global_setup.o src/interpreter.o src/inter_call.o src/inter_cb.o
>> src/inter_create.o src/inter_misc.o src/inter_run.o src/register.o
>> src/memory.o src/objects.o src/packfile.o src/stacks.o src/
>> stack_common.o src/string.o src/string_primitives.o src/sub.o src/
>> runops_cores.o src/trace.o src/pmc.o src/pmc_freeze.o src/key.o
>> src/hash.o src/core_pmcs.o src/platform.o src/jit.o src/jit_cpu.o
>> src/jit_debug.o src/jit_debug_xcoff.o src/intlist.o src/list.o src/
>> library.o src/global.o src/embed.o src/warnings.o src/packout.o
>> src/byteorder.o src/debug.o src/smallobject.o src/headers.o src/
>> hll.o src/dod.o src/gc_ims.o src/gc_gms.o src/exit.o src/misc.o
>> src/spf_render.o src/spf_vtable.o src/datatypes.o src/
>> fingerprint.o src/nci.o src/cpu_dep.o src/tsq.o src/longopt.o src/
>> events.o src/thread.o src/dynext.o src/utils.o src/vtables.o src/
>> pic.o src/pic_jit.o src/mmd.o src/builtin.o src/extend.o src/
>> extend_vtable.o src/revision.o src/packfile/pf_items.o src/stm/
>> backend.o src/stm/waitlist.o src/resources.o src/charset/ascii.o
>> src/charset/binary.o src/charset/iso-8859-1.o src/charset/tables.o
>> src/charset/unicode.o src/io/io.o src/io/io_buf.o src/io/
>> io_layers.o src/io/io_unix.o src/io/io_utf8.o src/io/io_mmap.o src/
>> io/io_win32.o src/io/io_stdio.o src/io/io_string.o src/io/
>> io_passdown.o src/pmc/default.o src/pmc/null.o src/pmc/env.o src/
>> pmc/key.o src/pmc/random.o src/pmc/unmanagedstruct.o src/pmc/
>> managedstruct.o src/pmc/delegate.o src/pmc/csub.o src/pmc/
>> compiler.o src/pmc/exception.o src/pmc/version.o src/pmc/
>> vtablecache.o src/pmc/parrotio.o src/pmc/parrotlibrary.o src/pmc/
>> parrotinterpreter.o src/pmc/parrotthread.o src/pmc/lexpad.o src/
>> pmc/timer.o src/pmc/pointer.o src/pmc/sub.o src/pmc/closure.o src/
>> pmc/continuation.o src/pmc/retcontinuation.o src/pmc/
>> exception_handler.o src/pmc/coroutine.o src/pmc/eval.o src/pmc/
>> nci.o src/pmc/float.o src/pmc/integer.o src/pmc/bigint.o src/pmc/
>> complex.o src/pmc/string.o src/pmc/boolean.o src/pmc/ref.o src/pmc/
>> sharedref.o src/pmc/array.o src/pmc/fixedintegerarray.o src/pmc/
>> intlist.o src/pmc/iterator.o src/pmc/sarray.o src/pmc/
>> fixedstringarray.o src/pmc/multiarray.o src/pmc/hash.o src/pmc/
>> orderedhash.o src/pmc/tqueue.o src/pmc/parrotclass.o src/pmc/
>> parrotobject.o src/pmc/os.o src/pmc/file.o src/pmc/addrregistry.o
>> src/pmc/bound_nci.o src/pmc/capture.o src/pmc/deleg_pmc.o src/pmc/
>> enumerate.o src/pmc/fixedbooleanarray.o src/pmc/fixedfloatarray.o
>> src/pmc/fixedpmcarray.o src/pmc/lexinfo.o src/pmc/multisub.o src/
>> pmc/namespace.o src/pmc/pair.o src/pmc/parrotrunningthread.o src/
>> pmc/resizablebooleanarray.o src/pmc/resizablefloatarray.o src/pmc/
>> resizableintegerarray.o src/pmc/resizablepmcarray.o src/pmc/
>> resizablestringarray.o src/pmc/scalar.o src/pmc/slice.o src/pmc/
>> stmlog.o src/pmc/stmref.o src/pmc/stmvar.o src/pmc/super.o src/pmc/
>> undef.o src/encodings/fixed_8.o src/encodings/ucs2.o src/encodings/
>> utf16.o src/encodings/utf8.o compilers/imcc/imcparser.o compilers/
>> imcc/imclexer.o compilers/imcc/imc.o compilers/imcc/symreg.o
>> compilers/imcc/instructions.o compilers/imcc/cfg.o compilers/imcc/
>> reg_alloc.o compilers/imcc/sets.o compilers/imcc/debug.o compilers/
>> imcc/optimizer.o compilers/imcc/pbc.o compilers/imcc/parser_util.o
>> compilers/imcc/pcc.o -lm -lgmp
>> ld: common symbols not allowed with MH_DYLIB output format with
>> the -multi_module option
>> /usr/local/lib/libgmp.a(mp_bpl.o) definition of common ___gmp_junk
>> (size 4)
>> /usr/bin/libtool: internal link edit command failed
>> make: *** [blib/lib/libparrot.0.4.7.dylib] Error 1
>> [parrot] 634 $
>>
> i note two things here.
> 1) you're using a c++ compiler to perform linking here. that's
> destined for failure, and is why C<--cc=gcc> has been suggested as a
> C<Configure.pl> option.
No, this is correct on OS X. Here's my shell script for running config:
#!/bin/sh
CC="ccache gcc-4.0"
CX="ccache g++-4.0"
/usr/bin/perl Configure.pl --cc="$CC" --cxx="$CX" --link="$CX" --
ld="$CX" --without-icu $@
You can s/ccache //g for the same effect sans without caching.
Regards.
> 2) you're attempting to link with an installed, yet broken C<gmp>
> implementation, which is why C<--without-gmp> was created in the first
> place. unless you remove C<gmp> from your system, you'll need to
> continue using the C<--without-gmp> option, since linking will fail
> otherwise.
>
> therefore, i suggest you continue to use C<Configure.pl --without-gmp
> --cc=gcc> every time you configure parrot.
>
> i can't speak to C<--ccflags=-DAN>, because i'm not familiar with the
> options. however, i see in a previous message, you attempted to run
> C<Configure.pl --without-gmp --cc=gcc> (as i suggest) and it gave you
> errors during execution. those errors, during compiler detection,
> point you to look at a temporary file called F<test.cco>. if you could
> provide the contents of this file in a reply, it would greatly aid in
> debugging, and may explain why C<--ccflags=-DAN> was suggested. (i'll
> research that in the meantime.)
>
> ~jerry
After talking to James on #parrot, I think the root of his problem is
that he's not using apple-standard gcc. I'd like to see the results
of using an apple-installed version of gcc/g++.
> i can't speak to C<--ccflags=-DAN>, because i'm not familiar with the
> options.
Chip and I suggested that as a tracer bullet to see if Configure.pl mangled
the options somehow for Jim. I believe that our goal was to replace any
other ccflags, especially the troublesome -bundle.
It *should* have no effect on the compile.
-- c
> On Monday 11 December 2006 06:42, jerry gay wrote:
>
>> i can't speak to C<--ccflags=-DAN>, because i'm not familiar with the
>> options.
>
> Chip and I suggested that as a tracer bullet to see if Configure.pl
> mangled
> the options somehow for Jim. I believe that our goal was to
> replace any
> other ccflags, especially the troublesome -bundle.
I suspect it is only troublesome due to the lack-of-apple-standard-
gcc. This option appears in my Makefile, no troubles.
> It *should* have no effect on the compile.
>
> -- c
>
--
Will "Coke" Coleda
wi...@coleda.com
>
> Here's my shell script for running config:
>
> #!/bin/sh
> CC="ccache gcc-4.0"
> CX="ccache g++-4.0"
> /usr/bin/perl Configure.pl --cc="$CC" --cxx="$CX" --link="$CX" --
> ld="$CX" --without-icu $@
>
>
Following further discussion with Coke on #parrot, I ran this slight
variation on the above:
#!/bin/sh
CC="/usr/bin/gcc-3.3"
CX="/usr/bin/g++-3.3"
/usr/local/bin/perl Configure.pl --cc="$CC" --cxx="$CX" --link="$CX"
--ld="$CX" --without-icu --without-gmp $@
It worked! Which puts me back in the Parrot game.
You can see the resulting Parrot configuration at
http://nopaste.snit.ch:8001/8999
And it appears that yesterday's Bug Day resulted in a lot of cage
cleaning, because the number of individual tests that failed when I ran
'make test' dropped from 62 to 1: http://nopaste.snit.ch:8001/9000
Thank you very much!
kid51