Re: Compilation fails on Solaris 8

From: Robert Collins <robert.collins@dont-contact.us>
Date: Tue, 9 Oct 2001 09:32:42 +1000

----- Original Message -----
From: "Henrik Nordstrom" <hno@marasystems.com>
To: "Squid Developers Mailinglist" <squid-dev@squid-cache.org>
Sent: Tuesday, October 09, 2001 8:44 AM
Subject: Compilation fails on Solaris 8

> While compiling on Solaris 8 in the SF compile farm the following
> automake error occurs:
>
>
> Making all in fs
> source='ufs/store_dir_ufs.c' object='ufs/store_dir_ufs.o' libtool=no \
> depfile='.deps/ufs/store_dir_ufs.Po'
> tmpdepfile='.deps/ufs/store_dir_ufs.TPo' \
> depmode=none /bin/sh
> /home/users/h/hn/hno/squid-head-200110072301/cfgaux/depcomp \
> cc -DHAVE_CONFIG_H -I.
> -I/home/users/h/hn/hno/squid-head-200110072301/src/fs -I../../include
> -I. -I../../include
> -I/home/users/h/hn/hno/squid-head-200110072301/include
> -I/home/users/h/hn/hno/squid-head-200110072301/src/ -g -c -o
> ufs/store_dir_ufs.o `test -f
>
/home/users/h/hn/hno/squid-head-200110072301/src/fs/ufs/store_dir_ufs.c
> || echo
>
'/home/users/h/hn/hno/squid-head-200110072301/src/fs/'`ufs/store_dir_ufs
.c
> error: cpp: ufs/store_dir_ufs.c No such file or directory

IIRC this test is to allow non-VPATH-aware makes to work correctly. In
theory if you are building in the src tree it will output
ufs/store_dir_ufs.c, otherwise /path/to/src/src/fs/ufs/store_dir_ufs.c.

The test is broken though - it test should be test -f ufs/store_dir_ufs
|| ech `/home/users...

What precise version of automake did you create the .in's with ? (I'll
track this down as an automake bug).

> source is in /home/users/h/hn/hno/squid-head-200110072301
>
> building in
> /home/users/h/hn/hno/solaris8_sunprocc/squid-head-200110072301
>
>
> Trying to make heads or tail of that make line, but I can't. There
seems
> to be more than one thing failing here.

Nope, just the one - file location test.

in squid-head, src/fs/Makefile.in:
ufs/store_dir_ufs.o: ufs/store_dir_ufs.c
    @AMDEP_TRUE@ source='ufs/store_dir_ufs.c' \
object='ufs/store_dir_ufs.o' libtool=no @AMDEPBACKSLASH@
    @AMDEP_TRUE@ depfile='$(DEPDIR)/ufs/store_dir_ufs.Po' \
tmpdepfile='$(DEPDIR)/ufs/store_dir_ufs.TPo' @AMDEPBACKSLASH@
    @AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS)
$(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS) -c -o ufs/store_dir_ufs.o \
`test -f ufs/store_dir_ufs.c || echo '$(srcdir)/'`ufs/store_dir_ufs.c

(backslashes for email continuation - htey aren't in the Makefile).

the actual test you *should* be seeing is
`test -f ufs/store)dir_ufs.c || echo '$srcdir/'`ufs/store_dir_ufs.c

can you confirm that that is what is in your Makefile.in && Makefile on
the compile farm?

If you have a different test, please replace it with this one and see
how that goes. Then we'll look at how your configured tree is different
to squid-HEAD.

Otherwise, if you have that test, then either that rule is not getting
fired - try adding an echo or something to it before the $(CC) line - or
the sun make is fiddling with the rule contents as part of it's VPATH
support (urrggh).

> Question: Remind me again on why automake builds the store modules
> outside of their directories? It seems it is mostly these automake
> fails on when using the SUN make program..

Coupla reasons:
1) its faster - make -j serialises directories, so building from a level
up allows greater parallelism. We still visit the directories at the
moment, but in automake 1.6 or 1.7 (ie there is no rush) automake should
be able to create an all-in-one Makefile.in that will build the entire
package in one pass - allowing maximal parallelism and guaranteeing
build order dependencies regardless of location and order in SUBDIR
variables.
2) I didn't want to fiddle the configure logic too much - currently we
look for fs/libmodule.a, we would have to look for fs/module/libmodule.a
if we built in the subdir.

Rob
Received on Mon Oct 08 2001 - 17:30:28 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:26 MST