Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 491580 - Prefix bootstrap fails on Mac OS 10.9/Mavericks whilst building binutils-apple...
Summary: Prefix bootstrap fails on Mac OS 10.9/Mavericks whilst building binutils-appl...
Status: RESOLVED DUPLICATE of bug 491098
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: AMD64 OS X
: Normal major (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-18 13:10 UTC by Stuart Shelton
Modified: 2013-11-21 14:47 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log from failing binutils-apple build during prefix bootstrap (file_491580.txt,52.47 KB, text/plain)
2013-11-18 13:23 UTC, Stuart Shelton
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stuart Shelton 2013-11-18 13:10:08 UTC
... which is interesting, as building binutils-apple succeeds from an existing prefix instance.

With command '/opt/gentoo-mavericks/bin/bash ./bootstrap-prefix.sh "/opt/gentoo-mavericks" stage3':

>>> Compiling source in /opt/gentoo-mavericks/var/tmp/portage/sys-devel/binutils-apple-4.3/work ...
 * building ld64-128.2
make -j3 LTO=0 CFLAGS=-march=nocona 'CXXFLAGS= -I../../dyld-195.6/include' 'LDFLAGS=-Wl,-search_paths_first -L/opt/gentoo-mavericks/usr/lib -L/opt/gentoo-mavericks/lib -L/opt/gentoo-mavericks/tmp/usr/lib ' 
g++ -m64 -I../../dyld-195.6/include -I/opt/gentoo-mavericks/usr/include -I/opt/gentoo-mavericks/tmp/usr/include -ULTO_SUPPORT -DNDEBUG -I/opt/gentoo-mavericks/var/tmp/portage/sys-devel/binutils-apple-4.3/work/libunwind/include "-DCPU_SUBTYPE_X86_ALL=((cpu_subtype_t)3)" -Iinclude -Iabstraction -Ild -Ild/parsers -Iother -I. "-ULTO"  -c -o other/rebase.o other/rebase.cpp
g++ -m64 -I../../dyld-195.6/include -I/opt/gentoo-mavericks/usr/include -I/opt/gentoo-mavericks/tmp/usr/include -ULTO_SUPPORT -DNDEBUG -I/opt/gentoo-mavericks/var/tmp/portage/sys-devel/binutils-apple-4.3/work/libunwind/include "-DCPU_SUBTYPE_X86_ALL=((cpu_subtype_t)3)" -Iinclude -Iabstraction -Ild -Ild/parsers -Iother -I. "-ULTO"  -c -o other/unwinddump.o other/unwinddump.cpp
g++ -m64 -I../../dyld-195.6/include -I/opt/gentoo-mavericks/usr/include -I/opt/gentoo-mavericks/tmp/usr/include -ULTO_SUPPORT -DNDEBUG -I/opt/gentoo-mavericks/var/tmp/portage/sys-devel/binutils-apple-4.3/work/libunwind/include "-DCPU_SUBTYPE_X86_ALL=((cpu_subtype_t)3)" -Iinclude -Iabstraction -Ild -Ild/parsers -Iother -I. "-ULTO"  -c -o other/dyldinfo.o other/dyldinfo.cpp
In file included from other/unwinddump.cpp:36:
/Users/Apple/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/ext/hash_set:202:2: warning: Use of the header <ext/hash_set> is deprecated. Migrate to <unordered_set> [-W#warnings]
#warning Use of the header <ext/hash_set> is deprecated.  Migrate to <unordered_set>
 ^
In file included from other/dyldinfo.cpp:36:
/Users/Apple/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/ext/hash_set:202:2: warning: Use of the header <ext/hash_set> is deprecated. Migrate to <unordered_set> [-W#warnings]
#warning Use of the header <ext/hash_set> is deprecated.  Migrate to <unordered_set>
 ^
other/rebase.cpp:885:7: error: use of undeclared identifier 'realpath'
        if ( realpath(info.path, realFilePath) == NULL ) {
             ^
other/rebase.cpp:1005:19: error: use of undeclared identifier 'strtoull'
                                        lowAddress = strtoull(argv[++i], &endptr, 16);
                                                     ^
other/rebase.cpp:1008:20: error: use of undeclared identifier 'strtoull'
                                        highAddress = strtoull(argv[++i], &endptr, 16);
                                                      ^
In file included from other/unwinddump.cpp:39:
abstraction/MachOFileAbstraction.hpp:1319:61: warning: offset of on non-POD type 'macho_compact_unwind_entry<Pointer32<LittleEndian> >' [-Winvalid-offsetof]
        static uint32_t codeStartFieldOffset()                                  INLINE { return offsetof(macho_compact_unwind_entry<P>,_codeStart); }
                                                                                                ^                                      ~~~~~~~~~~
/Users/Apple/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.0/include/stddef.h:84:24: note: expanded from macro 'offsetof'
#define offsetof(t, d) __builtin_offsetof(t, d)
                       ^
other/unwinddump.cpp:690:88: note: in instantiation of member function 'macho_compact_unwind_entry<Pointer32<LittleEndian> >::codeStartFieldOffset' requested here
                if ( hasExernReloc(((char*)entry-(char*)entriesStart)+macho_compact_unwind_entry<P>::codeStartFieldOffset(), &functionNameStr, &funcAddress) ) {
                                                                                                     ^
other/unwinddump.cpp:167:4: note: in instantiation of member function 'UnwindPrinter<x86>::printObjectUnwindSection' requested here
                        printObjectUnwindSection(showFunctionNames);
                        ^
other/unwinddump.cpp:64:28: note: in instantiation of member function 'UnwindPrinter<x86>::UnwindPrinter' requested here
                                                                                                                { return new UnwindPrinter<A>(fileContent, fileLength, 
                                                                                                                             ^
other/unwinddump.cpp:876:28: note: in instantiation of member function 'UnwindPrinter<x86>::make' requested here
                                                        UnwindPrinter<x86>::make(p + offset, size, path, showFunctionNames);
                                                                            ^
In file included from other/unwinddump.cpp:39:
abstraction/MachOFileAbstraction.hpp:1320:62: warning: offset of on non-POD type 'macho_compact_unwind_entry<Pointer32<LittleEndian> >' [-Winvalid-offsetof]
        static uint32_t personalityFieldOffset()                                INLINE { return offsetof(macho_compact_unwind_entry<P>,_personality); }
                                                                                                ^                                      ~~~~~~~~~~~~
/Users/Apple/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.0/include/stddef.h:84:24: note: expanded from macro 'offsetof'
#define offsetof(t, d) __builtin_offsetof(t, d)
                       ^
other/unwinddump.cpp:708:88: note: in instantiation of member function 'macho_compact_unwind_entry<Pointer32<LittleEndian> >::personalityFieldOffset' requested here
                if ( hasExernReloc(((char*)entry-(char*)entriesStart)+macho_compact_unwind_entry<P>::personalityFieldOffset(), &personalityNameStr) ) {
                                                                                                     ^
other/unwinddump.cpp:167:4: note: in instantiation of member function 'UnwindPrinter<x86>::printObjectUnwindSection' requested here
                        printObjectUnwindSection(showFunctionNames);
                        ^
other/unwinddump.cpp:64:28: note: in instantiation of member function 'UnwindPrinter<x86>::UnwindPrinter' requested here
                                                                                                                { return new UnwindPrinter<A>(fileContent, fileLength, 
                                                                                                                             ^
other/unwinddump.cpp:876:28: note: in instantiation of member function 'UnwindPrinter<x86>::make' requested here
                                                        UnwindPrinter<x86>::make(p + offset, size, path, showFunctionNames);
                                                                            ^
In file included from other/unwinddump.cpp:39:
abstraction/MachOFileAbstraction.hpp:1319:61: warning: offset of on non-POD type 'macho_compact_unwind_entry<Pointer64<LittleEndian> >' [-Winvalid-offsetof]
        static uint32_t codeStartFieldOffset()                                  INLINE { return offsetof(macho_compact_unwind_entry<P>,_codeStart); }
                                                                                                ^                                      ~~~~~~~~~~
/Users/Apple/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.0/include/stddef.h:84:24: note: expanded from macro 'offsetof'
#define offsetof(t, d) __builtin_offsetof(t, d)
                       ^
other/unwinddump.cpp:690:88: note: in instantiation of member function 'macho_compact_unwind_entry<Pointer64<LittleEndian> >::codeStartFieldOffset' requested here
                if ( hasExernReloc(((char*)entry-(char*)entriesStart)+macho_compact_unwind_entry<P>::codeStartFieldOffset(), &functionNameStr, &funcAddress) ) {
                                                                                                     ^
other/unwinddump.cpp:167:4: note: in instantiation of member function 'UnwindPrinter<x86_64>::printObjectUnwindSection' requested here
                        printObjectUnwindSection(showFunctionNames);
                        ^
other/unwinddump.cpp:64:28: note: in instantiation of member function 'UnwindPrinter<x86_64>::UnwindPrinter' requested here
                                                                                                                { return new UnwindPrinter<A>(fileContent, fileLength, 
                                                                                                                             ^
other/unwinddump.cpp:882:31: note: in instantiation of member function 'UnwindPrinter<x86_64>::make' requested here
                                                        UnwindPrinter<x86_64>::make(p + offset, size, path, showFunctionNames);
                                                                               ^
In file included from other/unwinddump.cpp:39:
abstraction/MachOFileAbstraction.hpp:1320:62: warning: offset of on non-POD type 'macho_compact_unwind_entry<Pointer64<LittleEndian> >' [-Winvalid-offsetof]
        static uint32_t personalityFieldOffset()                                INLINE { return offsetof(macho_compact_unwind_entry<P>,_personality); }
                                                                                                ^                                      ~~~~~~~~~~~~
/Users/Apple/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.0/include/stddef.h:84:24: note: expanded from macro 'offsetof'
#define offsetof(t, d) __builtin_offsetof(t, d)
                       ^
other/unwinddump.cpp:708:88: note: in instantiation of member function 'macho_compact_unwind_entry<Pointer64<LittleEndian> >::personalityFieldOffset' requested here
                if ( hasExernReloc(((char*)entry-(char*)entriesStart)+macho_compact_unwind_entry<P>::personalityFieldOffset(), &personalityNameStr) ) {
                                                                                                     ^
other/unwinddump.cpp:167:4: note: in instantiation of member function 'UnwindPrinter<x86_64>::printObjectUnwindSection' requested here
                        printObjectUnwindSection(showFunctionNames);
                        ^
other/unwinddump.cpp:64:28: note: in instantiation of member function 'UnwindPrinter<x86_64>::UnwindPrinter' requested here
                                                                                                                { return new UnwindPrinter<A>(fileContent, fileLength, 
                                                                                                                             ^
other/unwinddump.cpp:882:31: note: in instantiation of member function 'UnwindPrinter<x86_64>::make' requested here
                                                        UnwindPrinter<x86_64>::make(p + offset, size, path, showFunctionNames);
                                                                               ^
3 errors generated.
make: *** [other/rebase.o] Error 1
make: *** Waiting for unfinished jobs....
5 warnings generated.
1 warning generated.
emake failed
Comment 1 Stuart Shelton 2013-11-18 13:23:39 UTC
Created attachment 363478 [details]
build.log from failing binutils-apple build during prefix bootstrap
Comment 2 Linlin Yan 2013-11-20 22:58:51 UTC
I tested this again by following the "Bootstrapping in general" steps of Gentoo Prefix. It indeed failed at sys-devel/binutils-apple-4.3::gentoo_prefix.

I met the error as following (without error about other/unwinddump.cpp):

 * building ld64-128.2
make LTO=0 CFLAGS=-march=nocona 'CXXFLAGS= -I../../dyld-195.6/include' 'LDFLAGS=-Wl,-search_paths_first -L/Users/yanll/Gentoo.new/usr/lib -L/Users/yanll/Gentoo.new/lib -L/Users/yanll/Gentoo.new/tmp/usr/lib '
g++ -m64 -I../../dyld-195.6/include -I/Users/yanll/Gentoo.new/usr/include -I/Users/yanll/Gentoo.new/tmp/usr/include -ULTO_SUPPORT -DNDEBUG -I/Users/yanll/Gentoo.new/var/tmp/portage/sys-devel/binutils-apple-4.3/work/libunwind/include "-DCPU_SUBTYPE_X86_ALL=((cpu_subtype_t)3)" -Iinclude -Iabstraction -Ild -Ild/parsers -Iother -I. "-ULTO"  -c -o other/rebase.o other/rebase.cpp
other/rebase.cpp:885:7: error: use of undeclared identifier 'realpath'
        if ( realpath(info.path, realFilePath) == NULL ) {
             ^
other/rebase.cpp:1005:19: error: use of undeclared identifier 'strtoull'
                                        lowAddress = strtoull(argv[++i], &endptr, 16);
                                                     ^
other/rebase.cpp:1008:20: error: use of undeclared identifier 'strtoull'
                                        highAddress = strtoull(argv[++i], &endptr, 16);
                                                      ^
3 errors generated.
make: *** [other/rebase.o] Error 1
emake failed


I guess patch on #490932 could solve this problem. However the bootstrap-prefix script seems still not using it.
Comment 3 Fabian Groffen gentoo-dev 2013-11-21 08:55:28 UTC
you have to do a latest tree bootstrap for that to get it, need to refresh the snapshot
Comment 4 Stuart Shelton 2013-11-21 14:40:44 UTC
I've cleared everything in the $EPREFIX directory and re-bootstrapped with LATEST_TREE_YES=1 and am now getting the following output whilst building '=sys-devel/gcc-apple-4.2.1_p5666-r1::gentoo_prefix':

gcc -m64 -c   -g -fkeep-inline-functions -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -fno-common  -mdynamic-no-pic -DHAVE_CONFIG_H -I. -I. -I/opt/gentoo-mavericks/var/tmp/portage/sys-devel/gcc-apple-4.2.1_p5666-r1/work/gcc-5666.3/gcc -I/opt/gentoo-mavericks/var/tmp/portage/sys-devel/gcc-apple-4.2.1_p5666-r1/work/gcc-5666.3/gcc/. -I/opt/gentoo-mavericks/var/tmp/portage/sys-devel/gcc-apple-4.2.1_p5666-r1/work/gcc-5666.3/gcc/../include -I/opt/gentoo-mavericks/var/tmp/portage/sys-devel/gcc-apple-4.2.1_p5666-r1/work/gcc-5666.3/gcc/../libcpp/include  -I/opt/gentoo-mavericks/var/tmp/portage/sys-devel/gcc-apple-4.2.1_p5666-r1/work/gcc-5666.3/gcc/../libdecnumber -I../libdecnumber -I/opt/gentoo-mavericks/usr/include -I/opt/gentoo-mavericks/tmp/usr/include   /opt/gentoo-mavericks/var/tmp/portage/sys-devel/gcc-apple-4.2.1_p5666-r1/work/gcc-5666.3/gcc/passes.c -o passes.o
/opt/gentoo-mavericks/var/tmp/portage/sys-devel/gcc-apple-4.2.1_p5666-r1/work/gcc-5666.3/gcc/toplev.c:564:1: error: redefinition of a 'extern inline' function 'floor_log2' is not supported in C99 mode
floor_log2 (unsigned HOST_WIDE_INT x)
^
/opt/gentoo-mavericks/var/tmp/portage/sys-devel/gcc-apple-4.2.1_p5666-r1/work/gcc-5666.3/gcc/toplev.h:174:1: note: previous definition is here
floor_log2 (unsigned HOST_WIDE_INT x)
^
/opt/gentoo-mavericks/var/tmp/portage/sys-devel/gcc-apple-4.2.1_p5666-r1/work/gcc-5666.3/gcc/toplev.c:599:1: error: redefinition of a 'extern inline' function 'exact_log2' is not supported in C99 mode
exact_log2 (unsigned HOST_WIDE_INT x)
^
/opt/gentoo-mavericks/var/tmp/portage/sys-devel/gcc-apple-4.2.1_p5666-r1/work/gcc-5666.3/gcc/toplev.h:180:1: note: previous definition is here
exact_log2 (unsigned HOST_WIDE_INT x)
^
...
make[3]: *** [toplev.o] Error 1
...
rm cpp.pod gfdl.pod gpl.pod fsf-funding.pod gcc.pod gcov.pod
make[2]: *** [all-stage1-gcc] Error 2
make[1]: *** [stage1-bubble] Error 2
make: *** [bootstrap] Error 2
emake failed
Comment 5 Fabian Groffen gentoo-dev 2013-11-21 14:47:17 UTC
that one still needs tackling and is a dup of 491098

*** This bug has been marked as a duplicate of bug 491098 ***