Giter VIP home page Giter VIP logo

Comments (5)

Abraham-Castaneda avatar Abraham-Castaneda commented on July 26, 2024

I'm having a very similar issue, only difference is that I am using riscv64-unknown-elf-gcc and am using a different set of compiler flags (other than that our supplied arguments are the same). I hope someone sheds some light on this!

from embench-iot.

WeiyanZh avatar WeiyanZh commented on July 26, 2024

When I use
python3 ./build_all.py --arch riscv32 --chip generic --board ri5cyverilator --cc riscv32-unknown-elf-gcc --cflags=-c

I got:
aha-mont64
crc32
Warning: Link of benchmark "cubic" failed
edn
huffbench
matmult-int
minver
Warning: Link of benchmark "nbody" failed
nettle-aes
nettle-sha256
nsichneu
picojpeg
qrduino
sglib-combined
slre
Warning: Link of benchmark "st" failed
statemate
ud
Warning: Link of benchmark "wikisort" failed

part of log file:
Compilation of benchmark "nbody" successful
Warning: Link of benchmark "nbody" failed

/opt/riscv-gnu-toolchain-dist-rv32imac-ilp32/bin/../lib/gcc/riscv32-unknown-elf/10.2.0/../../../../riscv32-unknown-elf/bin/ld: nbody.o: in function .L9': **nbody.c:(.text+0x2fc): undefined reference to sqrt'
collect2: error: ld returned 1 exit status**

In directory "/home/embench-iot/bd/src/nbody"
Command was:
riscv32-unknown-elf-gcc -o nbody nbody.o /home/embench-iot/bd/config/riscv32/chips/generic/chipsupport.o /home/embench-iot/bd/config/riscv32/boards/ri5cyverilator/boardsupport.o /home/embench-iot/bd/support/main.o /home/embench-iot/bd/support/beebsc.o
Compilation of benchmark "nettle-aes" successful

from embench-iot.

sobuch avatar sobuch commented on July 26, 2024

Hi, I think the answer is already in the thread you linked here previously - you need to also add --user-libs="-lm" to compile with libm which contains e.g. the function sqrt. Alternatively, you can use the dummy libraries (that would be something like --dummy-libs="crt0 libc libgcc libm"), but in this case only benchmarking code size would make sense.

from embench-iot.

Abraham-Castaneda avatar Abraham-Castaneda commented on July 26, 2024

Like sobuch said, libs="-lm" should fix the issue, it did it for me.

from embench-iot.

WeiyanZh avatar WeiyanZh commented on July 26, 2024

Yes, thanks you sobuch and Abraham.

from embench-iot.

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.