GDC build [was: Re: Sort order of dirEntries]

Joseph Rushton Wakeling joseph.wakeling at webdrake.net
Thu Oct 25 14:08:48 PDT 2012


On 10/25/2012 10:07 PM, H. S. Teoh wrote:
> No guarantees that it will work, though. The GCC build system is a
> fragile, sensitive animal.

Indeed ... having followed your instructions (on 64-bit Ubuntu 12.10) I found 
myself first faced with the "cannot find crti.o" I'd encountered before.

I "fixed" that by Alex Petersen's suggestion of symlinking 
/usr/lib/x86_64-linux-gnu/crt*.o to /usr/lib/crt*.o (which hopefully won't break 
anything) and the build proceeded on that basis, but finally fell over with 
another error, I think while trying to build gcov-dump (it's a bit hard to tell 
with such verbose compilation statements as GCC has):

------------------------------------------------------------------------------
d/d-gcc.o: In function `used_arg':
gcc.c:(.text+0xdf4): undefined reference to `fatal_error'
d/d-gcc.o: In function `compare_version_strings':
gcc.c:(.text+0xf4a): undefined reference to `fancy_abort'
gcc.c:(.text+0xf5e): undefined reference to `fancy_abort'
gcc.c:(.text+0xf6d): undefined reference to `fatal_error'
gcc.c:(.text+0xf81): undefined reference to `fancy_abort'
gcc.c:(.text+0xf90): undefined reference to `fatal_error'
d/d-gcc.o: In function `version_compare_spec_function':
gcc.c:(.text+0x1120): undefined reference to `fatal_error'
gcc.c:(.text+0x1238): undefined reference to `fatal_error'
gcc.c:(.text+0x124c): undefined reference to `fancy_abort'
gcc.c:(.text+0x1258): undefined reference to `fatal_error'
d/d-gcc.o: In function `compare_debug_auxbase_opt_spec_function':
gcc.c:(.text+0x143c): undefined reference to `fatal_error'
gcc.c:(.text+0x1448): undefined reference to `fatal_error'
gcc.c:(.text+0x1454): undefined reference to `fatal_error'
d/d-gcc.o: In function `xputenv':
gcc.c:(.text+0x1762): undefined reference to `fnotice'
d/d-gcc.o: In function `find_plugindir_spec_function':
gcc.c:(.text+0x2497): undefined reference to `fancy_abort'
d/d-gcc.o: In function `find_file_spec_function':
gcc.c:(.text+0x24bb): undefined reference to `fancy_abort'
d/d-gcc.o: In function `remove_outfile_spec_function':
gcc.c:(.text+0x2532): undefined reference to `fancy_abort'
d/d-gcc.o: In function `replace_outfile_spec_function':
gcc.c:(.text+0x25dd): undefined reference to `fancy_abort'
d/d-gcc.o: In function `getenv_spec_function':
gcc.c:(.text+0x2677): undefined reference to `fatal_error'
d/d-gcc.o: In function `process_command':
gcc.c:(.text+0x2c62): undefined reference to `common_handle_option'
gcc.c:(.text+0x2c71): undefined reference to `target_handle_option'
gcc.c:(.text+0x2dda): undefined reference to `read_cmdline_option'
gcc.c:(.text+0x2ffb): undefined reference to `warning'
gcc.c:(.text+0x3111): undefined reference to `warning'
gcc.c:(.text+0x322a): undefined reference to `fancy_abort'
d/d-gcc.o: In function `retry_ice':
gcc.c:(.text+0x381b): undefined reference to `fnotice'
gcc.c:(.text+0x3b32): undefined reference to `fnotice'
d/d-gcc.o: In function `add_sysrooted_prefix.constprop.20':
gcc.c:(.text+0x3d72): undefined reference to `fatal_error'
d/d-gcc.o: In function `init_spec.part.4':
gcc.c:(.text+0x4184): undefined reference to `fnotice'
d/d-gcc.o: In function `add_linker_option':
gcc.c:(.text+0x4326): undefined reference to `vec_heap_p_reserve'
d/d-gcc.o: In function `add_preprocessor_option':
gcc.c:(.text+0x4386): undefined reference to `vec_heap_p_reserve'
d/d-gcc.o: In function `add_assembler_option':
gcc.c:(.text+0x43e6): undefined reference to `vec_heap_p_reserve'
d/d-gcc.o: In function `driver_handle_option':
gcc.c:(.text+0x4cde): undefined reference to `fancy_abort'
gcc.c:(.text+0x4da9): undefined reference to `fancy_abort'
gcc.c:(.text+0x4dbd): undefined reference to `fancy_abort'
gcc.c:(.text+0x4dd1): undefined reference to `fancy_abort'
gcc.c:(.text+0x4de5): undefined reference to `fancy_abort'
d/d-gcc.o:gcc.c:(.text+0x4df9): more undefined references to `fancy_abort' follow
d/d-gcc.o: In function `driver_handle_option':
gcc.c:(.text+0x4e31): undefined reference to `fatal_error'
d/d-gcc.o: In function `store_arg':
gcc.c:(.text+0x4f8d): undefined reference to `vec_heap_p_reserve'
d/d-gcc.o: In function `create_at_file':
gcc.c:(.text+0x5214): undefined reference to `fatal_error'
gcc.c:(.text+0x5223): undefined reference to `fatal_error'
gcc.c:(.text+0x5232): undefined reference to `fatal_error'
d/d-gcc.o: In function `execute':
gcc.c:(.text+0x5666): undefined reference to `fatal_error'
gcc.c:(.text+0x591c): undefined reference to `vec_heap_p_reserve'
gcc.c:(.text+0x59b8): undefined reference to `vec_heap_p_reserve_exact'
gcc.c:(.text+0x5e36): undefined reference to `fnotice'
gcc.c:(.text+0x5f58): undefined reference to `fancy_abort'
gcc.c:(.text+0x5f62): undefined reference to `fatal_error'
gcc.c:(.text+0x5f8a): undefined reference to `fancy_abort'
gcc.c:(.text+0x5fc1): undefined reference to `fatal_error'
gcc.c:(.text+0x5fe4): undefined reference to `internal_error'
gcc.c:(.text+0x5fee): undefined reference to `fatal_error'
d/d-gcc.o: In function `do_spec_1':
gcc.c:(.text+0x669f): undefined reference to `fatal_error'
gcc.c:(.text+0x69e0): undefined reference to `fatal_error'
gcc.c:(.text+0x6d6a): undefined reference to `inform'
gcc.c:(.text+0x75fa): undefined reference to `fatal_error'
gcc.c:(.text+0x7ad8): undefined reference to `vec_heap_p_reserve_exact'
gcc.c:(.text+0x7d50): undefined reference to `fatal_error'
gcc.c:(.text+0x7d66): undefined reference to `fatal_error'
gcc.c:(.text+0x7d97): undefined reference to `fatal_error'
gcc.c:(.text+0x7da6): undefined reference to `fatal_error'
gcc.c:(.text+0x7dba): undefined reference to `fatal_error'
d/d-gcc.o:gcc.c:(.text+0x7dd5): more undefined references to `fatal_error' follow
d/d-gcc.o: In function `compare_debug_dump_opt_spec_function':
gcc.c:(.text+0x8b5a): undefined reference to `fancy_abort'
d/d-gcc.o: In function `do_self_spec':
gcc.c:(.text+0x8d49): undefined reference to `decode_cmdline_options_to_array'
gcc.c:(.text+0x8d83): undefined reference to `common_handle_option'
gcc.c:(.text+0x8d94): undefined reference to `target_handle_option'
gcc.c:(.text+0x8e4f): undefined reference to `read_cmdline_option'
gcc.c:(.text+0x8e78): undefined reference to `fatal_error'
gcc.c:(.text+0x8e88): undefined reference to `fatal_error'
d/d-gcc.o: In function `read_specs':
gcc.c:(.text+0x90a8): undefined reference to `fnotice'
gcc.c:(.text+0x91e4): undefined reference to `fatal_error'
gcc.c:(.text+0x9784): undefined reference to `fnotice'
gcc.c:(.text+0x97ae): undefined reference to `fatal_error'
gcc.c:(.text+0x97da): undefined reference to `fnotice'
gcc.c:(.text+0x9809): undefined reference to `fatal_error'
gcc.c:(.text+0x9831): undefined reference to `fatal_error'
gcc.c:(.text+0x9848): undefined reference to `fatal_error'
gcc.c:(.text+0x9864): undefined reference to `fatal_error'
gcc.c:(.text+0x9873): undefined reference to `fatal_error'
d/d-gcc.o:gcc.c:(.text+0x9888): more undefined references to `fatal_error' follow
d/d-gcc.o: In function `include_spec_function':
gcc.c:(.text+0x9929): undefined reference to `fancy_abort'
d/d-gcc.o:(.rodata+0x4e8): undefined reference to `host_detect_local_cpu'
d/d-gcc.o: In function `main':
gcc.c:(.text.startup+0x97): undefined reference to `global_init_params'
gcc.c:(.text.startup+0x9c): undefined reference to `finish_params'
gcc.c:(.text.startup+0xab): undefined reference to `init_options_struct'
gcc.c:(.text.startup+0xd0): undefined reference to `decode_cmdline_options_to_array'
gcc.c:(.text.startup+0xda): undefined reference to `gcc_init_libintl'
gcc.c:(.text.startup+0xe8): undefined reference to `diagnostic_initialize'
gcc.c:(.text.startup+0x1b8): undefined reference to `vec_heap_p_reserve_exact'
gcc.c:(.text.startup+0x104e): undefined reference to `fatal_error'
gcc.c:(.text.startup+0x153a): undefined reference to `fatal_error'
gcc.c:(.text.startup+0x15d7): undefined reference to `fatal_error'
gcc.c:(.text.startup+0x1b22): undefined reference to `fatal_error'
gcc.c:(.text.startup+0x1ce5): undefined reference to `fatal_error'
gcc.c:(.text.startup+0x1d25): undefined reference to `seen_error'
gcc.c:(.text.startup+0x1d44): undefined reference to `seen_error'
gcc.c:(.text.startup+0x1f42): undefined reference to `fatal_error'
gcc.c:(.text.startup+0x1f5a): undefined reference to `fnotice'
gcc.c:(.text.startup+0x1f72): undefined reference to `fnotice'
gcc.c:(.text.startup+0x1f8a): undefined reference to `fnotice'
gcc.c:(.text.startup+0x2771): undefined reference to `fnotice'
gcc.c:(.text.startup+0x28f4): undefined reference to `fatal_error'
gcc.c:(.text.startup+0x29c1): undefined reference to `inform'
gcc.c:(.text.startup+0x2a7a): undefined reference to `inform'
gcc.c:(.text.startup+0x2c40): undefined reference to `fancy_abort'
gcc.c:(.text.startup+0x2dd5): undefined reference to `seen_error'
gcc.c:(.text.startup+0x2e36): undefined reference to `seen_error'
gcc.c:(.text.startup+0x2e50): undefined reference to `seen_error'
gcc.c:(.text.startup+0x2ea8): undefined reference to `warning'
gcc.c:(.text.startup+0x2fa9): undefined reference to `seen_error'
gcc.c:(.text.startup+0x3118): undefined reference to `fatal_error'
gcc.c:(.text.startup+0x31b7): undefined reference to `fnotice'
d/d-spec.o: In function `lang_specific_driver':
d-spec.c:(.text+0x459): undefined reference to `generate_option'
d-spec.c:(.text+0x474): undefined reference to `generate_option_input_file'
d-spec.c:(.text+0x4e6): undefined reference to `generate_option'
d-spec.c:(.text+0x8ca): undefined reference to `generate_option'
d-spec.c:(.text+0x92e): undefined reference to `generate_option'
d-spec.c:(.text+0x98d): undefined reference to `generate_option'
d-spec.c:(.text+0xb3e): undefined reference to `generate_option'
d/d-spec.o:d-spec.c:(.text+0xc2f): more undefined references to 
`generate_option' follow
collect2: error: ld returned 1 exit status
make[3]: *** [gdc] Error 1
------------------------------------------------------------------------------

Any thoughts or advice?


More information about the Digitalmars-d-learn mailing list