cpc / openasip

Open Application-Specific Instruction Set processor tools (OpenASIP)
http://openasip.org
Other
138 stars 41 forks source link

Error compiling risc-v source code #236

Closed claubersouza closed 10 months ago

claubersouza commented 12 months ago

I'm following the manual to learn how to better use the tool for Risc-V.

$oacc-riscv -O3 -a start.adf --output-format=bin -o crc.img main.c crc.c

ld.lld: error: unable to find library -lc ld.lld: error: unable to find library -lm

Mode Debug: $ oacc-riscv -D_DEBUG -O3 -a start.adf --output-format=bin -o crc.img main.c crc.c

main.c:23:10: fatal error: 'stdio.h' file not found

include

     ^~~~~~~~~

1 error generated.

karihepola commented 11 months ago

Did you install all the prerequisites described in README.MD before compiling OpenASIP? It looks like newlib was not compiled for RISC-V. I recommend making sure RISC-V GNU Toolchain is installed and in PATH then doing make distclean or cloning a clean repository before compiling and installing OpenASIP again.

claubersouza commented 11 months ago

I installed Open Asip again and the following error is occurring

oacc-riscv -D_DEBUG -O3 -a start.adf --output-format=bin -o crc.img main.c crc.c main.c:49:55: warning: format specifies type 'unsigned int' but the argument has type 'crc' (aka 'unsigned long') [-Wformat] iprintf("The crcFast() of \"TCE rocks!\" is 0x%X\n", result); ~~ ^~ %lX 1 warning generated.

ld.lld -lc -lm -lgcc -L /opt/riscv/lib/gcc/riscv32-unknown-elf/12.2.0 -L /home/clauber/local/riscv/lib -Ttext=0 -T /tmp/oacc-x78hjiw8/riscv.ld /tmp/oacc-x78hjiw8/init.o /tmp/oacc-x78hjiw8/tmpfrtbean_.o -o /tmp/oacc-x78hjiw8/tmppip_n5ae.hex ld.lld: error: unable to find library -lc ld.lld: error: unable to find library -lm

karihepola commented 11 months ago

It still looks like the same issue. The standard libraries should get installed to /home/clauber/local/riscv/lib when OpenASIP is installed with RISC-V support. It is required, however, that all the RISC-V prerequisites are installed and in PATH before configuring/compiling OpenASIP. Can you show the output of ./configure ?

claubersouza commented 11 months ago

