Intel HLS compiler - Hitting Fatal Error when linking export_tramp.so library
I am trying to get the "counter" example from the Intel HLS tool to compile and work . I have done all the setup appropriately and I am using the quartus and HLS version 19.4.
After installing the required GCC for the HLS, I am seeing a vsim error ( ModelSim) during elab.
Error message :
# /home/inteluser/Desktop/intelFPGA_pro/19.4/hls/host/linux64/lib/libhls_cosim_msim32
# -dpioutoftheblue 1 -sv_lib /home/inteluser/Desktop/intelFPGA_pro/19.4/hls/host/linux64/lib/libhls_cosim_msim32
# [exec] elab
# vsim -dpioutoftheblue 1 -sv_lib /home/inteluser/Desktop/intelFPGA_pro/19.4/hls/host/linux64/lib/libhls_cosim_msim32 -L work -L work_lib -L altera_ver -L lpm_ver -L sgate_ver -L altera_mf_ver -L altera_lnsim_ver -L twentynm_ver -L twentynm_hssi_ver -L twentynm_hip_ver -L altera -L lpm -L sgate -L altera_mf -L altera_lnsim -L twentynm -L twentynm_hssi -L twentynm_hip -L avalon_concatenate_singlebit_conduits_10 -L cat_done -L cat_cwfsw -L avalon_conduit_fanout_10 -L resize_ir_cfan -L hls_sim_stream_source_dpi_bfm_10 -L sso_resize_original_image -L resize_cfan -L sso_resize_cols -L sso_resize_ratio -L resize_en_cfan -L resize_internal_10 -L resize -L hls_sim_component_dpi_controller_10 -L dpic_resize -L hls_sim_main_dpi_controller_10 -L main_dpi_controller -L hls_sim_stream_sink_dpi_bfm_10 -L ssi_resize_resized_image -L resize_osacat -L sso_resize_rows -L avalon_split_multibit_conduit_10 -L sp_cstart -L hls_sim_clock_reset_10 -L clock_reset -L altera_irq_mapper_191 -L tb tb.tb
# Start time: 12:12:12 on Jan 13,2020
# ** Fatal: ** Fatal: (vsim-3827) Could not compile 'export_tramp.so': cmd = '/home/inteluser/Desktop/intelFPGA_pro/19.4/hls/gcc/bin/gcc -shared -fPIC -m32 -B/usr/lib32 -g -I. -I"/home/inteluser/Desktop/intelFPGA_pro/19.4/modelsim_ae/include" -I"/home/inteluser/Desktop/intelFPGA_pro/19.4/modelsim_ae/../oem/include" -o "/tmp/inteluser@IL-ACL-NUC-07_dpi_4608/linuxpe_gcc-5.4.0/export_tramp.so" "/tmp/inteluser@IL-ACL-NUC-07_dpi_4608/linuxpe_gcc-5.4.0/export_tramp.S"'
# (vsim-50) A call to system(/home/inteluser/Desktop/intelFPGA_pro/19.4/hls/gcc/bin/gcc -shared -fPIC -m32 -B/usr/lib32 -g -I. -I"/home/inteluser/Desktop/intelFPGA_pro/19.4/modelsim_ae/include" -I"/home/inteluser/Desktop/intelFPGA_pro/19.4/modelsim_ae/../oem/include" -o "/tmp/inteluser@IL-ACL-NUC-07_dpi_4608/linuxpe_gcc-5.4.0/export_tramp.so" "/tmp/inteluser@IL-ACL-NUC-07_dpi_4608/linuxpe_gcc-5.4.0/export_tramp.S" >'/tmp/questatmp.R7Tvdk' 2>&1) returned error code '1'.
# The logfile contains the following messages:
# /home/inteluser/Desktop/intelFPGA_pro/19.4/hls/gcc/bin/ld: skipping incompatible /home/inteluser/Desktop/intelFPGA_pro/19.4/hls/gcc/lib/gcc/x86_64-unknown-linux-gnu/5.4.0/libgcc.a when searching for -lgcc
# /home/inteluser/Desktop/intelFPGA_pro/19.4/hls/gcc/bin/ld: cannot find -lgcc
# /home/inteluser/Desktop/intelFPGA_pro/19.4/hls/gcc/bin/ld: cannot find -lgcc_s
# collect2: error: ld returned 1 exit status