litex-buildenv
litex-buildenv copied to clipboard
Linker error on bootstrap.sh
Running the bootstrap script on (Void) Linux, I get the following error:
running develop
running egg_info
writing nmigen.egg-info/PKG-INFO
writing dependency_links to nmigen.egg-info/dependency_links.txt
writing entry points to nmigen.egg-info/entry_points.txt
writing requirements to nmigen.egg-info/requires.txt
writing top-level names to nmigen.egg-info/top_level.txt
writing manifest file 'nmigen.egg-info/SOURCES.txt'
running build_ext
Creating /home/niklas/hack/litex/litex-buildenv/build/conda/lib/python3.7/site-packages/nmigen.egg-link (link to .)
nmigen 0.2.dev4+gf207f3f is already the active version in easy-install.pth
Installing nmigen-rpc script to /home/niklas/hack/litex/litex-buildenv/build/conda/bin
Installed /home/niklas/hack/litex/litex-buildenv/third_party/nmigen
Processing dependencies for nmigen==0.2.dev4+gf207f3f
Searching for bitarray
Reading https://pypi.org/simple/bitarray/
Downloading https://files.pythonhosted.org/packages/eb/fd/bf67cfea810305148ab8a1e8fbdcc5179f56979c73907fec9a36ebd4a58a/bitarray-1.2.0.tar.gz#sha256=4f8706b651243c9faa981f075bcbdef2fab83e9b9bc9211ed2cb5849f
9a68342
Best match: bitarray 1.2.0
Processing bitarray-1.2.0.tar.gz
Writing /tmp/easy_install-zu1dt4ay/bitarray-1.2.0/setup.cfg
Running bitarray-1.2.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-zu1dt4ay/bitarray-1.2.0/egg-dist-tmp-yj7dg1d1
warning: build_py: byte-compiling is disabled, skipping.
/home/niklas/hack/litex/litex-buildenv/build/conda/compiler_compat/ld: /usr/lib/gcc/x86_64-unknown-linux-gnu/9.2.0/../../../../lib/crti.o: unable to initialize decompress status for section .debug_aranges
/home/niklas/hack/litex/litex-buildenv/build/conda/compiler_compat/ld: /usr/lib/gcc/x86_64-unknown-linux-gnu/9.2.0/../../../../lib/crti.o: unable to initialize decompress status for section .debug_aranges
/home/niklas/hack/litex/litex-buildenv/build/conda/compiler_compat/ld: /usr/lib/gcc/x86_64-unknown-linux-gnu/9.2.0/../../../../lib/crti.o: unable to initialize decompress status for section .debug_aranges
/home/niklas/hack/litex/litex-buildenv/build/conda/compiler_compat/ld: /usr/lib/gcc/x86_64-unknown-linux-gnu/9.2.0/../../../../lib/crti.o: unable to initialize decompress status for section .debug_aranges
/usr/lib/gcc/x86_64-unknown-linux-gnu/9.2.0/../../../../lib/crti.o: file not recognized: file format not recognized
collect2: error: ld returned 1 exit status
error: Setup script exited with error: command 'gcc' failed with exit status 1
1|niklas@dimitri:~/hack/litex $
It turns out the dependency 'conda' ships its own linker which shadows the system linker.
The following command fixes the error for me:
$ mv litex-buildenv/build/conda/compiler_compat/ld litex-buildenv/build/conda/compiler_compat/loving-ld
This makes build use my system linker and the bootstrap script runs to completion. I have not verified the resulting toolchain.