# Riscv E31 Arty example in Eclipse Error

**URL:** <https://forums.sifive.com/t/riscv-e31-arty-example-in-eclipse-error/6064>\
**Category:** HiFive Unleashed\
**Created:** [March 6, 2023, 5:23pm UTC](https://forums.sifive.com/t/riscv-e31-arty-example-in-eclipse-error/6064 "2023-03-06T17:23:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![hparpinel](https://avatars.discourse-cdn.com/v4/letter/h/e495f1/32.png) [@hparpinel](https://forums.sifive.com/u/hparpinel)\
**Post date:** [March 6, 2023, 5:23pm UTC](https://forums.sifive.com/t/riscv-e31-arty-example-in-eclipse-error/6064/1 "2023-03-06T17:23:50Z")

</div>

Hi,  
I am trying to run the Riscv E31 Arty example in Eclipse but I am getting the error below:  
make all  
Building file: …/xpacks/micro-os-plus-semihosting/src/syscalls-semihosting.cpp  
Invoking: GNU RISC-V Cross C++ Compiler  
riscv-none-elf-g++ -march=rv32imac -mabi=ilp32 -mcmodel=medany -msmall-data-limit=8 -mno-save-restore -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-move-loop-invariants -Wall -Wextra -g3 -DDEBUG -DOS\_USE\_SEMIHOSTING\_SYSCALLS -DOS\_USE\_CPP\_INTERRUPTS -DTRACE -DOS\_USE\_TRACE\_SEMIHOSTING\_DEBUG -DSIFIVE\_E31ARTY -DSIFIVE\_E31ARTY\_BOARD -I"…/include" -I"…/xpacks/micro-os-plus-diag-trace/include" -I"…/xpacks/micro-os-plus-semihosting/include" -I"…/xpacks/sifive-devices/include" -I"…/xpacks/sifive-arty-boards/include" -I"…/xpacks/micro-os-plus-c-libs/include" -I"…/xpacks/micro-os-plus-riscv-arch/include" -I"…/xpacks/micro-os-plus-startup/include" -std=gnu++14 -fabi-version=0 -fno-exceptions -fno-rtti -fno-use-cxa-atexit -fno-threadsafe-statics -MMD -MP -MF"xpacks/micro-os-plus-semihosting/src/syscalls-semihosting.d" -MT"xpacks/micro-os-plus-semihosting/src/syscalls-semihosting.o" -c -o “xpacks/micro-os-plus-semihosting/src/syscalls-semihosting.o” “…/xpacks/micro-os-plus-semihosting/src/syscalls-semihosting.cpp”  
…/xpacks/micro-os-plus-semihosting/src/syscalls-semihosting.cpp:1569:3: error: ‘int select(int, fd\_set\*, fd\_set\*, fd\_set\*, timeval\*)’ aliased to undefined symbol ‘\_ZN5posix6selectEiP13\_types\_fd\_setS1\_S1\_P7timeval’  
1569 | select (int nfds, fd\_set\* readfds, fd\_set\* writefds, fd\_set\* errorfds,  
| ^ ~~~~~  
make: \*\*\* [xpacks/micro-os-plus-semihosting/src/subdir.mk:23: xpacks/micro-os-plus-semihosting/src/syscalls-semihosting.o] Error 1  
“make all” terminated with exit code 2. Build might be incomplete.

---

<div class="post-metadata">

**Author:** ![ilg](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.sifive.com/ilg/32/871_2.png) [@ilg](https://forums.sifive.com/u/ilg)\
**Post date:** [March 6, 2023, 7:37pm UTC](https://forums.sifive.com/t/riscv-e31-arty-example-in-eclipse-error/6064/2 "2023-03-06T19:37:08Z")

</div>

The Eclipse project template is pretty old and requires some minor updates. I’ll check it and try to suggest a workaround.

---

<div class="post-metadata">

**Author:** ![hparpinel](https://avatars.discourse-cdn.com/v4/letter/h/e495f1/32.png) [@hparpinel](https://forums.sifive.com/u/hparpinel)\
**Post date:** [March 6, 2023, 8:19pm UTC](https://forums.sifive.com/t/riscv-e31-arty-example-in-eclipse-error/6064/3 "2023-03-06T20:19:30Z")

</div>

Thanks

---

<div class="post-metadata">

**Author:** ![ilg](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.sifive.com/ilg/32/871_2.png) [@ilg](https://forums.sifive.com/u/ilg)\
**Post date:** [March 6, 2023, 9:28pm UTC](https://forums.sifive.com/t/riscv-e31-arty-example-in-eclipse-error/6064/4 "2023-03-06T21:28:22Z")

</div>

With the latest toolchain, please enter `_zicsr` in the Other extensions field (C/C++ Build → Settings → Tool Settings → Target Processor), and in `syscalls-semihosting.cpp`, comment out the select() at lines 1568-1570.

The first issue is caused by a change in how the RISC-V standard defines the extensions and the second by a change in newlib.

Also please note that the _SiFive RISC-V C/C++ Project_ template is deprecated. For an updated template, see the _Hello World RISC-V QEMU xPack_.

---

<div class="post-metadata">

**Author:** ![hparpinel](https://avatars.discourse-cdn.com/v4/letter/h/e495f1/32.png) [@hparpinel](https://forums.sifive.com/u/hparpinel)\
**Post date:** [March 6, 2023, 9:51pm UTC](https://forums.sifive.com/t/riscv-e31-arty-example-in-eclipse-error/6064/5 "2023-03-06T21:51:00Z")

</div>

Thank you! It builds now.

~H

---

<div class="post-metadata">

**Author:** ![hparpinel](https://avatars.discourse-cdn.com/v4/letter/h/e495f1/32.png) [@hparpinel](https://forums.sifive.com/u/hparpinel)\
**Post date:** [March 13, 2023, 10:07pm UTC](https://forums.sifive.com/t/riscv-e31-arty-example-in-eclipse-error/6064/6 "2023-03-13T22:07:15Z")

</div>

Hi, Thank you for helping me with my previous issue. I have another question, do I need to make any changes to the device files in order to load the design to an Arty- A7 100T? This is the board I have in hand and I would like to load the demo to it.

Thank you,  
Hellen

---

<div class="post-metadata">

**Author:** ![ilg](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.sifive.com/ilg/32/871_2.png) [@ilg](https://forums.sifive.com/u/ilg)\
**Post date:** [March 14, 2023, 6:16am UTC](https://forums.sifive.com/t/riscv-e31-arty-example-in-eclipse-error/6064/7 "2023-03-14T06:16:19Z")

</div>

I’m afraid I don’t have an answer for this. If I remember right, by the time those templates were written, they were configured for a smaller Arty board.
