Re: /bzr/squid3/trunk/ r10095: Fixed linking convention mismatch in Asn ACL

View: New views
4 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: /bzr/squid3/trunk/ r10095: Fixed linking convention mismatch in Asn ACL

by Amos Jeffries-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Francesco Chemolli wrote:

> ------------------------------------------------------------
> revno: 10095
> committer: Francesco Chemolli <kinkie@...>
> branch nick: trunk
> timestamp: Fri 2009-11-06 17:12:48 +0100
> message:
>   Fixed linking convention mismatch in Asn ACL
> modified:
>   src/acl/Asn.cc
>

This is what SQUIDCEXTERN is for.
... working towards not needing it as all code converges on C++ builds.

Amos
--
Please be using
   Current Stable Squid 2.7.STABLE7 or 3.0.STABLE20
   Current Beta Squid 3.1.0.14

Re: /bzr/squid3/trunk/ r10095: Fixed linking convention mismatch in Asn ACL

by Kinkie :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

For some reason it was not working for me.
I'll try again.

On 11/7/09, Amos Jeffries <squid3@...> wrote:

> Francesco Chemolli wrote:
>> ------------------------------------------------------------
>> revno: 10095
>> committer: Francesco Chemolli <kinkie@...>
>> branch nick: trunk
>> timestamp: Fri 2009-11-06 17:12:48 +0100
>> message:
>>   Fixed linking convention mismatch in Asn ACL
>> modified:
>>   src/acl/Asn.cc
>>
>
> This is what SQUIDCEXTERN is for.
> ... working towards not needing it as all code converges on C++ builds.
>
> Amos
> --
> Please be using
>    Current Stable Squid 2.7.STABLE7 or 3.0.STABLE20
>    Current Beta Squid 3.1.0.14
>


--
    /kinkie

Re: /bzr/squid3/trunk/ r10095: Fixed linking convention mismatch in Asn ACL

by Kinkie :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sat, Nov 7, 2009 at 2:28 AM, Amos Jeffries <squid3@...> wrote:

> Francesco Chemolli wrote:
>>
>> ------------------------------------------------------------
>> revno: 10095
>> committer: Francesco Chemolli <kinkie@...>
>> branch nick: trunk
>> timestamp: Fri 2009-11-06 17:12:48 +0100
>> message:
>>  Fixed linking convention mismatch in Asn ACL
>> modified:
>>  src/acl/Asn.cc
>>
>
> This is what SQUIDCEXTERN is for.
> ... working towards not needing it as all code converges on C++ builds.

I can confirm that SQUIDCEXTERN is not working here: the referred-to
function are static, and they need C linkage as they are defined in a
.cc file, but passed as pointers to the radix tree c library.

Solutions I can see are:
- leaving the extern "C" definition block as is (possbly remove the
#ifdefs, as that file will always be compiled with c++)
- un-static-ify the functions and let them pollute the namespace
- convert the radix-tree library to c++ so no more C linkage will be needed.

Opinions?

Thanks

--
    /kinkie

Re: /bzr/squid3/trunk/ r10095: Fixed linking convention mismatch in Asn ACL

by Amos Jeffries-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, 10 Nov 2009 16:46:37 +0100, Kinkie <gkinkie@...> wrote:
> On Sat, Nov 7, 2009 at 2:28 AM, Amos Jeffries <squid3@...>
wrote:

>> Francesco Chemolli wrote:
>>>
>>> ------------------------------------------------------------
>>> revno: 10095
>>> committer: Francesco Chemolli <kinkie@...>
>>> branch nick: trunk
>>> timestamp: Fri 2009-11-06 17:12:48 +0100
>>> message:
>>>  Fixed linking convention mismatch in Asn ACL
>>> modified:
>>>  src/acl/Asn.cc
>>>
>>
>> This is what SQUIDCEXTERN is for.
>> ... working towards not needing it as all code converges on C++ builds.
>
> I can confirm that SQUIDCEXTERN is not working here: the referred-to
> function are static, and they need C linkage as they are defined in a
> .cc file, but passed as pointers to the radix tree c library.
>
> Solutions I can see are:
> - leaving the extern "C" definition block as is (possbly remove the
> #ifdefs, as that file will always be compiled with c++)
> - un-static-ify the functions and let them pollute the namespace
> - convert the radix-tree library to c++ so no more C linkage will be
> needed.
>
> Opinions?

With the move to convenience libraries we have been taking the approach of
removing static for things which are in any of the library API. If it does
not need to be visible outside the convenience library then its defined
internal to the .cc instead and the static maybe kept.

Converting the radix code to C++ matches the end-goal of fully C++ code.
If you want to take it on go ahead. It is a larger change though and
outside the scope of simply fixing build issues.

Tumbling down to a second side project of implementing inside configure
'benchmark' micro- unit tests that compare performance and size of several
implementations (STL, Boost, Squid custom, other) and makes Squid build
with the a) fastest, or b) smallest footprint. This is a major side project
though.

Amos