pulp-platform / pulpino

An open-source microcontroller system based on RISC-V
http://www.pulp-platform.org
Other
899 stars 298 forks source link

Error while running make helloworld.vsim. Could not compile 'export_tramp.so': #404

Open haresh-seenivasagan opened 10 months ago

haresh-seenivasagan commented 10 months ago

I am facing the following error when trying to run the helloworld simulation

# vsim -quiet tb -L pulpino_lib -L axi_node_lib -L apb_node_lib -L axi_mem_if_DP_lib -L axi_spi_slave_lib -L axi_spi_master_lib -L apb_uart_sv_lib -L apb_gpio_lib -L apb_event_unit_lib -L apb_spi_master_lib -L fpu_lib -L apb_pulpino_lib -L apb_fll_if_lib -L core2axi_lib -L apb_timer_lib -L axi2apb_lib -L apb_i2c_lib -L zero_riscy_lib -L axi_slice_dc_lib -L riscv_lib -L apb_uart_lib -L axi_slice_lib -L adv_dbg_if_lib -L apb2per_lib "+nowarnTRAN" "+nowarnTSCALE" "+nowarnTFMPC" "+MEMLOAD=PRELOAD" -t ps -voptargs="+acc -suppress 2103" -GTEST="" -gRISCY_RV32F=1 -gZERO_RV32E=0 -gZERO_RV32M=0 -gUSE_ZERO_RISCY=0 
# Start time: 18:47:41 on Jan 08,2024
# ** Fatal: ** Error: (vsim-3827) Could not compile 'export_tramp.so': cmd = '/usr/bin/gcc   -shared -fPIC -m32 -B/usr/lib32  -g  -I. -I"/intelFPGA/18.0/modelsim_ase/include" -I"/intelFPGA/18.0/modelsim_ase/../oem/include" -o "/tmp/har@har-HP-Laptop-14s-cr2xxx_dpi_26456/linuxpe_gcc-5.5.0/export_tramp.so" "/tmp/har@har-HP-Laptop-14s-cr2xxx_dpi_26456/linuxpe_gcc-5.5.0/export_tramp.S"'
# (vsim-50) A call to system(/usr/bin/gcc   -shared -fPIC -m32 -B/usr/lib32  -g  -I. -I"/intelFPGA/18.0/modelsim_ase/include" -I"/intelFPGA/18.0/modelsim_ase/../oem/include" -o "/tmp/har@har-HP-Laptop-14s-cr2xxx_dpi_26456/linuxpe_gcc-5.5.0/export_tramp.so" "/tmp/har@har-HP-Laptop-14s-cr2xxx_dpi_26456/linuxpe_gcc-5.5.0/export_tramp.S" >'/tmp/questatmp.zoSuFb' 2>&1) returned error code '1'.
# The logfile contains the following messages:
# /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/5/libgcc.a when searching for -lgcc
# /usr/bin/ld: cannot find -lgcc
# /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/5/libgcc_s.so when searching for -lgcc_s
# /usr/bin/ld: cannot find -lgcc_s
# collect2: error: ld returned 1 exit status

My modelsim version is Model Technology ModelSim ALTERA STARTER EDITION vsim 10.5b Simulator 2016.10 Oct 5 2016 My GCC version is 5.5.0 I am running Ubuntu 18.04

When i was trying to install Modelsim i created a symbolic link to deal with an issue that i was facing sudo ln -s linuxaloem linux_x86_64pe

also following this guide for modelsim installation https://mil.ufl.edu/3701/docs/quartus/linux/ModelSim_linux.pdf I compiled a 32-bit version of the FreeType library and placed it in a lib32 directory within the ModelSim directory

I was wondering if these 2 steps above could have caused this issue. I would really really appreciate any comments / advice as to how i can proceed from here as i am a beginner and i am quite lost on how to begin solving this issue. Thank you in advance