Re: [pcre-dev] [Bug 664] ABI breakage in PCRE 7.6

Etusivu
Poista viesti
Lähettäjä: Ian Lance Taylor
Päiväys:  
Vastaanottaja: pcre-dev
Kopio: 664
Aihe: Re: [pcre-dev] [Bug 664] ABI breakage in PCRE 7.6
Philip Hazel <ph10@???> writes:

> On Sat, 22 Mar 2008, Ian Lance Taylor wrote:
>
>> I am not an expert on Mach-O, but my reading of the gcc source code is
>> that aliases are supported, but they have to be weak.
>
> Is that the same as Craig's suggestion below, which Daniel reports does
> not work?
>
> On Sat, 22 Mar 2008, Daniel Johnson wrote:
>
>> > extern Arg no_arg __attribute__((weak, alias("_ZN7pcrecpp2RE6no_argE")));
>>
>> No, I already tried that. While running the tests I get:
>>
>> dyld: Symbol not found: __ZN7pcrecpp6no_argE
>> Referenced from:
>> /sw/src/fink.build/pcre-7.6-3/pcre-7.6/.libs/libpcrecpp.0.dylib
>> Expected in: dynamic lookup
>>
>> The symbol __ZN7pcrecpp6no_argE gets created, but is marked undefined in the
>> symbol table. But I guess that's kind of the point of weak symbols. :)
>> Something has to actually define it at runtime. I don't really have another
>> suggestion for you, I'm afraid. Linking issues aren't my speciality.


Yes, that is what I was suggesting. The question here is why
_ZN7pcrecpp2RE6no_argE, aka pcrecpp::Re::no_arg, wasn't defined. It
should be defined because it is part of the pcrecpp::Re class.

In particular, should we be concerned that the dyld error message uses
the wrong symbol name? Was the error in transcribing the error
message or in the source code?

Ian