Giter Site home page Giter Site logo

Comments (10)

sbeamer avatar sbeamer commented on July 26, 2024

Can you verify your install of riscv64-unknown-elf-gcc worked?

from riscv-pk.

santhoshvlsi avatar santhoshvlsi commented on July 26, 2024

Hi sbeamer,

How can i verify the riscv64-unknown-elf-gcc worked or not?
In installation bin path we have
riscv64-unknown-elf-gcc riscv64-unknown-elf-gprof riscv64-unknown-elf-ranlib spike-dasm
fesvr-eth riscv64-unknown-elf-c++ riscv64-unknown-elf-gcc-4.9.2 riscv64-unknown-elf-ld riscv64-unknown-elf-readelf termios-xspike fesvr-rs232 riscv64-unknown-elf-c++filt riscv64-unknown-elf-gcc-ar riscv64-unknown-elf-ld.bfd riscv64-unknown-elf-size xspike
fesvr-zedboard riscv64-unknown-elf-cpp riscv64-unknown-elf-gcc-nm riscv64-unknown-elf-nm riscv64-unknown-elf-strings riscv64-unknown-elf-addr2line riscv64-unknown-elf-elfedit riscv64-unknown-elf-gcc-ranlib riscv64-unknown-elf-objcopy riscv64-unknown-elf-strip
riscv64-unknown-elf-ar riscv64-unknown-elf-g++ riscv64-unknown-elf-gcov riscv64-unknown-elf-objdump spike.

from riscv-pk.

sbeamer avatar sbeamer commented on July 26, 2024

Write a simple hello world program and attempt to compile it with riscv64-unknown-elf-gcc. If the compiler errors out, you will know you need to redo your riscv-gcc install.

Based on the info you posted, it appears autoconf doesn't have access to the same PATH.

from riscv-pk.

santhoshvlsi avatar santhoshvlsi commented on July 26, 2024

Hi,
Actually the issue is with installing RISCV PK. After downloading the dump, i used the following Commamd,
CC=riscv64-unknown-elf-gcc ../configure --prefix=$path/riscv64-unknown-elf --host=riscv64-unknown-elf
but it says C compiler cannot create executables..!!! How can i solve this problem..??

checking build system type... x86_64-unknown-linux-gnu
checking host system type... riscv64-unknown-elf
checking for riscv64-unknown-elf-gcc... riscv64-unknown-elf-gcc
checking whether the C compiler works... no
configure: error: in /Downloads/RISCV/Toolchain/riscv-pk/build':
configure: error: C compiler cannot create executables

from riscv-pk.

sbeamer avatar sbeamer commented on July 26, 2024

Yes, I understand the concern is over riscv-pk. Because autoconf complains the C compiler can't create executables (it was able to find riscv64-unknown-elf-gcc), I recommend you first verify that riscv64-unknown-elf-gcc was installed correctly. It is possible that the build process can complete, but the resulting binaries will not run (often due to a linking issue). I recommend attempting to compile a hello world program rather than running the compiler with no arguments to test if it is installed correctly.

from riscv-pk.

santhoshvlsi avatar santhoshvlsi commented on July 26, 2024
  1. Compile the Hello world program and we are getting the executable file HHH
    riscv64-unknown-elf-gcc -o HHH hello.c.
  2. Generated the Dump file.The command is
    riscv64-unknown-elf-objdump --disassemble-all HHH > d_hello.dump.
  3. Generated the Hexadecimal file.
    elf2hex 16 16384 HHH > elfhex_hello.

While simulate the HHH file in spike simulator(2 ways)

  1. "spike pk HHH"
    terminate called after throwing an instance of 'std::runtime_error'
    what(): could not open pk
  2. "spike HHH" or "spike -d HHH"
    then we are geting the display in terminal
    core 0: exception trap_illegal_instruction, epc 0x0000000000000000
    core 0: 0x0000000000000000 (0x00001000) unknown
    core 0: exception trap_illegal_instruction, epc 0x0000000000000000

How can i solve this problem..??

from riscv-pk.

sbeamer avatar sbeamer commented on July 26, 2024

Since you are able to get HHH, it appears your riscv64-unknown-elf-gcc may be working. I would try building riscv-pk again and examining config.log if autoconf fails again. Your trace from above had the error "checking whether the C compiler works... no" which means autoconf was able to find riscv64-unknown-elf-gcc but it did not pass autoconf's sanity checks. Hopefully config.log will contain more information you can use to debug your installation.

from riscv-pk.

santhoshvlsi avatar santhoshvlsi commented on July 26, 2024

Run these command CC=riscv64-unknown-elf-gcc ../configure --prefix=/home/riscv_installation/riscv64-unknown-elf-gcc --host=riscv After theat In bulid folder we are geting the config.log file.

This is the log file.

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by RISC-V Proxy Kernel configure ?, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ../configure --prefix=/home/riscv_installation/riscv64-unknown-elf-gcc --host=riscv

---------

Platform.

---------

hostname = A-GA-78LMT-S2
uname -m = x86_64
uname -r = 3.13.0-44-generic
uname -s = Linux
uname -v = #73-Ubuntu SMP Tue Dec 16 00:22:43 UTC 2014
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/games
PATH: /usr/local/games

-----------

Core tests.

-----------

