[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
Fri Aug 30 15:23:07 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:26 jeremyhu@…]:
> Yeah, you can do that, but I'd rather know the underlying problem of
where it's getting the prototype from.
>
> Can you please manually create the conftest.c as described in
config.log, then compile it manually using the compile line mentioned in
config.log?
This file has:
{{{
configure:11652: checking for _Unwind_GetIPInfo
configure:11667: /opt/local/bin/gcc-apple-4.2 -arch ppc -c -g -Werror-
implicit-function-declaration conftest.c >&5
configure:11667: $? = 0
configure:11674: result: yes
}}}
so there is no report of the actual contents of conftest.c. A bit later it
has:
{{{
configure:11811: checking for uintmax_t
configure:11811: /opt/local/bin/gcc-apple-4.2 -arch ppc -c -g conftest.c
>&5
configure:11811: $? = 0
configure:11811: /opt/local/bin/gcc-apple-4.2 -arch ppc -c -g conftest.c
>&5
conftest.c: In function 'main':
conftest.c:35: error: expected expression before ')' token
configure:11811: $? = 1
configure: failed program was:
| /* 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. */
| #include <sys/types.h>
| #include <stdint.h>
|
| int
| main ()
| {
| if (sizeof ((uintmax_t)))
| return 0;
| ;
| return 0;
| }
configure:11811: result: yes
}}}
(which looks to me a bit strange [double compile test on the same line?]
and absurd [failure == yes]). The configure script has:
{{{
if test -n "${with_target_subdir}"; then
# Check whether --with-system-libunwind was given.
if test "${with_system_libunwind+set}" = set; then :
withval=$with_system_libunwind;
fi
# If system-libunwind was not specifically set, pick a default setting.
if test x$with_system_libunwind = x; then
case ${target} in
ia64-*-hpux*) with_system_libunwind=yes ;;
*) with_system_libunwind=no ;;
esac
fi
# Based on system-libunwind and target, do we have ipinfo?
if test x$with_system_libunwind = xyes; then
case ${target} in
ia64-*-*) have_unwind_getipinfo=no ;;
*) have_unwind_getipinfo=yes ;;
esac
else
# Darwin before version 9 does not have _Unwind_GetIPInfo.
case ${target} in
*-*-darwin[3-8]|*-*-darwin[3-8].*) have_unwind_getipinfo=no ;;
*) have_unwind_getipinfo=yes ;;
esac
fi
if test x$have_unwind_getipinfo = xyes; then
$as_echo "#define HAVE_GETIPINFO 1" >>confdefs.h
fi
else
ac_save_CFFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -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
}}}
(which hopefully is complete). So presumingly conftest.c for the
_Unwind_GetIPInfo test was:
{{{
/* 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
/* 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;
}
}}}
>
> Use that as the reduced state to debug the problem from.
>
> I'd suggest using -E to preprocess conftest.c and then grep through the
output to find out which file is providing the prototype.
I did
{{{
/opt/local/bin/gcc-apple-4.2 -arch ppc -E -g -Werror-implicit-function-
declaration conftest.c
}}}
and got:
{{{
# 1 "conftest.c"
# 1
"/opt/local/var/macports/build/_opt_mports_trunk_dports_lang_gcc48/work//"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "conftest.c"
# 27 "conftest.c"
# 1 "/opt/local/lib/apple-gcc42/gcc/powerpc-apple-
darwin8/4.2.1/include/unwind.h" 1 3 4
# 35 "/opt/local/lib/apple-gcc42/gcc/powerpc-apple-
darwin8/4.2.1/include/unwind.h" 3 4
#pragma GCC visibility push(default)
# 46 "/opt/local/lib/apple-gcc42/gcc/powerpc-apple-
darwin8/4.2.1/include/unwind.h" 3 4
typedef unsigned _Unwind_Word __attribute__((__mode__(__word__)));
typedef signed _Unwind_Sword __attribute__((__mode__(__word__)));
typedef unsigned _Unwind_Ptr __attribute__((__mode__(__pointer__)));
typedef unsigned _Unwind_Internal_Ptr
__attribute__((__mode__(__pointer__)));
typedef unsigned _Unwind_Exception_Class
__attribute__((__mode__(__DI__)));
typedef enum
{
_URC_NO_REASON = 0,
_URC_FOREIGN_EXCEPTION_CAUGHT = 1,
_URC_FATAL_PHASE2_ERROR = 2,
_URC_FATAL_PHASE1_ERROR = 3,
_URC_NORMAL_STOP = 4,
_URC_END_OF_STACK = 5,
_URC_HANDLER_FOUND = 6,
_URC_INSTALL_CONTEXT = 7,
_URC_CONTINUE_UNWIND = 8
} _Unwind_Reason_Code;
# 83 "/opt/local/lib/apple-gcc42/gcc/powerpc-apple-
darwin8/4.2.1/include/unwind.h" 3 4
struct _Unwind_Exception;
typedef void (*_Unwind_Exception_Cleanup_Fn) (_Unwind_Reason_Code,
struct _Unwind_Exception *);
struct _Unwind_Exception
{
_Unwind_Exception_Class exception_class;
_Unwind_Exception_Cleanup_Fn exception_cleanup;
_Unwind_Word private_1;
_Unwind_Word private_2;
} __attribute__((__aligned__));
typedef int _Unwind_Action;
# 115 "/opt/local/lib/apple-gcc42/gcc/powerpc-apple-
darwin8/4.2.1/include/unwind.h" 3 4
struct _Unwind_Context;
extern _Unwind_Reason_Code _Unwind_RaiseException (struct
_Unwind_Exception *);
typedef _Unwind_Reason_Code (*_Unwind_Stop_Fn)
(int, _Unwind_Action, _Unwind_Exception_Class,
struct _Unwind_Exception *, struct _Unwind_Context *, void *);
extern _Unwind_Reason_Code _Unwind_ForcedUnwind (struct _Unwind_Exception
*,
_Unwind_Stop_Fn,
void *);
extern void _Unwind_DeleteException (struct _Unwind_Exception *);
extern void _Unwind_Resume (struct _Unwind_Exception *);
extern _Unwind_Reason_Code _Unwind_Resume_or_Rethrow (struct
_Unwind_Exception *);
typedef _Unwind_Reason_Code (*_Unwind_Trace_Fn)
(struct _Unwind_Context *, void *);
extern _Unwind_Reason_Code _Unwind_Backtrace (_Unwind_Trace_Fn, void *);
extern _Unwind_Word _Unwind_GetGR (struct _Unwind_Context *, int);
extern void _Unwind_SetGR (struct _Unwind_Context *, int, _Unwind_Word);
extern _Unwind_Ptr _Unwind_GetIP (struct _Unwind_Context *);
extern _Unwind_Ptr _Unwind_GetIPInfo (struct _Unwind_Context *, int *);
extern void _Unwind_SetIP (struct _Unwind_Context *, _Unwind_Ptr);
extern _Unwind_Word _Unwind_GetCFA (struct _Unwind_Context *);
extern void *_Unwind_GetLanguageSpecificData (struct _Unwind_Context *);
extern _Unwind_Ptr _Unwind_GetRegionStart (struct _Unwind_Context *);
# 185 "/opt/local/lib/apple-gcc42/gcc/powerpc-apple-
darwin8/4.2.1/include/unwind.h" 3 4
typedef _Unwind_Reason_Code (*_Unwind_Personality_Fn)
(int, _Unwind_Action, _Unwind_Exception_Class,
struct _Unwind_Exception *, struct _Unwind_Context *);
struct SjLj_Function_Context;
extern void _Unwind_SjLj_Register (struct SjLj_Function_Context *);
extern void _Unwind_SjLj_Unregister (struct SjLj_Function_Context *);
extern _Unwind_Reason_Code _Unwind_SjLj_RaiseException
(struct _Unwind_Exception *);
extern _Unwind_Reason_Code _Unwind_SjLj_ForcedUnwind
(struct _Unwind_Exception *, _Unwind_Stop_Fn, void *);
extern void _Unwind_SjLj_Resume (struct _Unwind_Exception *);
extern _Unwind_Reason_Code _Unwind_SjLj_Resume_or_Rethrow (struct
_Unwind_Exception *);
# 227 "/opt/local/lib/apple-gcc42/gcc/powerpc-apple-
darwin8/4.2.1/include/unwind.h" 3 4
extern _Unwind_Ptr _Unwind_GetDataRelBase (struct _Unwind_Context *);
extern _Unwind_Ptr _Unwind_GetTextRelBase (struct _Unwind_Context *);
extern void * _Unwind_FindEnclosingFunction (void *pc);
#pragma GCC visibility pop
# 28 "conftest.c" 2
struct _Unwind_Context *context;
int ip_before_insn = 0;
int
main ()
{
return _Unwind_GetIPInfo (context, &ip_before_insn);
;
return 0;
}
}}}
>
> Also, please provide the output of echo | gcc-apple-4.2 -E -dM - | grep
VERSION_MIN' on your system. I want to confirm that the deployment target
is set right.
The output is:
{{{
#define __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ 1040
}}}
--
Ticket URL: <https://trac.macports.org/ticket/36226#comment:27>
MacPorts <http://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list