Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

Error building binutils in riscv-gnu-toolchain target with GCC 7.2.0 and 4.9.4 #138

Open
sherrbc1 opened this issue Oct 18, 2017 · 1 comment

Comments

@sherrbc1
Copy link

sherrbc1 commented Oct 18, 2017

When building with either GCC version 7.2.0 or 4.9.4, both of which satisfy the requirement of GCC >= 4.8 for C++11 dependencies, I am met with a cascade of build-time errors. Most notably:

/home/user/riscv/riscv-tools/riscv-gnu-toolchain/riscv-binutils-gdb/gdb/guile/scm-ports.c:146:10:` error: ‘scm_new_port_table_entry’ was not declared in this scope

and

/home/user/riscv/riscv-tools/riscv-gnu-toolchain/riscv-binutils-gdb/gdb/guile/scm-ports.c:231:20: error: ‘SCM_PTAB_ENTRY’ was not declared in this scope

Host OS: Arch Linux 4.13.7
GCC: 7.2.0
Error Log: builderror_720.log

GCC: 4.9.4
Error Log: builderror_494.log

@sherrbc1
Copy link
Author

sherrbc1 commented Oct 18, 2017

From what I gather online, this seems to have been an issue since upstream guile deprecated structures used by gdb.

https://sourceware.org/bugzilla/show_bug.cgi?id=21104
crosstool-ng/crosstool-ng#799
http://archive.linuxfromscratch.org/mail-archives/blfs-dev/2017-March/033056.html
crosstool-ng/crosstool-ng#718

The suggested fix is to include --without-guile or --with-guile=no in GDB's configure scripts. My system has guile 2.2.2 installed, which explains the inability to find the missing types. It is likely that installing an earlier version of Guile would also remedy the situation.

This issue is more appropriately listed over at riscv-binutils-gdb and, as such, should likely be closed. However, a temporary fix from this repo can be had by changing this line to:

build_project riscv-gnu-toolchain --prefix=$RISCV --without-guile

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant