[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Nesting and final linking ?

From: nickthefarrow
Subject: Re: Nesting and final linking ?
Date: Thu, 7 Aug 2008 05:27:03 -0700 (PDT)


Spot on :)

I had managed to find this, while you were posting your reply by generating
a simple project from scratch, and new's and per chance I did
not include the '.' to these and so I managed to work it back. I had not
appreciated that the top level is made last , I have not idea hoe the '.'
made it there :)

I have one last problem that I'd like to run past you. I have added all the
modules that need tobe built and the full library is now generated, however
some sub objects are missing. The text from the library generation

make[2]: Entering directory `/home/nick/libwhite'
bin/sh ./libtool --tag=CC   --mode=link gcc  -g -O2 --tag=CXX  -o -rpath /usr/local/lib  src/utils/
src/common/ src/ src/containers/
src/FileIO/ src/network/ src/parsers/
src/servers/ src/stacks/

This bit looks fine, all the sub libs components are mentioned here (above)

rm -fr  .libs/libwhite.a .libs/ .libs/libwhite.lai
.libs/ .libs/ .libs/
gcc -shared  -Wl,--whole-archive src/common/.libs/libcommon.a
src/.libs/libsrc.a src/containers/.libs/libcontainers.a
-Wl,--no-whole-archive  -Wl,--rpath -Wl,/home/nick/libwhite/src/utils/.libs
-Wl,--rpath -Wl,/home/nick/libwhite/src/FileIO/.libs -Wl,--rpath
-Wl,/home/nick/libwhite/src/network/.libs -Wl,--rpath
-Wl,/home/nick/libwhite/src/parsers/.libs -Wl,--rpath
-Wl,/home/nick/libwhite/src/servers/.libs -Wl,--rpath
-Wl,/home/nick/libwhite/src/stacks/.libs -Wl,--rpath -Wl,/usr/local/lib
src/utils/.libs/ src/FileIO/.libs/
src/network/.libs/ src/parsers/.libs/
src/servers/.libs/ src/stacks/.libs/  -Wl,-soname
-Wl, -o .libs/

This again looks ok (above)

Below is where is does not look good

(cd .libs && rm -f && ln -s
(cd .libs && rm -f && ln -s
rm -fr .libs/libwhite.lax
mkdir .libs/libwhite.lax
rm -fr .libs/libwhite.lax/libcommon.a
mkdir .libs/libwhite.lax/libcommon.a
(cd .libs/libwhite.lax/libcommon.a && ar x
rm -fr .libs/libwhite.lax/libsrc.a
mkdir .libs/libwhite.lax/libsrc.a
(cd .libs/libwhite.lax/libsrc.a && ar x
rm -fr .libs/libwhite.lax/libcontainers.a
mkdir .libs/libwhite.lax/libcontainers.a
(cd .libs/libwhite.lax/libcontainers.a && ar x
ar cru .libs/libwhite.a  

The final library only consists of libsrc, libcommon, libcontainers and not
the others libstacks etc, and it looks like libcommon is partial, it should
consist of 39 objects I dont really know what script its running here
( or why is missing the rest. The only thing that comes to mind
is running out of environment space?

Hopefully this is the last issue ? !!

I'd welcome your opinion.

Thanks very much again 


ranlib .libs/libwhite.a
rm -fr .libs/libwhite.lax   

Ralf Wildenhues wrote:
> Hi Nick,
> * nickthefarrow wrote on Thu, Aug 07, 2008 at 10:17:57AM CEST:
>> Making all in .
>> make[2]: Entering directory `/home/nick/libwhite'
>> make[2]: *** No rule to make target `src/common/', needed by
>> `'.  Stop.
>> make[2]: Leaving directory `/home/nick/libwhite'
> [...]
>> my top level is
>> ----------------------------------
>> SUBDIRS = . ./src/common/
> This is the culprit.  By listing '.' early in SUBDIRS you are in effect
> telling Automake to build things in the current Makefile first, and only
> then go into the src/common sub directory.  Solution is to list '.' last
> or not at all (in which it will default to being last).
> BTW, please drop the leading './' from that name here, it may confuse
> some non-GNU make IIRC (they typically don't treat 'file' and './file'
> as identical).
>> AC_CONFIG_SUBDIRS([src/common])
>> AC_OUTPUT(Makefile src/common/Makefile)
> FWIW, listing arguments in AC_OUTPUT is a bit old-fashioned.  The new
> way would be:
>   AC_CONFIG_FILES([Makefile src/common/Makefile])
> Also, there is some bug lingering here: when you list src/common in
> AC_CONFIG_SUBDIRS, then you are effectively saying that there is another
> configure script in the src/common directory.  If that is the case, then
> it should also be the case that that configure script creates the
> Makefile in that directory; but your AC_OUTPUT line tells the toplevel
> configure script to create the Makefile.  If both configure scripts do
> this (and you can be certain that they won't produce identical results),
> then things will get confused pretty quickly.
> If you don't need another configure script in src/common, you can simply
> remove the AC_CONFIG_SUBDIRS line.
> Hope that helps.
> Cheers,
> Ralf

View this message in context:
Sent from the Gnu - Automake - General mailing list archive at

reply via email to

[Prev in Thread] Current Thread [Next in Thread]