openasip-2.0/openasip$ ./configure checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a race-free mkdir -p... /usr/bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking how to create a pax tar archive... gnutar checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking for g++... g++ checking whether the C++ compiler works... yes checking for C++ compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether the compiler supports GNU C++... yes checking whether g++ accepts -g... yes checking for g++ option to enable C++11 features... none needed checking whether make supports the include directive... yes (GNU style) checking dependency style of g++... gcc3 checking for gcc... gcc checking whether the compiler supports GNU C... yes checking whether gcc accepts -g... yes checking for gcc option to enable C11 features... none needed checking whether gcc understands -c and -o together... yes checking dependency style of gcc... gcc3 checking whether make sets $(MAKE)... (cached) yes checking for a sed that does not truncate output... /usr/bin/sed checking how to print strings... printf checking for a sed that does not truncate output... (cached) /usr/bin/sed checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for fgrep... /usr/bin/grep -F checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 1572864 checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop checking for /usr/bin/ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for ar... ar checking for archiver @FILE support... @ checking for strip... strip checking for ranlib... ranlib checking command to parse /usr/bin/nm -B output from gcc object... ok checking for sysroot... no checking for a working dd... /usr/bin/dd checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1 checking for mt... mt checking if mt is a manifest tool... no checking for stdio.h... yes checking for stdlib.h... yes checking for string.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for strings.h... yes checking for sys/stat.h... yes checking for sys/types.h... yes checking for unistd.h... yes checking for dlfcn.h... yes checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking how to run the C++ preprocessor... g++ -E checking for ld used by g++... /usr/bin/ld -m elf_x86_64 checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC -DPIC checking if g++ PIC flag -fPIC -DPIC works... yes checking if g++ static flag -static works... yes checking if g++ supports -c -o file.o... yes checking if g++ supports -c -o file.o... (cached) yes checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking dynamic linker characteristics... (cached) GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking for egrep... (cached) /usr/bin/grep -E checking for latex... yes checking for latex2html... yes checking for riscv32-unknown-elf-gcc... yes checking for the pthreads library -lpthreads... no checking whether pthreads work without any flags... yes checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE checking if more special flags are required for pthreads... no checking for PTHREAD_PRIO_INHERIT... yes checking whether compiler understands vector at() method... yes checking for tce-llvm-gcc... no checking for clang... yes checking whether std::hash_map is available... no checking whether std::unordered_map/hash_map is available... yes checking whether std::tr1::unordered_map/hash_map is available... yes checking whether __gnu_cxx::hash_map is available... yes checking whether compiler understands -Wno-system-headers flag... yes checking whether compiler supports -rdynamic... yes checking how to run the C preprocessor... gcc -E checking for directory separator... / checking for python binary... checking for python3... python3 checking for llvmtce-config... /home/clauber/local/bin/llvmtce-config checking for /home/clauber/local/bin/llvmtce-config... yes checking if the little endian tcele target is supported in Clang/LLVM... yes checking if the little endian 64-bit tcele64 target is supported in Clang/LLVM... yes checking for /usr/bin/wx-config... yes checking if wx headers are found and library linkage works... yes checking if wxWidgets is compiled with printing framework.... yes checking if wxWidgets contains the font size bug in canvas printing.... no checking tcl version... yes (8.6) checking for library containing Tcl_SetVar... -ltcl8.6 checking whether -ltcl8.6 is available to linker... yes checking whether xerces-c library is available to the linker... yes checking for library containing el_init... -ledit checking whether editline library is available... yes checking for library containing sqlite3_step... -lsqlite3 checking that sqlite3 is available to linker... yes checking whether dl library is needed... no checking for dirent.h that defines DIR... yes checking for library containing opendir... none required checking for sys/wait.h that is POSIX.1 compatible... yes checking for egrep... (cached) /usr/bin/grep -E checking for an ANSI C-conforming const... yes checking size of float... 4 checking size of double... 8 checking size of int... 4 checking size of short... 2 checking size of char... 1 checking whether byte ordering is bigendian... no checking whether g++ supports C++11 features by default... yes checking for boostlib >= 1.48.0... yes checking whether the Boost::Filesystem library is available... yes checking for exit in -lboost_filesystem... yes checking whether the Boost::System library is available... yes checking for exit in -lboost_system... yes checking whether the Boost::Regex library is available... yes checking for exit in -lboost_regex... yes checking whether the Boost::Thread library is available... yes BUILD OS:, linux-gnu checking for exit in -lboost_thread... yes === Configuring newlib for big endian machines ===== checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking target system type... tce-llvm checking for a BSD-compatible install... /usr/bin/install -c checking whether ln works... yes checking whether ln -s works... yes checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking for gnatbind... no checking for gnatmake... no checking whether compiler driver understands Ada... no checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2 checking for version 0.10 of PPL... no checking for correct version of CLooG... no checking for bison... bison -y checking for bison... bison checking for gm4... no checking for gnum4... no checking for m4... m4 checking for flex... flex checking for flex... flex checking for makeinfo... makeinfo checking for expect... no checking for runtest... runtest checking for ar... ar checking for as... as checking for dlltool... no checking for ld... ld checking for lipo... no checking for nm... nm checking for ranlib... ranlib checking for strip... strip checking for windres... no checking for windmc... no checking for objcopy... objcopy checking for objdump... objdump checking for cc... (cached) /home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/tce-llvm/../../src/bintools/Compiler/oacc checking for gcc... (cached) /home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/tce-llvm/../../src/bintools/Compiler/oacc checking for c++... (cached) /home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/tce-llvm/../../src/bintools/Compiler/oacc checking for g++... (cached) /home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/tce-llvm/../../src/bintools/Compiler/oacc checking for cxx... (cached) /home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/tce-llvm/../../src/bintools/Compiler/oacc checking for gxx... (cached) /home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/tce-llvm/../../src/bintools/Compiler/oacc checking for tce-llvm-gcc... no checking for tce-llvm-gcj... no checking for tce-llvm-gfortran... no checking for ar... (cached) ar checking for as... (cached) as checking for tce-llvm-dlltool... no checking for ld... (cached) ld checking for tce-llvm-lipo... no checking for nm... (cached) nm checking for tce-llvm-objdump... no checking for ranlib... (cached) ranlib checking for tce-llvm-strip... no checking for tce-llvm-windres... no checking for tce-llvm-windmc... no checking where to find the target ar... pre-installed checking where to find the target as... pre-installed checking where to find the target cc... pre-installed in /home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/tce-llvm/../../src/bintools/Compiler checking where to find the target c++... pre-installed in /home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/tce-llvm/../../src/bintools/Compiler checking where to find the target c++ for libstdc++... pre-installed in /home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/tce-llvm/../../src/bintools/Compiler checking where to find the target dlltool... pre-installed checking where to find the target gcc... pre-installed checking where to find the target gcj... pre-installed checking where to find the target gfortran... pre-installed checking where to find the target ld... pre-installed checking where to find the target lipo... pre-installed checking where to find the target nm... pre-installed checking where to find the target objdump... pre-installed checking where to find the target ranlib... pre-installed checking where to find the target strip... pre-installed checking where to find the target windres... pre-installed checking where to find the target windmc... pre-installed checking whether to enable maintainer-specific portions of Makefiles... no checking whether -fkeep-inline-functions is supported... yes configure: creating ./config.status config.status: creating Makefile === Configuring newlib for little endian machines ===== checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking target system type... tcele-llvm checking for a BSD-compatible install... /usr/bin/install -c checking whether ln works... yes checking whether ln -s works... yes checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking for gnatbind... no checking for gnatmake... no checking whether compiler driver understands Ada... no checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2 checking for version 0.10 of PPL... no checking for correct version of CLooG... no checking for bison... bison -y checking for bison... bison checking for gm4... no checking for gnum4... no checking for m4... m4 checking for flex... flex checking for flex... flex checking for makeinfo... makeinfo checking for expect... no checking for runtest... runtest checking for ar... ar checking for as... as checking for dlltool... no checking for ld... ld checking for lipo... no checking for nm... nm checking for ranlib... ranlib checking for strip... strip checking for windres... no checking for windmc... no checking for objcopy... objcopy checking for objdump... objdump checking for cc... (cached) /home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/tcele-llvm/../../src/bintools/Compiler/oacc checking for gcc... (cached) /home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/tcele-llvm/../../src/bintools/Compiler/oacc checking for c++... (cached) /home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/tcele-llvm/../../src/bintools/Compiler/oacc checking for g++... (cached) /home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/tcele-llvm/../../src/bintools/Compiler/oacc checking for cxx... (cached) /home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/tcele-llvm/../../src/bintools/Compiler/oacc checking for gxx... (cached) /home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/tcele-llvm/../../src/bintools/Compiler/oacc checking for tcele-llvm-gcc... no checking for tcele-llvm-gcj... no checking for tcele-llvm-gfortran... no checking for ar... (cached) ar checking for as... (cached) as checking for tcele-llvm-dlltool... no checking for ld... (cached) ld checking for tcele-llvm-lipo... no checking for nm... (cached) nm checking for tcele-llvm-objdump... no checking for ranlib... (cached) ranlib checking for tcele-llvm-strip... no checking for tcele-llvm-windres... no checking for tcele-llvm-windmc... no checking where to find the target ar... pre-installed checking where to find the target as... pre-installed checking where to find the target cc... pre-installed in /home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/tcele-llvm/../../src/bintools/Compiler checking where to find the target c++... pre-installed in /home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/tcele-llvm/../../src/bintools/Compiler checking where to find the target c++ for libstdc++... pre-installed in /home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/tcele-llvm/../../src/bintools/Compiler checking where to find the target dlltool... pre-installed checking where to find the target gcc... pre-installed checking where to find the target gcj... pre-installed checking where to find the target gfortran... pre-installed checking where to find the target ld... pre-installed checking where to find the target lipo... pre-installed checking where to find the target nm... pre-installed checking where to find the target objdump... pre-installed checking where to find the target ranlib... pre-installed checking where to find the target strip... pre-installed checking where to find the target windres... pre-installed checking where to find the target windmc... pre-installed checking whether to enable maintainer-specific portions of Makefiles... no checking whether -fkeep-inline-functions is supported... yes configure: creating ./config.status config.status: creating Makefile === Configuring newlib for little endian 64-bit machines ===== checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking target system type... tcele64-llvm checking for a BSD-compatible install... /usr/bin/install -c checking whether ln works... yes checking whether ln -s works... yes checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking for gnatbind... no checking for gnatmake... no checking whether compiler driver understands Ada... no checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2 checking for version 0.10 of PPL... no checking for correct version of CLooG... no checking for bison... bison -y checking for bison... bison checking for gm4... no checking for gnum4... no checking for m4... m4 checking for flex... flex checking for flex... flex checking for makeinfo... makeinfo checking for expect... no checking for runtest... runtest checking for ar... ar checking for as... as checking for dlltool... no checking for ld... ld checking for lipo... no checking for nm... nm checking for ranlib... ranlib checking for strip... strip checking for windres... no checking for windmc... no checking for objcopy... objcopy checking for objdump... objdump checking for cc... (cached) /home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/tcele64-llvm/../../src/bintools/Compiler/oacc checking for gcc... (cached) /home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/tcele64-llvm/../../src/bintools/Compiler/oacc checking for c++... (cached) /home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/tcele64-llvm/../../src/bintools/Compiler/oacc checking for g++... (cached) /home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/tcele64-llvm/../../src/bintools/Compiler/oacc checking for cxx... (cached) /home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/tcele64-llvm/../../src/bintools/Compiler/oacc checking for gxx... (cached) /home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/tcele64-llvm/../../src/bintools/Compiler/oacc checking for tcele64-llvm-gcc... no checking for tcele64-llvm-gcj... no checking for tcele64-llvm-gfortran... no checking for ar... (cached) ar checking for as... (cached) as checking for tcele64-llvm-dlltool... no checking for ld... (cached) ld checking for tcele64-llvm-lipo... no checking for nm... (cached) nm checking for tcele64-llvm-objdump... no checking for ranlib... (cached) ranlib checking for tcele64-llvm-strip... no checking for tcele64-llvm-windres... no checking for tcele64-llvm-windmc... no checking where to find the target ar... pre-installed checking where to find the target as... pre-installed checking where to find the target cc... pre-installed in /home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/tcele64-llvm/../../src/bintools/Compiler checking where to find the target c++... pre-installed in /home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/tcele64-llvm/../../src/bintools/Compiler checking where to find the target c++ for libstdc++... pre-installed in /home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/tcele64-llvm/../../src/bintools/Compiler checking where to find the target dlltool... pre-installed checking where to find the target gcc... pre-installed checking where to find the target gcj... pre-installed checking where to find the target gfortran... pre-installed checking where to find the target ld... pre-installed checking where to find the target lipo... pre-installed checking where to find the target nm... pre-installed checking where to find the target objdump... pre-installed checking where to find the target ranlib... pre-installed checking where to find the target strip... pre-installed checking where to find the target windres... pre-installed checking where to find the target windmc... pre-installed checking whether to enable maintainer-specific portions of Makefiles... no checking whether -fkeep-inline-functions is supported... yes configure: creating ./config.status config.status: creating Makefile === Configuring newlib for riscv ===== checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking target system type... riscv-none checking for a BSD-compatible install... /usr/bin/install -c checking whether ln works... yes checking whether ln -s works... yes checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking for gnatbind... no checking for gnatmake... no checking whether compiler driver understands Ada... no checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2 checking for version 0.10 of PPL... no checking for correct version of CLooG... no checking for bison... bison -y checking for bison... bison checking for gm4... no checking for gnum4... no checking for m4... m4 checking for flex... flex checking for flex... flex checking for makeinfo... makeinfo checking for expect... no checking for runtest... runtest checking for ar... ar checking for as... as checking for dlltool... no checking for ld... ld checking for lipo... no checking for nm... nm checking for ranlib... ranlib checking for strip... strip checking for windres... no checking for windmc... no checking for objcopy... objcopy checking for objdump... objdump checking for cc... (cached) /home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/riscv-llvm/../../src/bintools/Compiler/oacc-riscv checking for gcc... (cached) /home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/riscv-llvm/../../src/bintools/Compiler/oacc-riscv checking for c++... (cached) /home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/riscv-llvm/../../src/bintools/Compiler/oacc-riscv checking for g++... (cached) /home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/riscv-llvm/../../src/bintools/Compiler/oacc-riscv checking for cxx... (cached) /home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/riscv-llvm/../../src/bintools/Compiler/oacc-riscv checking for gxx... (cached) /home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/riscv-llvm/../../src/bintools/Compiler/oacc-riscv checking for riscv-gcc... no checking for riscv-gcj... no checking for riscv-gfortran... no checking for ar... (cached) ar checking for as... (cached) as checking for riscv-dlltool... no checking for ld... (cached) ld checking for riscv-lipo... no checking for nm... (cached) nm checking for riscv-objdump... no checking for ranlib... (cached) ranlib checking for riscv-strip... no checking for riscv-windres... no checking for riscv-windmc... no checking where to find the target ar... pre-installed checking where to find the target as... pre-installed checking where to find the target cc... pre-installed in /home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/riscv-llvm/../../src/bintools/Compiler checking where to find the target c++... pre-installed in /home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/riscv-llvm/../../src/bintools/Compiler checking where to find the target c++ for libstdc++... pre-installed in /home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/riscv-llvm/../../src/bintools/Compiler checking where to find the target dlltool... pre-installed checking where to find the target gcc... pre-installed checking where to find the target gcj... pre-installed checking where to find the target gfortran... pre-installed checking where to find the target ld... pre-installed checking where to find the target lipo... pre-installed checking where to find the target nm... pre-installed checking where to find the target objdump... pre-installed checking where to find the target ranlib... pre-installed checking where to find the target strip... pre-installed checking where to find the target windres... pre-installed checking where to find the target windmc... pre-installed checking whether to enable maintainer-specific portions of Makefiles... no checking whether -fkeep-inline-functions is supported... yes configure: creating ./config.status config.status: creating Makefile checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating openasip-config config.status: creating src/Makefile config.status: creating src/base/Makefile config.status: creating src/base/tpef/Makefile config.status: creating src/base/mach/Makefile config.status: creating src/base/bem/Makefile config.status: creating src/base/idf/Makefile config.status: creating src/base/osal/Makefile config.status: creating src/base/umach/Makefile config.status: creating src/base/memory/Makefile config.status: creating src/base/program/Makefile config.status: creating src/base/Graph/Makefile config.status: creating src/tools/Makefile config.status: creating doc/Makefile config.status: creating src/bintools/Makefile config.status: creating src/bintools/TPEFDumper/Makefile config.status: creating src/bintools/PIG/Makefile config.status: creating src/bintools/DictionaryTool/Makefile config.status: creating src/bintools/BEMGenerator/Makefile config.status: creating src/bintools/BEMViewer/Makefile config.status: creating src/bintools/Assembler/Makefile config.status: creating src/bintools/Disassembler/Makefile config.status: creating src/bintools/BlocksTranslator/Makefile config.status: creating src/bintools/BlocksDisassembler/Makefile config.status: creating src/applibs/Scheduler/Selector/Makefile config.status: creating src/applibs/Scheduler/Algorithms/Makefile config.status: creating src/codesign/Makefile config.status: creating src/codesign/osal/Makefile config.status: creating src/codesign/osal/OSALBuilder/Makefile config.status: creating src/codesign/osal/OSALTester/Makefile config.status: creating src/codesign/osal/OSEd/Makefile config.status: creating src/codesign/ttasim/Makefile config.status: creating src/codesign/Proxim/Makefile config.status: creating src/codesign/Explorer/Makefile config.status: creating src/procgen/Makefile config.status: creating src/procgen/ProDe/Makefile config.status: creating data/bitmaps/Makefile config.status: creating data/Makefile config.status: creating conf/Makefile config.status: creating src/applibs/Makefile config.status: creating src/applibs/Interpreter/Makefile config.status: creating src/applibs/Simulator/Makefile config.status: creating src/applibs/wxToolkit/Makefile config.status: creating src/applibs/osal/Makefile config.status: creating src/applibs/TraceDB/Makefile config.status: creating src/applibs/bem/Makefile config.status: creating src/applibs/mach/Makefile config.status: creating src/applibs/idf/Makefile config.status: creating src/applibs/PIG/Makefile config.status: creating src/applibs/wxToolkit/MachineWindow/Makefile config.status: creating src/applibs/wxToolkit/GUIOptions/Makefile config.status: creating src/applibs/Assembler/Makefile config.status: creating src/applibs/hdb/Makefile config.status: creating src/applibs/dsdb/Makefile config.status: creating src/applibs/Estimator/Makefile config.status: creating src/applibs/HWGen/Makefile config.status: creating src/applibs/ProGe/Makefile config.status: creating src/applibs/EPSGenerator/Makefile config.status: creating src/applibs/costdb/Makefile config.status: creating src/applibs/program/Makefile config.status: creating src/codesign/Estimator/Makefile config.status: creating src/procgen/HDB/Makefile config.status: creating src/procgen/ProGe/Makefile config.status: creating src/procgen/HDBEditor/Makefile config.status: creating src/procgen/MachInfo/Makefile config.status: creating src/applibs/Scheduler/Makefile config.status: creating src/applibs/Scheduler/ResourceModel/Makefile config.status: creating src/applibs/Scheduler/ResourceManager/Makefile config.status: creating src/applibs/FSA/Makefile config.status: creating src/applibs/Explorer/Makefile config.status: creating scheduler/Makefile config.status: creating opset/Makefile config.status: creating opset/base/Makefile config.status: creating src/applibs/Scheduler/ProgramRepresentations/Makefile config.status: creating src/applibs/Scheduler/ProgramRepresentations/PDG/Makefile config.status: creating src/applibs/Scheduler/ProgramRepresentations/CFG/Makefile config.status: creating src/applibs/Scheduler/ProgramRepresentations/CDG/Makefile config.status: creating src/applibs/Scheduler/ProgramRepresentations/DDG/Makefile config.status: creating hdb/Makefile config.status: creating compressors/Makefile config.status: creating icdecoder_plugins/Makefile config.status: creating scripts/Makefile config.status: creating manual/Makefile config.status: creating cost_estimator_plugins/Makefile config.status: creating cost_estimator_plugins/rf/Makefile config.status: creating cost_estimator_plugins/fu/Makefile config.status: creating explorer/Makefile config.status: creating src/applibs/LLVMBackend/Makefile config.status: creating src/applibs/LLVMBackend/passes/Makefile config.status: creating src/bintools/Compiler/Makefile config.status: creating src/bintools/Compiler/tceopgen/Makefile config.status: creating src/bintools/Compiler/llvm-tce/Makefile config.status: creating src/applibs/ImplementationTester/Makefile config.status: creating src/applibs/PlatformIntegrator/Makefile config.status: creating tools/Makefile config.status: creating scheduler/testbench/Makefile config.status: creating scheduler/testbench/Operations/Makefile config.status: creating bclib/Makefile config.status: creating bclib/lwpr/Makefile config.status: creating bclib/saocl/Makefile config.status: creating bclib/cpp/Makefile config.status: creating bclib/include/Makefile config.status: creating bclib/include/CL/Makefile config.status: creating test/Makefile config.status: creating test/base/Makefile config.status: creating test/procgen/Makefile config.status: creating test/applibs/Makefile config.status: creating test/applibs/wxToolkit/Makefile config.status: creating test/applibs/Scheduler/Makefile config.status: creating test/applibs/Scheduler/ProgramRepresentations/Makefile config.status: creating src/codesign/Explorer/buildexplorerplugin config.status: creating src/codesign/Estimator/buildestimatorplugin config.status: creating src/bintools/PIG/buildcompressor config.status: creating src/procgen/ProGe/buildicdecoderplugin config.status: creating src/applibs/LLVMBackend/passes/buildllvmpass config.status: creating src/bintools/Compiler/oacc config.status: creating src/bintools/Compiler/oacc-riscv config.status: creating tce_config.h config.status: executing depfiles commands config.status: executing libtool commands


