On Jan 22, 2008 2:38 AM, Paul Cochrane <[EMAIL PROTECTED]> wrote: > > On 22/01/2008, chromatic <[EMAIL PROTECTED]> wrote: > > On Monday 21 January 2008 08:58:25 Paul Cochrane wrote: > > > > > when building parrot on Solaris I get most of the way through the > > > build, but right at the end, building pbc_to_exe fails with the > > > following output: > > > > > It seems that the Makefile macro $(LIBPARROT_STATIC) isn't being > > > expanded. I had a bit of a look around and found the following lines > > > in config_lib.pasm (which is used for the configuration information > > > necessary to build pbc_to_exe): > > > > > > set P0["libparrot"], "$(LIBPARROT_STATIC)" > > > set P0["libparrot_ldflags"], "$(LIBPARROT_STATIC)" > > > > > > further digging showed that these values are set within > > > config/inter/libparrot.pm, and the code in there seems perfectly sane > > > (especially considering that the value would be later expanded by > > > make). Unfortunately, from here I don't know where else to look to > > > solve the problem, however it is stopping me from building parrot on > > > the Solaris platform at present. > > > > Are you building Parrot as static or shared? What happens if you switch to > > shared? > > I'm just using C<perl Configure.pl> to configure the build, and it's > setting the build to be static. Using C<perl Configure.pl > --parrot_is_shared> doesn't make a difference as Configure still > determines that it's not building a shared parrot. > > > Is LIBPARROT_STATIC defined correctly in your Makefile? > > LIBPARROT_STATIC = blib/lib/libparrot.a > > This looks good to me. This is the value I would expect the > C<libparrot> configuration value to be expanded to in config_lib.pasm. > However, LIBPARROT is in the Makefile: > > LIBPARROT = $(LIBPARROT_STATIC) > > Which I would guess comes directly from the configured value, and > hence why the value is carried over to config_lib.pasm, although I'm > confused as to why this issue of not having an expanded value only > occurs on Solaris and not on other Unix based systems. > it seems to me the issue is that nobody else builds static by default, or at all. so this code that's about a week old hasn't been tested via every code path, until you came along.
it's rather annoying that some variables in Parrot::Config::Generated contain make-related variable expansion values, and others contain literal values, and that it's impossible to tell by the variable name which type the value may be. however, changing that means changing configure and a bunch of makefiles and code generators, which is no small task, so it has remained undone. sure would be nice, though, because then i'm sure the code you're running in pbc_to_exe would have worked for both static and shared builds of parrot. i'm still not sure what the best short-term solution is. i suppose we need to add a new variable during configure time, with the expanded value of LIBPARROT in it. we could call it LIBPARROT_X (_X for expanded,) but i'd rather put a suffix on variables containing makefile variable expansions, because they're less-frequently used, in my opinion. i'm interested in what other folks think on this matter. ~jerry