Hello,
I just started installing RISC-V ISA Simulator and the Rocket core generator. As part of it, I have downloaded on my MAC the necessary dependencies from HomeBrew as mentioned in the README.md file (under the riscv-tools) folder. I also installed gcc-5 from homebrew in my /usr/local/bin.
Now I am trying to build the riscv-tools and when I run the command, i get the following error:
mzaman@~/Desktop/Research_Tools/rocket-chip/riscv-tools$ CC=gcc-5 CXX=g++-5 ./build.sh
Starting RISC-V Toolchain build process
Removing existing riscv-fesvr/build directory
Configuring project riscv-fesvr
configure: error: in `/Users/monirzaman/Desktop/Research_Tools/rocket-chip/riscv-tools/riscv-fesvr/build':
configure: error: C compiler cannot create executables
See `config.log' for more details
So i went to check the "config.log" at "~/Desktop/Research_Tools/rocket-chip/riscv-tools/riscv-fesvr/build", and below is the snippet:
## ----------- ##
55 ## Core tests. ##
56 ## ----------- ##
57
58 configure:1978: checking build system type
59 configure:1992: result: i386-apple-darwin16.0.0
60 configure:2012: checking host system type
61 configure:2025: result: i386-apple-darwin16.0.0
62 configure:2098: checking for gcc
63 configure:2125: result: gcc-5
64 configure:2354: checking for C compiler version
65 configure:2363: gcc-5 --version >&5
66 gcc-5 (Homebrew gcc5 5.4.0) 5.4.0
67 Copyright (C) 2015 Free Software Foundation, Inc.
68 This is free software; see the source for copying conditions. There is NO
69 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
70
71 configure:2374: $? = 0
72 configure:2363: gcc-5 -v >&5
73 Using built-in specs.
74 COLLECT_GCC=gcc-5
75 COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc5/5.4.0/libexec/gcc/x86_64-apple-darwin16.0.0/5.4.0/lto-wrapper
76 Target: x86_64-apple-darwin16.0.0
77 Configured with: ../configure --build=x86_64-apple-darwin16.0.0 --prefix=/usr/local/Cellar/gcc5/5.4.0 --libdir=/usr/local/Cellar/gcc5/5.4.0/lib/gcc/5 --enable-languages=c,c++,objc,obj-c++,fortran --program-s uffix=-5 --with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr --with-mpc=/usr/local/opt/libmpc --with-isl=/usr/local/opt/isl014 --with-system-zlib --enable-libstdcxx-time=yes --enable-stage1-checkin g --enable-checking=release --enable-lto --disable-werror --with-pkgversion='Homebrew gcc5 5.4.0' --with-bugurl=https://github.com/Homebrew/homebrew-versions/issues --enable-plugin --disable-nls --enable-mul tilib --with-native-system-header-dir=/usr/include --with-sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk
78 Thread model: posix
79 gcc version 5.4.0 (Homebrew gcc5 5.4.0)
80 configure:2374: $? = 0
81 configure:2363: gcc-5 -V >&5
82 gcc-5: error: unrecognized command line option '-V'
83 gcc-5: fatal error: no input files
84 compilation terminated.
85 configure:2374: $? = 1
86 configure:2363: gcc-5 -qversion >&5
87 gcc-5: error: unrecognized command line option '-qversion'
88 gcc-5: fatal error: no input files
89 compilation terminated.
90 configure:2374: $? = 1
91 configure:2394: checking whether the C compiler works
92 configure:2416: gcc-5 conftest.c >&5
93 ld: unexpected token: !tapi-tbd-v2 file '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/lib/libSystem.tbd' for architecture x86_64
94 collect2: error: ld returned 1 exit status
95 configure:2420: $? = 1
96 configure:2458: result: no
97 configure: failed program was:
| /* confdefs.h */
99 |#define PACKAGE_NAME "RISC-V Frontend Server"
100 | #define PACKAGE_TARNAME "fesvr"
101 | #define PACKAGE_VERSION "?"
102 | #define PACKAGE_STRING "RISC-V Frontend Server ?"
103 | #define PACKAGE_BUGREPORT "Andrew Waterman"
104 | #define PACKAGE_URL ""
105 | /* end confdefs.h. */
106 |
I am confused to what might be the problem here. Thanks in advance for your insights.
/monir