Freedom E SDK toolchain fails to build


I’m trying to compile the Freedom E SDK using make tools. I have all the build dependencies installed.

However, when compiling guile from riscv-binutils-gdb the process fails on the file scm-ports.c. The compiler error is error: invalid use of incomplete type ‘scm_t_port {aka struct scm_t_port}’. I know this error occurs when a type is declared but not defined, but I’m wondering if there is something I can do to fix the build or is anyone else experiencing the same problem?

Thanks in advance.

(Richard Xia) #2

Hi, can you please provide more information about your environment to help us diagnose the problem? At minimum it would be useful to provide your operating system + version as well as your GCC version.

(Dave) #3

Arch user?


Yes, thanks for the link, I’ll give it a try and see if it solves the problem.

@rxia apologies for not providing enough information, I am indeed running an arch linux derivative, with gcc 6.3.1. Also guile 2.2 is installed, which matches with the thread posted by @dgrubb.

EDIT: This was indeed the issue.

(Dave) #5

Glad you got it working. I know that there are a few people on these forums using Arch successfully but, even though I’ve never seen them give an official recommendation for a particular distribution, I get the impression that a lot of the people at SiFive use Ubuntu internally.


Hi guys I’m facing the same problem using Archlinux, I understand that the solution is to add the line “–with-guile=no” but I don’t know where to add it…
Can someone tell me where to add this line ?
Thanks a lot


What I did was change the file ‘riscv-gnu-toolchain/riscv-binutils-gdb/gdb/configure’ so that on the lines:

# Check whether --with-guile was given.
if test "${with_guile+set}" = set; then :

the line




Another way to do it, and it’s probably what gdb should do, is to change

try_guile_versions="guile-2.2 guile-2.0"

to just



Thanks, it worked!