SpinalHDL Unbuntu Verilator仿真 crush 问题

SpinalHDL 在IDEA 中能正常仿真,但在terminal 中会crush

fatal error: jni.h: No such file or directory

[info] [Progress] Simulation workspace in /homeXXXXX/./simWorkspace/intHubSim
[info] [Progress] Verilator compilation started
[info] ../verilator/VintHubSim__spinalWrapper.cpp:5:10: fatal error: jni.h: No such file or directory
[info]     5 | #include <jni.h>
[info]       |          ^~~~~~~
[info] compilation terminated.
[info] make[1]: *** [VintHubSim.mk:76: VintHubSim__spinalWrapper.o] Error 1
[info] make[1]: *** Waiting for unfinished jobs....
[error] Exception in thread "main" java.lang.AssertionError: assertion failed: Verilator C++ model compilation failed
[error] 	at scala.Predef$.assert(Predef.scala:223)
[error] 	at spinal.sim.VerilatorBackend.$anonfun$compileVerilator$20(VerilatorBackend.scala:651)
[error] 	at spinal.sim.VerilatorBackend.cacheSynchronized(VerilatorBackend.scala:75)

原因: java 不是指定的JAVA

$ which  java
/usr/bin/java
$ java -version
openjdk version "11.0.17" 2022-10-18
OpenJDK Runtime Environment (build 11.0.17+8-post-Ubuntu-1ubuntu220.04)
OpenJDK 64-Bit Server VM (build 11.0.17+8-post-Ubuntu-1ubuntu220.04, mixed mode, sharing)

$ $JAVA_HOME/bin/java -version 
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)

为啥设置了JAVA_HOME, java 的版本还是没变化, 跟PATH的设置方式有关

export JAVA_HOME=/pub/xxxxxtool/java/jdk1.8.0_144/
export PATH=$PATH:$JAVA_HOME/bin

改成

export JAVA_HOME=/pub/xxxxxtool/java/jdk1.8.0_144/
export PATH=$JAVA_HOME/bin:$PATH
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值