https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82829

Eric Gallager <egallager at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #3 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Rainer Orth from comment #2)
> (In reply to Eric Gallager from comment #0)
> > Trying to build gcc with MacPorts on OS X 10.6 results in the following
> > error in libsanitizer:
> [...]
> > /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.
> > org_macports_release_tarballs_ports_lang_gcc7/libgcc/work/gcc-7.2.0/
> > libsanitizer/asan/asan_mac.cc: In function 'void
> > __asan::AsanApplyToGlobals(__asan::globals_op_fptr, const void*)':
> > /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.
> > org_macports_release_tarballs_ports_lang_gcc7/libgcc/work/gcc-7.2.0/
> > libsanitizer/asan/asan_mac.cc:84:45: error: 'getsectiondata' was not
> > declared in this scope
> >    __asan_global *globals = (__asan_global *)getsectiondata(
> >                                              ^~~~~~~~~~~~~~
> > /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.
> > org_macports_release_tarballs_ports_lang_gcc7/libgcc/work/gcc-7.2.0/
> > libsanitizer/asan/asan_mac.cc:84:45: note: suggested alternative:
> > 'getsectdata'
> >    __asan_global *globals = (__asan_global *)getsectiondata(
> >                                              ^~~~~~~~~~~~~~
> >                                              getsectdata
> 
> I've had a look at Xcode 3.2.6 (the last release that supports Mac OS X
> 10.6),
> and its <mach-o/getsect.h> *does* include getsectiondata declarations. 
> Comparing
> the 10.5 and 10.6 SDKs included in that release, the function was added in
> 10.6.
> 
> Which Xcode version do you have installed?  Maybe you upgraded from 10.5 to
> 10.6
> and forgot to install a corresponding Xcode?
> 
> I've also checked cctools on opensource.apple.com and found that it was added
> between cctools-758 and cctools-773.  However, I've no idea how to determine
> which Xcode releases those correspond to.
> 
> I have no idea if your workaround patch is the right thing, but given how
> difficult it has been to get fixes for older OS X releases upstream, or even
> a statement which versions are supposed to be still supported, the way out is
> probably to disable darwin10 support in libsanitizer/configure.tgt.
> 
> Maybe the Darwin maintainers have some insight?
> 
>   Rainer

Turns out the issue is actually the <mach-o/getsect.h> from the
libmacho-headers MacPorts port is getting picked up before the system one;
guess this is actually a MacPorts issue instead...

Reply via email to