Re: /bzr/squid3/trunk/ r9573: SourceLayout: acl/, take 1

From: Alex Rousskov <rousskov_at_measurement-factory.com>
Date: Sun, 15 Mar 2009 10:38:52 -0600

On 03/14/2009 11:27 AM, Tsantilas Christos wrote:
> maybe the use of static libraries is not good idea.

Just to clarify: New Makefiles use libtool convenience libraries, which
are very similar to static libraries, but are not exactly the same in
some aspects on some platforms.

> Currently I am not
> able to correctly linking the squid3. The linker will not include in
> main executable file important obj's.
> For example will not include the acl/Source.o file (included in library
> acl/libacls.a). This is because there is not direct reference to any of
> the exported symbols of this object, and the linker believes that this
> object is not used by squid binary.

I see. There are no "make check" test cases that detect these kinds of
problems, right? To detect these problems, one has to run Squid with
"nearly all" squid.conf options and features used, or something like that.

> A solution is to link with the "--whole-archive" linker option but
> looks very difficult to use this option with libtool

IIRC, I have used that option with libtool in other projects. It should
also allow us to worry less about library link order. I did not want to
use it to keep things simple, but perhaps we should. Will investigate.

> An other solution is to do objects initiation in a .cc file which will
> be included directly to squid binary.

Yes, this will work. This is, essentially, what Amos is suggesting in
his response. It requires more code changes, introduces more code
dependencies, and kind of bans a useful C++ technique, but it can be the
right solution. I will need to think about it.

> Also maybe using dynamics libraries is a solution.

IMO, convenience libraries are the right thing to use in Squid context,
where libraries are not installed and may be grouped together.

Alex.

> Alex Rousskov wrote:
>> ------------------------------------------------------------
>> revno: 9573
>> committer: Alex Rousskov <rousskov_at_measurement-factory.com>
>> branch nick: trunk
>> timestamp: Fri 2009-03-13 15:05:54 -0600
>> message:
>> SourceLayout: acl/, take 1
>> Moved src/ACL* and a few related files into src/acl/.
>> Renamed ACL source files from ACLFoo.{cc,cci,h} to Foo.{cc,cci,h}.
>> Added acl/ libraries, reorganized auth/ libraries, and split
>> ACLChecklist
>> class to avoid circular dependencies among libraries.
>> Many targets in src/Makefile.am depended on selected ACL ACL*cc
>> and related
>> sources. These targets depend on acl/* libraries now. As a part of
>> this
>> cleanup, the number of ufsdump sources went from about 160 to about 20.
>> No functionality changes were intended. Source code changes were
>> kept to the
>> minimum. All my build tests are successful. However, since I had to
>> move a lot
>> of files, move some code pieces, and split ACLChecklist, it is
>> possible that
>> some targets will no longer build in some environments and some
>> authentication
>> code will break.
>>
Received on Sun Mar 15 2009 - 16:39:00 MDT

This archive was generated by hypermail 2.2.0 : Mon Mar 16 2009 - 12:00:03 MDT