configure:1941: checking build system type
configure:1955: result: x86_64-unknown-linux-gnu
configure:1975: checking host system type
configure:1988: result: mipsriscvel-ucb-elf
configure:2021: checking for riscv-gcc
configure:2048: result: riscv64-unknown-elf-gcc
configure:2317: checking for C compiler version
configure:2326: riscv64-unknown-elf-gcc --version >&5
riscv64-unknown-elf-gcc (GCC) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:2337: $? = 0
configure:2326: riscv64-unknown-elf-gcc -v >&5
Using built-in specs.
COLLECT_GCC=riscv64-unknown-elf-gcc
Target: riscv64-unknown-elf
Configured with: /home/Downloads/RISCV/Tchain/riscv-gnu-toolchain/src/newlib-gcc/configure --target=riscv64-unknown-elf --prefix=/home/riscv_installation --disable-shared --disable-threads --enable-tls --enable-languages=c,c++ --with-newlib --disable-libmudflap --disable-libssp --disable-libquadmath --disable-libgomp --disable-nls
Thread model: single
gcc version 4.9.2 (GCC)
configure:2337: $? = 0
configure:2326: riscv64-unknown-elf-gcc -V >&5
riscv64-unknown-elf-gcc: error: unrecognized command line option '-V'
riscv64-unknown-elf-gcc: fatal error: no input files
compilation terminated.
configure:2337: $? = 1
configure:2326: riscv64-unknown-elf-gcc -qversion >&5
riscv64-unknown-elf-gcc: error: unrecognized command line option '-qversion'
riscv64-unknown-elf-gcc: fatal error: no input files
compilation terminated.
configure:2337: $? = 1
configure:2357: checking whether the C compiler works
configure:2379: riscv64-unknown-elf-gcc conftest.c >&5
riscv64-unknown-elf-gcc: error trying to exec 'cc1': execvp: No such file or directory
configure:2383: $? = 1
configure:2421: result: no
configure: failed program was:
| /* confdefs.h /
| #define PACKAGE_NAME "RISC-V Proxy Kernel"
| #define PACKAGE_TARNAME "riscv-pk"
| #define PACKAGE_VERSION "?"
| #define PACKAGE_STRING "RISC-V Proxy Kernel ?"
| #define PACKAGE_BUGREPORT "Andrew Waterman"
| #define PACKAGE_URL ""
| /
end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2426: error: in /home/Downloads/RISCV/Tchain/riscv-pk/build': configure:2428: error: C compiler cannot create executables Seeconfig.log' for more details

----------------

Cache variables.

----------------

ac_cv_build=x86_64-unknown-linux-gnu
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=set
ac_cv_env_CC_value=riscv64-unknown-elf-gcc
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_STOW_PREFIX_set=
ac_cv_env_STOW_PREFIX_value=
ac_cv_env_STOW_ROOT_set=
ac_cv_env_STOW_ROOT_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=set
ac_cv_env_host_alias_value=riscv
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=mipsriscvel-ucb-elf
ac_cv_prog_CC=riscv64-unknown-elf-gcc

-----------------

Output variables.

-----------------

AR=''
CC='riscv64-unknown-elf-gcc'
CFLAGS=''
CPP=''
CPPFLAGS=''
CXX=''
CXXFLAGS=''
DEFS=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
GREP=''
INSTALL_DATA=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
LDFLAGS=''
LIBOBJS=''
LIBS=''
LTLIBOBJS=''
OBJEXT=''
PACKAGE_BUGREPORT='Andrew Waterman'
PACKAGE_NAME='RISC-V Proxy Kernel'
PACKAGE_STRING='RISC-V Proxy Kernel ?'
PACKAGE_TARNAME='riscv-pk'
PACKAGE_URL=''
PACKAGE_VERSION='?'
PATH_SEPARATOR=':'
RANLIB=''
RUN=''
RUNFLAGS=''
SHELL='/bin/bash'
STOW_PREFIX=''
STOW_ROOT=''
ac_ct_CC=''
ac_ct_CXX=''
ac_ct_RUN=''
bindir='${exec_prefix}/bin'
build='x86_64-unknown-linux-gnu'
build_alias=''
build_cpu='x86_64'
build_os='linux-gnu'
build_vendor='unknown'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
enable_stow=''
exec_prefix='NONE'
host='mipsriscvel-ucb-elf'
host_alias='riscv'
host_cpu='mipsriscvel'
host_os='elf'
host_vendor='ucb'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/home/riscv_installation/riscv64-unknown-elf-gcc'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
stow=''
subprojects=''
subprojects_enabled=''
sysconfdir='${prefix}/etc'
target_alias=''

-----------

confdefs.h.

-----------

/* confdefs.h */
#define PACKAGE_NAME "RISC-V Proxy Kernel"
#define PACKAGE_TARNAME "riscv-pk"
#define PACKAGE_VERSION "?"
#define PACKAGE_STRING "RISC-V Proxy Kernel ?"
#define PACKAGE_BUGREPORT "Andrew Waterman"
#define PACKAGE_URL ""

configure: exit 77

from riscv-pk.

sbeamer avatar sbeamer commented on July 26, 2024

I would verify that your riscv64-unknown-elf-gcc can compile a hello world and you get a binary out.

Looking at the log you posted, riscv64-unknown-elf-gcc can't find cc1. Is it possible you moved your riscv compiler after building it? It is best to build it with its final target directory given by --prefix.

from riscv-pk.

PedroLSF avatar PedroLSF commented on July 26, 2024

I have the same problem, has anyone solved it?

from riscv-pk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.