Opened 11 years ago

Closed 11 years ago

#38934 closed defect (fixed)

libstdcxx 4.8-20130411 fails to build on PPC Tiger because of overloaded function

Reported by: ballapete (Peter "Pete" Dyballa) Owned by: mww@…
Priority: Normal Milestone:
Component: ports Version: 2.1.3
Keywords: Cc: jeremyhu (Jeremy Huddleston Sequoia)
Port: libstdcxx

Description

The cause is here:

/usr/bin/g++-3.3 -c   -pipe -O2 -DIN_GCC   -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wwrite-strings -Wcast-qual -Wmissing-format-attribute   -DHAVE_CONFIG_H -I. -I. -I../../gcc-4.8-20130411/gcc -I../../gcc-4.8-20130411/gcc/. -I../../gcc-4.8-20130411/gcc/../include -I../../gcc-4.8-20130411/gcc/../libcpp/include -I/opt/local/include -I/opt/local/include -I/opt/local/include  -I../../gcc-4.8-20130411/gcc/../libdecnumber -I../../gcc-4.8-20130411/gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc-4.8-20130411/gcc/../libbacktrace -DCLOOG_INT_GMP -I/opt/local/include  -I/opt/local/include gtype-desc.c -o gtype-desc.o
In file included from gtype-desc.c:54:
../../gcc-4.8-20130411/gcc/lto-streamer.h: In function `int 
   lto_symtab_encoder_lookup(lto_symtab_encoder_d*, symtab_node_def*)':
../../gcc-4.8-20130411/gcc/lto-streamer.h:1013: warning: argument of negative 
   value `-1' to `long unsigned int'
gtype-desc.c: In function `void gt_ggc_mx(size_time_entry&)':
gtype-desc.c:93: warning: unused variable `size_time_entry*x'
gtype-desc.c: In function `void gt_pch_nx(size_time_entry&)':
gtype-desc.c:3007: warning: unused variable `size_time_entry*x'
gtype-desc.c: In function `void gt_pch_nx(size_time_entry*, void (*)(void*, 
   void*), void*)':
gtype-desc.c:5925: warning: unused parameter `size_time_entry*x'
gtype-desc.c:5925: warning: unused parameter `void (*op)(void*, void*)'
gtype-desc.c:5925: warning: unused parameter `void*cookie'
gtype-desc.c: In function `void gt_pch_p_11stack_usage(void*, void*, void 
   (*)(void*, void*), void*)':
gtype-desc.c:6928: warning: unused variable `stack_usage*x'
gtype-desc.c:6927: warning: unused parameter `void*this_obj'
gtype-desc.c:6927: warning: unused parameter `void (*op)(void*, void*)'
gtype-desc.c:6927: warning: unused parameter `void*cookie'
gtype-desc.c: In function `void gt_pch_p_11fixed_value(void*, void*, void 
   (*)(void*, void*), void*)':
gtype-desc.c:7234: warning: unused variable `fixed_value*x'
gtype-desc.c:7233: warning: unused parameter `void*this_obj'
gtype-desc.c:7233: warning: unused parameter `void (*op)(void*, void*)'
gtype-desc.c:7233: warning: unused parameter `void*cookie'
gtype-desc.c: In function `void gt_pch_p_10real_value(void*, void*, void 
   (*)(void*, void*), void*)':
gtype-desc.c:7243: warning: unused variable `real_value*x'
gtype-desc.c:7242: warning: unused parameter `void*this_obj'
gtype-desc.c:7242: warning: unused parameter `void (*op)(void*, void*)'
gtype-desc.c:7242: warning: unused parameter `void*cookie'
gtype-desc.c: In function `void gt_pch_p_8edge_def(void*, void*, void 
   (*)(void*, void*), void*)':
gtype-desc.c:7362: warning: unused variable `edge_def*x'
gtype-desc.c:7361: warning: unused parameter `void*this_obj'
gtype-desc.c:7361: warning: unused parameter `void (*op)(void*, void*)'
gtype-desc.c:7361: warning: unused parameter `void*cookie'
gtype-desc.c: In function `void gt_ggc_ma_regno_reg_rtx(void*)':
gtype-desc.c:9616: warning: unused parameter `void*x_p'
gtype-desc.c: In function `void gt_pch_pa_regno_reg_rtx(void*, void*, void 
   (*)(void*, void*), void*)':
gtype-desc.c:9632: warning: unused parameter `void*x_p'
gtype-desc.c: In function `void gt_pch_na_regno_reg_rtx(void*)':
gtype-desc.c:9647: warning: unused parameter `void*x_p'
../../gcc-4.8-20130411/gcc/vec.h: In function `void gt_ggc_mx(vec<T, va_gc, 
   vl_embed>*) [with T = edge_def*]':
gtype-desc.c:833:   instantiated from here
../../gcc-4.8-20130411/gcc/vec.h:1140: error: call of overloaded `gt_ggc_mx(
   edge_def*&)' is ambiguous
