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

Kezdőlap
Üzenet törlése
Szerző: Philip Hazel
Dátum:  
Címzett: pcre-dev
Tárgy: [pcre-dev] [Bug 664] ABI breakage in PCRE 7.6
These two messages are in Bugzilla, but don't seem to have been
forwarded to pcre-dev (or have I missed them?) Any comment, Craig?

--- Comment #23 from Daniel Johnson <daniel@???> 2008-03-26 22:33:25 ---
(In reply to comment #22)
> Oh, Bugzilla seems to have chopped off the forwarded message that I
> included. Here it is, indented to avoid that happening again (I hope).
>
> ---------- Forwarded message ----------
> Date: Mon, 24 Mar 2008 16:17:32 -0700 (PDT)
> From: Craig Silverstein <csilvers@???>
> To: zackw@???
> Cc: pcre-dev@???
> Subject: Re: [pcre-dev] [Bug 664] ABI breakage in PCRE 7.6
>
>   } #if defined(__GNUC__) && __GNUC__ >= 3
>   } extern Arg no_arg __attribute__((
>   } #ifdef __MACH__
>   } // Mach (or at least OS X), doesn't support strong aliases, so make it
>   } // weak.  This is a smidge less safe in theory (conceivably, someone
>   } // could override this symbol in their own binary), but perfectly ok.
>   }                                weak,
>   } #endif
>   }                                alias(__USER_LABEL_PREFIX__
>   }                                      "_ZN7pcrecpp2RE6no_argE")));
>   } #endif

>
> I like this solution!, though it's a bit ugly. I didn't know about
> __USER_LABEL_PREFIX__. Below is an alternate patch that uses this
> approach, and is a smidgen safer.
>
> craig
>


- snip -

This doesn't compile:

/bin/sh ./libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I.     -g -Os
-c -o pcrecpp.lo pcrecpp.cc
 g++ -DHAVE_CONFIG_H -I. -g -Os -c pcrecpp.cc  -fno-common -DPIC -o
.libs/pcrecpp.o
pcrecpp.cc:74: error: expected `)' before string constant
pcrecpp.cc:74: error: alias argument not a string


Don't you need to concatenate the macro and the string constant? Otherwise the
compiler thinks they're separate symbols.

Daniel


--- Comment #24 from Daniel Johnson <daniel@???> 2008-03-26 22:47:45 ---
(In reply to comment #23)
> This doesn't compile:
>
> /bin/sh ./libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I.     -g -Os
> -c -o pcrecpp.lo pcrecpp.cc
>  g++ -DHAVE_CONFIG_H -I. -g -Os -c pcrecpp.cc  -fno-common -DPIC -o
> .libs/pcrecpp.o
> pcrecpp.cc:74: error: expected `)' before string constant
> pcrecpp.cc:74: error: alias argument not a string

>
> Don't you need to concatenate the macro and the string constant? Otherwise the
> compiler thinks they're separate symbols.
>
> Daniel
>


Hmm. It doesn't matter. I just manually added a "_" to see what happens and got
this:

/bin/sh ./libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I.     -g -Os
-c -o pcrecpp.lo pcrecpp.cc
 g++ -DHAVE_CONFIG_H -I. -g -Os -c pcrecpp.cc  -fno-common -DPIC -o
.libs/pcrecpp.o
pcrecpp.cc:74: error: 'pcrecpp::no_arg' aliased to undefined symbol
'__ZN7pcrecpp2RE6no_argE'
pcrecpp.cc:891: warning: alias definitions not supported in Mach-O; ignored


Daniel


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email