[MacPorts] #36226: libstdcxx @4.7.1: cc1 in stage1 can't be built on PPC Tiger (Mac OS X 10.4.11) due to undefined symbols

MacPorts noreply at macports.org
Thu Aug 29 11:48:20 PDT 2013


#36226: libstdcxx @4.7.1: cc1 in stage1 can't be built on PPC Tiger (Mac OS X
10.4.11) due to undefined symbols
------------------------------+------------------------
  Reporter:  Peter_Dyballa@…  |      Owner:  jeremyhu@…
      Type:  defect           |     Status:  reopened
  Priority:  Normal           |  Milestone:
 Component:  ports            |    Version:  2.1.2
Resolution:                   |   Keywords:
      Port:  libstdcxx        |
------------------------------+------------------------

Comment (by Peter_Dyballa@…):

 Replying to [comment:13 jeremyhu@…]:
 > Hopefully backtrace.c is honoring HAVE_GETIPINFO and we just need to
 figure out why it's not getting set right... weird.

 I think the cause is in this report:

 {{{
 config.log
 ==========
 configure:11652: checking for _Unwind_GetIPInfo
 configure:11667: /opt/local/bin/gcc-apple-4.2 -arch ppc -c -g -H -Wl,-t
 -Werror-implicit-function-declaration  conftest.c >&5
 . /opt/local/lib/apple-gcc42/gcc/powerpc-apple-
 darwin8/4.2.1/include/unwind.h
 powerpc-apple-darwin8-gcc-apple-4.2.1: -t: linker input file unused
 because linking not done
 configure:11667: $? = 0
 configure:11674: result: yes
 }}}

 I patched CFLAGS a bit to see more of the compilation test. I think
 removing the "-c" option would be the proper test.

 I also made this test:

 {{{
 /opt/local/bin/gcc-apple-4.2 -arch ppc -H -Wl,-t -Werror-implicit-
 function-declaration -lgcc_eh conftest.c
 . /opt/local/lib/apple-gcc42/gcc/powerpc-apple-
 darwin8/4.2.1/include/unwind.h
 /usr/lib/crt1.o
 /opt/local/lib/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.1/libgcc_eh.a
 /var/tmp//ccgnzOFc.o
 /usr/lib/libgcc_s.10.4.dylib
 /opt/local/lib/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.1/libgcc.a
 /usr/lib/libSystemStubs.a
 /usr/lib/libSystem.dylib
 /usr/lib/system/libmathCommon.A.dylib
 /opt/local/lib/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.1/libgcc_eh.a
 (unwind-dw2.o)
 ld: warning: object file compiled with -mlong-branch which is no longer
 needed. To remove this warning, recompile without -mlong-branch:
 /usr/lib/crt1.o
 }}}

 I actually don't know what's libgcc_eh.a good for – but it somehow works…

 Here is a bit more documentation from some files as indicated:

 {{{
 ========================================================================================
 *compilation*
 =============
 + CFLAGS=-g -H -Wl,-t -Werror-implicit-function-declaration
 + printf '%s\n' 'configure:11652: checking for _Unwind_GetIPInfo'
 + printf %s 'checking for _Unwind_GetIPInfo... '
 checking for _Unwind_GetIPInfo... + cat confdefs.h -
 + ac_fn_c_try_compile 11667
 + as_lineno=11667
 + as_lineno_stack=as_lineno_stack=
 + rm -f conftest.o
 + ac_try=$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5
 + ac_try_echo=$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5
 + eval 'ac_try_echo="$as_me:11667: $CC -c $CFLAGS $CPPFLAGS
 conftest.$ac_ext >&5"'
 ++ ac_try_echo=configure:11667: /opt/local/bin/gcc-apple-4.2 -arch ppc -c
 -g -H -Wl,-t -Werror-implicit-function-declaration  conftest.c >&5
 + printf '%s\n' 'configure:11667: /opt/local/bin/gcc-apple-4.2 -arch ppc
 -c -g -H -Wl,-t -Werror-implicit-function-declaration  conftest.c >&5'
 + ac_status=0
 + test -s conftest.err
 + grep -v '^ *+' conftest.err
 + cat conftest.er1
 + mv -f conftest.er1 conftest.err
 + printf '%s\n' 'configure:11667: $? = 0'
 + test 0 = 0
 + test -z ''
 + test -s conftest.o
 + :
 + ac_retval=0
 + eval as_lineno_stack=
 ++ as_lineno_stack=
 + test x = x
 + as_lineno=
 + unset as_lineno
 + return 0
 + :
 + have_unwind_getipinfo=yes
 + rm -f core conftest.err conftest.o conftest.c
 + CFLAGS=-g
 + printf '%s\n' 'configure:11674: result: yes'
 + printf '%s\n' yes
 yes
 + test yes = yes
 + printf '%s\n' '#define HAVE_GETIPINFO 1'
 ========================================================================================
 configure
 =========
   CFLAGS="$CFLAGS -H -Wl,-t -Werror-implicit-function-declaration"
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Unwind_GetIPInfo"
 >&5
 $as_echo_n "checking for _Unwind_GetIPInfo... " >&6; }
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include "unwind.h"
         struct _Unwind_Context *context;
         int ip_before_insn = 0;
 int
 main ()
 {
 return _Unwind_GetIPInfo (context, &ip_before_insn);
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
   have_unwind_getipinfo=yes
 else
   have_unwind_getipinfo=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   CFLAGS="$ac_save_CFLAGS"
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_unwind_getipinfo"
 >&5
 $as_echo "$have_unwind_getipinfo" >&6; }
   if test "$have_unwind_getipinfo" = "yes"; then

 $as_echo "#define HAVE_GETIPINFO 1" >>confdefs.h

   fi
 fi
 ========================================================================================
 confdefs.h
 ==========
 | /* confdefs.h */
 | #define PACKAGE_NAME "package-unused"
 | #define PACKAGE_TARNAME "libbacktrace"
 | #define PACKAGE_VERSION "version-unused"
 | #define PACKAGE_STRING "package-unused version-unused"
 | #define PACKAGE_BUGREPORT ""
 | #define PACKAGE_URL ""
 | #define STDC_HEADERS 1
 | #define HAVE_SYS_TYPES_H 1
 | #define HAVE_SYS_STAT_H 1
 | #define HAVE_STDLIB_H 1
 | #define HAVE_STRING_H 1
 | #define HAVE_MEMORY_H 1
 | #define HAVE_STRINGS_H 1
 | #define HAVE_INTTYPES_H 1
 | #define HAVE_STDINT_H 1
 | #define HAVE_UNISTD_H 1
 | #define __EXTENSIONS__ 1
 | #define _ALL_SOURCE 1
 | #define _GNU_SOURCE 1
 | #define _POSIX_PTHREAD_SEMANTICS 1
 | #define _TANDEM_SOURCE 1
 | #define HAVE_DLFCN_H 1
 | #define LT_OBJDIR ".libs/"
 | #define HAVE_GETIPINFO 1
 | #define HAVE_SYNC_FUNCTIONS 1
 | #define BACKTRACE_ELF_SIZE
 | /* end confdefs.h.  */
 ========================================================================================
 }}}

 This contents of confdefs.h is revealed a bit later. Presumingly the test
 for Unwind_GetIPInfo contained only the lines up to

 {{{
 | #define HAVE_GETIPINFO 1
 }}}

 I think I've done with the examination of the *compilation* buffer in GNU
 Emacs now, so I'm going to change my patch and I'll try to remove the "-c"
 and see what I'll get – in one or two days…

-- 
Ticket URL: <https://trac.macports.org/ticket/36226#comment:14>
MacPorts <http://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list