Found xerces-c library. Found boost library >= v.1.48.0 Found sqlite3 library. Found latex. Found latex2html. Found wxWidgets library. Found tcl library >= v.8.0 Found libedit. EditLineReader will be used as LineReader. Found LLVM version 15


karihepola commented 10 months ago

The ./configure output seems ok. Can you go to newlib-1.17.0/riscv-llvm and call make && make install manually after installing the toolset and see if this fixes the issue?

claubersouza commented 10 months ago

~/dev/fei/openasip-2.0/openasip/newlib-1.17.0/riscv-llvm$ make make[1]: Entering directory '/home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/riscv-llvm' make[1]: Nothing to be done for 'all-host'. Checking multilib configuration for newlib... make[2]: Entering directory '/home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/riscv-llvm/riscv/newlib' /bin/bash ./config.status --recheck running /bin/bash /home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/newlib/configure --cache-file=./config.cache --with-newlib --with-cross-host=x86_64-unknown-linux-gnu --prefix=/usr/local --disable-multilib --disable-libgloss --program-transform-name=s,^,riscv-, --with-target-subdir=riscv --build=x86_64-unknown-linux-gnu --host=riscv --target=riscv --srcdir=/home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/newlib CC=/home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/riscv-llvm/../../src/bintools/Compiler/oacc-riscv -B/home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/riscv-llvm/riscv/newlib/ -isystem /home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/riscv-llvm/riscv/newlib/targ-include -isystem /home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/newlib/libc/include CFLAGS=--tce-build-mode -D__riscv_float_abi_soft -D__riscv_xlen=32 -O2 -fno-builtin --disable-internalize -Wno-unknown-warning-option -Wno-literal-range -Wno-pointer-sign -Wno-return-type -Wno-empty-body -Wno-dangling-else -Wno-implicit-function-declaration -Wno-unused-value CPPFLAGS= LDFLAGS= build_alias=x86_64-unknown-linux-gnu host_alias=riscv target_alias=riscv --no-create --no-recursion configure: loading cache ./config.cache checking build system type... (cached) x86_64-unknown-linux-gnu checking host system type... (cached) riscv-none configure: error: invalid value of canonical host make[2]: [Makefile:444: config.status] Error 1 make[2]: Leaving directory '/home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/riscv-llvm/riscv/newlib' make[1]: [Makefile:8785: all-target-newlib] Error 2 make[1]: Leaving directory '/home/clauber/dev/fei/openasip-2.0/openasip/newlib-1.17.0/riscv-llvm' make: *** [Makefile:729: all] Error 2

