[MacPorts] #53726: libgcc / gcc fails to build against SDK (i.e. without system headers installed)

MacPorts noreply at macports.org
Wed Mar 8 15:34:02 UTC 2017


#53726: libgcc / gcc fails to build against SDK (i.e. without system headers
installed)
-----------------------+----------------------
  Reporter:  jeremyhu  |      Owner:  jeremyhu
      Type:  defect    |     Status:  new
  Priority:  Normal    |  Milestone:
 Component:  ports     |    Version:
Resolution:            |   Keywords:
      Port:  libgcc    |
-----------------------+----------------------

Comment (by kencu):

 Something about this change appears to have broken the build of gcc48
 (presently I'm doing this on 10.6 with Libcxx), working on fixing the
 gcc48 build with the new texinfo and new isl. With this change, this error
 comes up:
 {{{

 rm -f libgcov.a
 objects="_gcov.o _gcov_merge_add.o _gcov_merge_single.o
 _gcov_merge_delta.o _gcov_fork.o _gcov_execl.o _gcov_execlp.o
 _gcov_execle.o _gcov_execv.o _gcov_execvp.o _gcov_execve.o _gcov_reset.o
 _gcov_dump.o _gcov_interval_profiler.o _gcov_pow2_profiler.o
 _gcov_one_value_profiler.o _gcov_indirect_call_profiler.o
 _gcov_average_profiler.o _gcov_ior_profiler.o _gcov_merge_ior.o";
 \
         if test -z "$objects"; then                             \
           echo 'int __libgcc_eh_dummy;' > eh_dummy.c;           \
           /opt/local/var/macports/build/_opt_macports-
 ports_lang_gcc48/gcc48/work/build/./gcc/xgcc
 -B/opt/local/var/macports/build/_opt_macports-
 ports_lang_gcc48/gcc48/work/build/./gcc/ -B/opt/local/x86_64-apple-
 darwin10/bin/ -B/opt/local/x86_64-apple-darwin10/lib/ -isystem
 /opt/local/x86_64-apple-darwin10/include -isystem /opt/local/x86_64-apple-
 darwin10/sys-include    -g -O2 -pipe -Os -O2  -g -O2 -pipe -Os -DIN_GCC
 -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes
 -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -pipe
 -fno-common -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -pipe
 -fno-common -I. -I. -I../.././gcc -I/opt/local/var/macports/build
 /_opt_macports-ports_lang_gcc48/gcc48/work/gcc-4.8.5/libgcc
 -I/opt/local/var/macports/build/_opt_macports-
 ports_lang_gcc48/gcc48/work/gcc-4.8.5/libgcc/.
 -I/opt/local/var/macports/build/_opt_macports-
 ports_lang_gcc48/gcc48/work/gcc-4.8.5/libgcc/../gcc
 -I/opt/local/var/macports/build/_opt_macports-
 ports_lang_gcc48/gcc48/work/gcc-4.8.5/libgcc/../include  -DHAVE_CC_TLS
 -DUSE_EMUTLS -fvisibility=hidden -DHIDE_EXPORTS -c eh_dummy.c
 \
              -o eh_dummy.o;                             \
           objects=eh_dummy.o;                           \
         fi;                                                     \
         /opt/local/bin/ar  rc libgcov.a $objects
 ld: file not found: non-weak
 collect2: error: ld returned 1 exit status
 make[3]: *** [libgcc_s.dylib] Error 1
 }}}
 removing this change, this error disappears and the build proceeds:
 {{{

 rm -f libgcov.a
 objects="_gcov.o _gcov_merge_add.o _gcov_merge_single.o
 _gcov_merge_delta.o _gcov_fork.o _gcov_execl.o _gcov_execlp.o
 _gcov_execle.o _gcov_execv.o _gcov_execvp.o _gcov_execve.o _gcov_reset.o
 _gcov_dump.o _gcov_interval_profiler.o _gcov_pow2_profiler.o
 _gcov_one_value_profiler.o _gcov_indirect_call_profiler.o
 _gcov_average_profiler.o _gcov_ior_profiler.o _gcov_merge_ior.o";
 \
         if test -z "$objects"; then                             \
           echo 'int __libgcc_eh_dummy;' > eh_dummy.c;           \
           /opt/local/var/macports/build/_opt_macports-
 ports_lang_gcc48/gcc48/work/build/./gcc/xgcc
 -B/opt/local/var/macports/build/_opt_macports-
 ports_lang_gcc48/gcc48/work/build/./gcc/ -B/opt/local/x86_64-apple-
 darwin10/bin/ -B/opt/local/x86_64-apple-darwin10/lib/ -isystem
 /opt/local/x86_64-apple-darwin10/include -isystem /opt/local/x86_64-apple-
 darwin10/sys-include    -g -O2 -pipe -Os -O2  -g -O2 -pipe -Os -DIN_GCC
 -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes
 -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -pipe
 -fno-common -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -pipe
 -fno-common -I. -I. -I../.././gcc -I/opt/local/var/macports/build
 /_opt_macports-ports_lang_gcc48/gcc48/work/gcc-4.8.5/libgcc
 -I/opt/local/var/macports/build/_opt_macports-
 ports_lang_gcc48/gcc48/work/gcc-4.8.5/libgcc/.
 -I/opt/local/var/macports/build/_opt_macports-
 ports_lang_gcc48/gcc48/work/gcc-4.8.5/libgcc/../gcc
 -I/opt/local/var/macports/build/_opt_macports-
 ports_lang_gcc48/gcc48/work/gcc-4.8.5/libgcc/../include  -DHAVE_CC_TLS
 -DUSE_EMUTLS -fvisibility=hidden -DHIDE_EXPORTS -c eh_dummy.c
 \
              -o eh_dummy.o;                             \
           objects=eh_dummy.o;                           \
         fi;                                                     \
         /opt/local/bin/ar  rc libgcov.a $objects
 /opt/local/bin/ranlib libgcov.a
 }}}

 with so many changes coming in to affect the build of gcc48 without
 previous errors being fixed, it is getting a little tricky.

--
Ticket URL: <https://trac.macports.org/ticket/53726#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list