litex-hub/litex-conda-packages

gcc 9.1 on or1k fails with newlib?

mithro opened this issue · 4 comments

https://travis-ci.com/litex-hub/litex-conda/jobs/218111640

COLLECT_GCC_OPTIONS='-v' '-g' '-o' 'main'

 /tmp/really-really-really-really-really-really-really-really-really-really-really-really-really-long-path/conda/conda-bld/gcc-or1k-elf-newlib_1563780686373/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/bin/../libexec/gcc/or1k-elf/9.1.0/collect2 -plugin /tmp/really-really-really-really-really-really-really-really-really-really-really-really-really-long-path/conda/conda-bld/gcc-or1k-elf-newlib_1563780686373/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/bin/../libexec/gcc/or1k-elf/9.1.0/liblto_plugin.so -plugin-opt=/tmp/really-really-really-really-really-really-really-really-really-really-really-really-really-long-path/conda/conda-bld/gcc-or1k-elf-newlib_1563780686373/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/bin/../libexec/gcc/or1k-elf/9.1.0/lto-wrapper -plugin-opt=-fresolution=/tmp/ccqB7aPD.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lor1k -plugin-opt=-pass-through=-lboard-or1ksim -plugin-opt=-pass-through=-lgcc --entry=0x100 -o main /tmp/really-really-really-really-really-really-really-really-really-really-really-really-really-long-path/conda/conda-bld/gcc-or1k-elf-newlib_1563780686373/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/bin/../lib/gcc/or1k-elf/9.1.0/../../../../or1k-elf/lib/crt0.o /tmp/really-really-really-really-really-really-really-really-really-really-really-really-really-long-path/conda/conda-bld/gcc-or1k-elf-newlib_1563780686373/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/bin/../lib/gcc/or1k-elf/9.1.0/crtbegin.o -L/tmp/really-really-really-really-really-really-really-really-really-really-really-really-really-long-path/conda/conda-bld/gcc-or1k-elf-newlib_1563780686373/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/bin/../lib/gcc/or1k-elf/9.1.0 -L/tmp/really-really-really-really-really-really-really-really-really-really-really-really-really-long-path/conda/conda-bld/gcc-or1k-elf-newlib_1563780686373/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/bin/../lib/gcc -L/tmp/really-really-really-really-really-really-really-really-really-really-really-really-really-long-path/conda/conda-bld/gcc-or1k-elf-newlib_1563780686373/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/bin/../lib/gcc/or1k-elf/9.1.0/../../../../or1k-elf/lib /tmp/ccRGiGhP.o -Map=output.map -lgcc --start-group -lc -lor1k -lboard-or1ksim --end-group -lgcc /tmp/really-really-really-really-really-really-really-really-really-really-really-really-really-long-path/conda/conda-bld/gcc-or1k-elf-newlib_1563780686373/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/bin/../lib/gcc/or1k-elf/9.1.0/crtend.o

/tmp/really-really-really-really-really-really-really-really-really-really-really-really-really-long-path/conda/conda-bld/gcc-or1k-elf-newlib_1563780686373/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/bin/../lib/gcc/or1k-elf/9.1.0/../../../../or1k-elf/bin/ld: /tmp/really-really-really-really-really-really-really-really-really-really-really-really-really-long-path/conda/conda-bld/gcc-or1k-elf-newlib_1563780686373/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/bin/../lib/gcc/or1k-elf/9.1.0/../../../../or1k-elf/bin/ld: DWARF error: mangled line number section

/tmp/really-really-really-really-really-really-really-really-really-really-really-really-really-long-path/conda/conda-bld/gcc-or1k-elf-newlib_1563780686373/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/bin/../lib/gcc/or1k-elf/9.1.0/../../../../or1k-elf/lib/libc.a(lib_a-fini.o): in function `__libc_fini_array':

fini.c:(.text+0x60): undefined reference to `_fini'

/tmp/really-really-really-really-really-really-really-really-really-really-really-really-really-long-path/conda/conda-bld/gcc-or1k-elf-newlib_1563780686373/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/bin/../lib/gcc/or1k-elf/9.1.0/../../../../or1k-elf/bin/ld: /tmp/really-really-really-really-really-really-really-really-really-really-really-really-really-long-path/conda/conda-bld/gcc-or1k-elf-newlib_1563780686373/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/bin/../lib/gcc/or1k-elf/9.1.0/../../../../or1k-elf/bin/ld: DWARF error: mangled line number section

/tmp/really-really-really-really-really-really-really-really-really-really-really-really-really-long-path/conda/conda-bld/gcc-or1k-elf-newlib_1563780686373/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/bin/../lib/gcc/or1k-elf/9.1.0/../../../../or1k-elf/lib/libc.a(lib_a-init.o): in function `__libc_init_array':

init.c:(.text+0x5c): undefined reference to `_init'

collect2: error: ld returned 1 exit status

+SUCCESS=1

+'[' 1 -ne 0 ']'

+echo 'Compiler didn'\''t exit successfully.'

+exit 1

Compiler didn't exit successfully.

Tests failed for gcc-or1k-elf-newlib-9.1.0-20190722_065228.tar.bz2 - moving package to /tmp/really-really-really-really-really-really-really-really-really-really-really-really-really-long-path/conda/conda-bld/broken

WARNING:conda_build.build:Tests failed for gcc-or1k-elf-newlib-9.1.0-20190722_065228.tar.bz2 - moving package to /tmp/really-really-really-really-really-really-really-really-really-really-really-really-really-long-path/conda/conda-bld/broken

WARNING conda_build.build:tests_failed(2211): Tests failed for gcc-or1k-elf-newlib-9.1.0-20190722_065228.tar.bz2 - moving package to /tmp/really-really-really-really-really-really-really-really-really-really-really-really-really-long-path/conda/conda-bld/broken

TESTS FAILED: gcc-or1k-elf-newlib-9.1.0-20190722_065228.tar.bz2

@stffrdhrn - What provides _fini and _init in the or1k case?

We go rid a fini and init, there should be a patch to newlib to support that. We replaced it with init/fini_array.

See: https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;a=blobdiff;f=libgloss/or1k/crt0.S;h=03d7323552bb900bede1c36279375d6be6d51d6d;hp=84adba1e3c31cf950fa022657463537723f3dbed;hb=ff7b7b8945b8ca356710abe67a867ed6fb81f74a;hpb=d1caad439334b29983c0bb3a9222f2eeb60a25a8

This should be configured during GCC build automatically during build for OR1K, then detected automatically during newlib config/build.

Which version of newlib? I use the latest from git for my builds.

This could all be broken though.

I updated our newlib version and things started work!

Great!