[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cannot generate a compliable builtins.cc
From: |
Ben Abbott |
Subject: |
Re: cannot generate a compliable builtins.cc |
Date: |
Sat, 19 Dec 2009 23:02:34 -0500 |
On Dec 19, 2009, at 10:42 PM, Rob Mahurin wrote:
> On Sat, Dec 19, 2009 at 03:47:02PM -0500, Rob Mahurin wrote:
>> I am trying to get the development sources to build on OSX 10.5 using
>> dependencies installed by MacPorts. Currently my build stops with
> [bizarre errors around builtins.cc]
> [...]
>> If I change the Makefile rule for generating builtins.cc to
>>
>> builtins.cc: $(DEF_FILES:.ll=.cc) mkbuiltins
>> $(srcdir)/mkbuiltins $(DEF_FILES:.ll=.cc) > address@hidden
>> mv address@hidden $@
>
> This was sort of the right track. It turns out the /usr/bin/sed
> shipped with OSX 10.5 does not handle regular expressions like
> (this|that) :
>
> $ echo lex.ll | sed 's,.*/,,; s/\.\(cc\|yy\|ll\)$/.df/';
> lex.ll
> $ echo lex.ll | gsed 's,.*/,,; s/\.\(cc\|yy\|ll\)$/.df/';
> lex.df
>
> This meant that find-defun-files.sh a partially wrong list of files to
> mkbuiltins, and builtins.cc contained dozens of complete source files.
>
> I've made a symlink so that "sed" calls the better
> /opt/local/bin/gsed, and am trying to build again.
>
> An appropriate patch to submit would be a configure test that checks
> whether sed works. A sexier patch would be to write
> find-defun-files.sh.in and allow "./configure SED=gsed". I don't know
> how to do either of these things.
>
> Cheers,
> Rob
Rob,
I'm using a sed from Fink, which does handle your examples.
$ which sed
/sw/bin/sed
Another solution would be to have MacPorts modify the portfile associated with
gsed and create a symboliic link, similar to what Fink provides.
$ ls -l /sw/bin/sed
lrwxr-xr-x 1 root admin 24 2009-07-10 11:17 /sw/bin/sed ->
/sw/etc/alternatives/sed
Ben