../../gcc-4.8-20130411/gcc/vec.h:1138: error: candidates are: void 
   gt_ggc_mx(T&) [with T = edge_def*]
gtype-desc.c:839: error:                 void gt_ggc_mx(edge_def*&)
../../gcc-4.8-20130411/gcc/basic-block.h:65: error:                 void 
   gt_ggc_mx(edge_def*)
../../gcc-4.8-20130411/gcc/vec.h: In function `void gt_pch_nx(vec<T, A, 
   vl_embed>*) [with T = edge_def*, A = va_gc]':
gtype-desc.c:3747:   instantiated from here
../../gcc-4.8-20130411/gcc/vec.h:1160: error: call of overloaded `gt_pch_nx(
   edge_def*&)' is ambiguous
../../gcc-4.8-20130411/gcc/vec.h:1158: error: candidates are: void 
   gt_pch_nx(T&) [with T = edge_def*, A = va_gc]
gtype-desc.c:3753: error:                 void gt_pch_nx(edge_def*&)
../../gcc-4.8-20130411/gcc/basic-block.h:66: error:                 void 
   gt_pch_nx(edge_def*)
make[2]: *** [gtype-desc.o] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_lang_gcc48/libstdcxx/work/build/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_lang_gcc48/libstdcxx/work/build'
make: *** [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_lang_gcc48/libstdcxx/work/build'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_lang_gcc48/libstdcxx/work/build" && /usr/bin/make -w all 
Exit code: 2
Error: org.macports.build for port libstdcxx returned: command execution failed

Is GCC 4.0 or GCC 4.2 needed? Could llvm-2.9 perform the job?

Attachments (2)

main.log (682.1 KB) - added by ballapete (Peter "Pete" Dyballa) 11 years ago.
main.2.log (580.3 KB) - added by ballapete (Peter "Pete" Dyballa) 11 years ago.
main.log with port 2.1.99, Revision 105643

Download all attachments as: .zip

Change History (22)

Changed 11 years ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.log added

comment:1 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: jeremyhu@… added; mww@… removed
Owner: changed from macports-tickets@… to mww@…

comment:2 Changed 11 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Peter, please update to base trunk if you're going to be trying out Tiger/ppc.

No, I suspect llvm-2.9 will fail miserably because you're on ppc.

Yes, I suspect applc-gcc-4.2 is needed.

comment:3 in reply to:  2 ; Changed 11 years ago by ballapete (Peter "Pete" Dyballa)

Replying to jeremyhu@…:

Peter, please update to base trunk if you're going to be trying out Tiger/ppc.

What is this "base trunk"? Is it somewhere documented?

comment:4 Changed 11 years ago by Veence (Vincent)

You cannot use gcc3 series to build modern gcc > 4.5 libraries. Your best move would be to install gcc45 first, then use gcc45 as a compiler to compile a more modern gcc using the configure.compiler inline option :

port install libstdcxx configure.compiler=macports-gcc-4.5

Viel Glück!

Last edited 11 years ago by Veence (Vincent) (previous) (diff)

comment:5 in reply to:  2 Changed 11 years ago by ballapete (Peter "Pete" Dyballa)

Replying to jeremyhu@…:

Yes, I suspect applc-gcc-4.2 is needed.

I tried with

port install libstdcxx configure.compiler=apple-gcc-4.2

which lead to a somehow familiar error, one that I met when I tried to build on Snow Leopard software that would also run on Tiger:

/opt/local/bin/g++-apple-4.2 -c  -DIN_GCC_FRONTEND -pipe -O2 -DIN_GCC   -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -I. -I. -I../../gcc-4.8-20130411/gcc -I../../gcc-4.8-20130411/gcc/. -I../../gcc-4.8-20130411/gcc/../include -I../../gcc-4.8-20130411/gcc/../libcpp/include -I/opt/local/include -I/opt/local/include -I/opt/local/include  -I../../gcc-4.8-20130411/gcc/../libdecnumber -I../../gcc-4.8-20130411/gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc-4.8-20130411/gcc/../libbacktrace -DCLOOG_INT_GMP -I/opt/local/include  -I/opt/local/include cc1-checksum.c -o cc1-checksum.o
/opt/local/bin/g++-apple-4.2   -pipe -O2 -DIN_GCC   -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -L/opt/local/lib -o cc1 c/c-lang.o c-family/stub-objc.o attribs.o c/c-errors.o c/c-decl.o c/c-typeck.o c/c-convert.o c/c-aux-info.o c/c-objc-common.o c/c-parser.o c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o c-family/c-format.o c-family/c-gimplify.o c-family/c-lex.o c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o c-family/c-ppoutput.o c-family/c-pragma.o c-family/c-pretty-print.o c-family/c-semantics.o c-family/c-ada-spec.o tree-mudflap.o darwin-c.o rs6000-c.o \
  cc1-checksum.o libbackend.a main.o  libcommon-target.a libcommon.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a ../libcpp/libcpp.a  -liconv ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a  -L/opt/local/lib -lcloog-isl  -lisl -L/opt/local/lib -L/opt/local/lib -L/opt/local/lib -lmpc -lmpfr -lgmp   -lz
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
ld: warning: object file compiled with -mlong-branch which is no longer needed. To remove this warning, recompile without -mlong-branch: /opt/local/lib/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.1/crt3.o
Undefined symbols:
  "__Unwind_GetIPInfo", referenced from:
      _unwind in libbacktrace.a(backtrace.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [cc1] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_lang_gcc48/libstdcxx/work/build/gcc'

This -mlong-branch flag is disturbing quite often. How can I build sane crt1.o and crt3.o object files for GCC 4.2 with MacPorts?

comment:6 Changed 11 years ago by Veence (Vincent)

You can’t. crt1.o is a standard preamble snippet tied to apple gcc-4.2. If you want to get rid of this warning, you have no choice but building a new compiler and using it.

comment:7 in reply to:  4 Changed 11 years ago by ballapete (Peter "Pete" Dyballa)

Replying to vince@…:

You cannot use gcc3 series to build modern gcc > 4.5 libraries. Your best move would be to install gcc45 first, then use gcc45 as a compiler to compile a more modern gcc using the configure.compiler inline option :

port install libstdcxx configure.compiler=macports-gcc-4.5

I have installed

  apple-gcc42 @5666.3_10 (active)
  gcc43 @4.3.6_7 (active)
  libstdcxx @4.7.2_2 (active)

Gcc43 seems to pretty useless, since

port dependents gcc43

reports

gcc43 has no dependents.

And since libstdcxx from GCC 4.7.2 could be built, with GCC 4.2, then I would prefer to install gcc47. Or even gcc48 or later…

comment:8 in reply to:  6 Changed 11 years ago by ballapete (Peter "Pete" Dyballa)

Replying to vince@…:

You can’t. crt1.o is a standard preamble snippet tied to apple gcc-4.2. If you want to get rid of this warning, you have no choice but building a new compiler and using it.

Exactly this was my question: How can I rebuild the gcc42 package with MacPorts in a way that this flag does not gets used?

Outside of MacPorts I seem to have had some success…

comment:9 in reply to:  3 ; Changed 11 years ago by larryv (Lawrence Velázquez)

Replying to Peter_Dyballa@…:

What is this "base trunk"? Is it somewhere documented?

It is mentioned in the Guide and on the wiki.

comment:10 in reply to:  4 Changed 11 years ago by ballapete (Peter "Pete" Dyballa)

Replying to vince@…:

You cannot use gcc3 series to build modern gcc > 4.5 libraries. Your best move would be to install gcc45 first, then use gcc45 as a compiler to compile a more modern gcc using the configure.compiler inline option :

Building gcc45 or any other gcc4x package fails because every such package depends on libstdcxx @4.8-20130411…

comment:11 in reply to:  9 Changed 11 years ago by ballapete (Peter "Pete" Dyballa)

Replying to larryv@…:

Replying to Peter_Dyballa@…:

What is this "base trunk"? Is it somewhere documented?

It is mentioned in the Guide and on the wiki.

This sounds as if I would need to install MacPorts a second time, now using that subversion command (and I have subversion @1.7.9_1 active) and possibly having a new PATH setting. Or will the software from mports just overwrite the recent port software and leave everything else intact and as is?

comment:12 Changed 11 years ago by jeremyhu (Jeremy Huddleston Sequoia)

You just need to update base, not all of your ports.

comment:13 in reply to:  2 Changed 11 years ago by ballapete (Peter "Pete" Dyballa)

Replying to jeremyhu@…:

Peter, please update to base trunk if you're going to be trying out Tiger/ppc.

The build fails here:

===> making all in src/registry2.0
gcc -c -DUSE_TCL_STUBS -DTCL_NO_DEPRECATED -g -O2 -Wextra -Wall -pedantic   -DHAVE_CONFIG_H -I.. -I.  -I"/usr/include" -fno-common registry.c -o registry.o
gcc -c -DUSE_TCL_STUBS -DTCL_NO_DEPRECATED -g -O2 -Wextra -Wall -pedantic   -DHAVE_CONFIG_H -I.. -I.  -I"/usr/include" -fno-common util.c -o util.o
gcc -c -DUSE_TCL_STUBS -DTCL_NO_DEPRECATED -g -O2 -Wextra -Wall -pedantic   -DHAVE_CONFIG_H -I.. -I.  -I"/usr/include" -fno-common entry.c -o entry.o
gcc -c -DUSE_TCL_STUBS -DTCL_NO_DEPRECATED -g -O2 -Wextra -Wall -pedantic   -DHAVE_CONFIG_H -I.. -I.  -I"/usr/include" -fno-common entryobj.c -o entryobj.o
gcc -c -DUSE_TCL_STUBS -DTCL_NO_DEPRECATED -g -O2 -Wextra -Wall -pedantic   -DHAVE_CONFIG_H -I.. -I.  -I"/usr/include" -fno-common file.c -o file.o
gcc -c -DUSE_TCL_STUBS -DTCL_NO_DEPRECATED -g -O2 -Wextra -Wall -pedantic   -DHAVE_CONFIG_H -I.. -I.  -I"/usr/include" -fno-common fileobj.c -o fileobj.o
cc -dynamiclib  registry.o util.o entry.o entryobj.o file.o fileobj.o ../cregistry/cregistry.a -o registry.dylib -L/System/Library/Frameworks/Tcl.framework/Versions/8.4 -ltclstub8.4   -lsqlite3
===> making all in src/darwintracelib1.0
gcc -g -O2 -Wextra -Wall   -fPIC -Wno-deprecated-declarations -DHAVE_CONFIG_H -I.. -I.  -I"/usr/include"  -c -o darwintrace.o darwintrace.c
darwintrace.c:1106: error: ‘__DARWIN_MAXPATHLEN’ undeclared here (not in a function)
darwintrace.c: In function ‘__getdirentries64’:
darwintrace.c:1111: error: ‘SYS_getdirentries64’ undeclared (first use in this function)
darwintrace.c:1111: error: (Each undeclared identifier is reported only once
darwintrace.c:1111: error: for each function it appears in.)
make[2]: *** [darwintrace.o] Error 1
make[1]: *** [all] Error 1

comment:14 Changed 11 years ago by jmroot (Joshua Root)

That would have been introduced in r100073. Open a separate ticket against base and Cc cal.

comment:15 in reply to:  2 Changed 11 years ago by ballapete (Peter "Pete" Dyballa)

Replying to jeremyhu@…:

Peter, please update to base trunk if you're going to be trying out Tiger/ppc.

I've done so, but I don't see any change. I still see the same failures. None of the outdated packages can be upgraded:

gtk2                           2.24.16_0 < 2.24.17_1     
libgsf                         1.14.25_0 < 1.14.26_1     
libstdcxx                      4.7.2_2 < 4.8-20130411_0   
xorg-server-devel              1.12.99.0_3 < 1.14.99.0_0   

gtk2 and libgsf seem to have problems with updated gobject-introspection @1.36.0_0, which might be solved some day.

comment:16 Changed 11 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Please provide the new main.log for libstdcxx which shows your problem, and open tickets for the other projects that are failing if you haven't already.

Changed 11 years ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.2.log added

main.log with port 2.1.99, Revision 105643

comment:17 in reply to:  16 ; Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to jeremyhu@…:

Please provide the new main.log for libstdcxx which shows your problem, and open tickets for the other projects that are failing if you haven't already.

The new log says:

:info:build Undefined symbols:
:info:build   "__Unwind_GetIPInfo", referenced from:
:info:build       _unwind in libbacktrace.a(backtrace.o)
:info:build ld: symbol(s) not found

Several hits on Google for __Unwind_GetIPInfo-related problems over the years.

comment:18 in reply to:  17 ; Changed 11 years ago by ballapete (Peter "Pete" Dyballa)

Replying to ryandesign@…:

Replying to jeremyhu@…:

Several hits on Google for __Unwind_GetIPInfo-related problems over the years.

The few unique entries seem to suggest that a patch for configure scripts exists here: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=141805, and that the problem seems to have been fixed with the GCC 4.4.0 release.

So it might be worth to try the built with the last release of GCC 4.4.x… (or install a GCC 4.2.1 with the patched configure scripts)

comment:19 in reply to:  18 Changed 11 years ago by ballapete (Peter "Pete" Dyballa)

Replying to Peter_Dyballa@…:

So it might be worth to try the built with the last release of GCC 4.4.x… (or install a GCC 4.2.1 with the patched configure scripts)

Silly idea: all gcc4x packages depend on libstdcxx 4.8-20130411 or whatever is elected…

comment:20 Changed 11 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Resolution: fixed
Status: newclosed

This should be fixed with the libgcc.patch in #38814 which will be landing shortly.

Note: See TracTickets for help on using tickets.