karihepola commented 10 months ago

I am not sure what triggers this issue, I am unable to reproduce it. Can you try to do a fresh clone of OpenASIP and checkout the main branch? Check the new instructions in README.MD how to use the installation script (tools/scripts/install_riscv_tools.sh) to install RISC-V prerequisites.

claubersouza commented 10 months ago

ok, I will reinstall Opensip again, following the steps described in the README. Thank you very much for your help, I hope to bring good news

claubersouza commented 10 months ago

Do you have any virtual machine image with OpenASIP installed? @karihepola

claubersouza commented 10 months ago

I installed it but I still get the error:

(base) clauber@clauber-hp250g8notebookpc:~/dev/fei/openasip/tce_tutorials/tce_tour$ oacc-riscv -O3 -a start.adf --output-format=bin -o crc.img main.c crc.c ld.lld: error: unable to find library -lc ld.lld: error: unable to find library -lm

claubersouza commented 10 months ago

Hello, after a lot of work I managed to install and do a RISC-V tutorial. I used Ubuntu 20.04 and used VirtualBox, with just 1 CORE. Because I saw that the risc-v installation script had Make -j (core number) and this was causing it to not compile correctly. Just Doing Make Worked. Thanks @karihepola

karihepola commented 10 months ago

Hi! Time went by, sorry for not more actively helping. I am glad you got it to work! It sounds interesting that the GNU toolchain would fail a parallel build. Did it emit some error with a parallel build or did it finish successfully?

claubersouza commented 10 months ago

finish successfully