Monty Taylor wrote:
> Kenton Varda wrote:
>> I'm pretty sure #1 is not protobuf's fault.  I've never heard of
>> libgcc_s which means it's probably something GCC links against
>> implicitly.  And anyway, if exists, there should always
>> be a symlink to it... right?
> Sorry - I haven't done any testing with gcc 3.4 on Solaris of any sort.
> I'm only building with either Sun Studio or gcc 4.4. I agree it sounds
> like something weird, but I don't have any info. I _do_ know that the
> out-of-the-box gcc install on solaris is rather broken in a few ways.
> (/me asks people to ignore that he works for Sun as he says that)
> Any chance you can use Sun Studio for your work instead of gcc?

Not really..

But it's no big deal, I added the symlink and it started working fine. I
wouldn't be surprised if it was just a broken install as you say.

>> I tracked this down to:
>> - predeps_objects_CXX is being set incorrectly in configure because ..
>> - output_verbose_link_command is doing a 32-bit link because ..
>> - it uses CFLAGS and CFLAGS does not contain "-m64" because ..
>> - the handling of --{en,dis}sable-64bit-solaris only puts "-m64" in
>> CXXFLAGS, and not also in CFLAGS
> Very odd. CFLAGS shouldn't matter because there is no non-C++ code
> anywhere. (I specifically left CFLAGS off, although I suppose it
> wouldn't hurt anything to add it.) Any chance in your tracking it down
> you could tell me more info about why predeps_objects_CXX depends on
> settings from CFLAGS?

I just worked backwards through what configure was doing. Sorry, not
familiar enough with autoconf to work out exactly which bits of the M4
this is coming from. The line numbers below are from a vanilla configure
as shipped with 2.2.0.

predeps_objects_CXX is set via configure:13808 or so. It looks like this:

- set various predeps_* and postdeps_* vars to empty
- compile a small C++ conftest
- run $output_verbose_link_cmd to generate a link line for the conftest
and look at the output (configure:13841)
- pull libraries and object files out of the output and set vars accordingly

output_verbose_link for Solaris is set via a block starting at
configure:13653 or so. It does this:

# GNU C++ compiler with Solaris linker
# ...
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 |
$GREP "\-L"'

So the conftest is linked with CFLAGS, not CXXFLAGS, and the resulting
link line will be for a 32-bit binary since -m64 isn't in CFLAGS.


You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to