Forum Discussion

sharpertool's avatar
sharpertool
Icon for New Contributor rankNew Contributor
6 years ago

Error building examples: 'make test-fpga' fails with missing -lgcc and -lgcc_s

The output is here:

```

vsim -dpioutoftheblue 1 -sv_lib /home/edhenderson/intelFPGA_pro/20.1/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_conduit_fanout_10 -L resize_ir_cfan -L avalon_concatenate_singlebit_conduits_10 -L cat_done -L resize_osacat -L hls_sim_stream_source_dpi_bfm_10 -L sso_resize_original_image -L hls_sim_main_dpi_controller_10 -L main_dpi_controller -L cat_cwfsw -L hls_sim_component_dpi_controller_10 -L dpic_resize -L sso_resize_ratio -L hls_sim_clock_reset_10 -L clock_reset -L sso_resize_rows -L resize_en_cfan -L avalon_split_multibit_conduit_10 -L sp_cstart -L sso_resize_cols -L resize_cfan -L resize_internal_10 -L resize -L hls_sim_stream_sink_dpi_bfm_10 -L ssi_resize_resized_image -L altera_irq_mapper_1920 -L tb tb.tb

# Start time: 15:53:04 on Jun 13,2020

# ** Fatal: (vsim-3827) Could not compile 'export_tramp.so': cmd = '/home/edhenderson/intelFPGA_pro/20.1/gcc/bin/gcc -shared -fPIC -m32 -B/usr/lib32 -g -I. -I"/home/edhenderson/intelFPGA_pro/20.1/modelsim_ase/include" -I"/home/edhenderson/intelFPGA_pro/20.1/modelsim_ase/../oem/include" -o "/tmp/edhenderson@bondinorthbu_dpi_14286/linuxaloem_gcc-9.1.0/export_tramp.so" "/tmp/edhenderson@bondinorthbu_dpi_14286/linuxaloem_gcc-9.1.0/export_tramp.S"'

# (vsim-50) A call to system(/home/edhenderson/intelFPGA_pro/20.1/gcc/bin/gcc -shared -fPIC -m32 -B/usr/lib32 -g -I. -I"/home/edhenderson/intelFPGA_pro/20.1/modelsim_ase/include" -I"/home/edhenderson/intelFPGA_pro/20.1/modelsim_ase/../oem/include" -o "/tmp/edhenderson@bondinorthbu_dpi_14286/linuxaloem_gcc-9.1.0/export_tramp.so" "/tmp/edhenderson@bondinorthbu_dpi_14286/linuxaloem_gcc-9.1.0/export_tramp.S" >'/tmp/questatmp.cGbztW' 2>&1) returned error code '1'.

# The logfile contains the following messages:

# /home/edhenderson/intelFPGA_pro/20.1/gcc/bin/../lib/gcc/x86_64-pc-linux-gnu/9.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /home/edhenderson/intelFPGA_pro/20.1/gcc/bin/../lib/gcc/x86_64-pc-linux-gnu/9.1.0/libgcc.a when searching for -lgcc

# /home/edhenderson/intelFPGA_pro/20.1/gcc/bin/../lib/gcc/x86_64-pc-linux-gnu/9.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lgcc

# /home/edhenderson/intelFPGA_pro/20.1/gcc/bin/../lib/gcc/x86_64-pc-linux-gnu/9.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lgcc_s

# collect2: error: ld returned 1 exit status

```

I've installed, and re-installed the tools, including Modelsim. I've tried starter and FPGA edition (no license though).

I've sourced init_hls.sh of course. Here is my PATH and LD_LIBRARY_PATH

```

LD_LIBRARY_PATH=/home/edhenderson/intelFPGA_pro/20.1/gcc/lib64:/home/edhenderson/intelFPGA_pro/20.1/hls/host/linux64/lib:/home/edhenderson/intelFPGA_pro/20.1/modelsim_ae/gcc-4.7.4-linux/lib

PATH=/home/edhenderson/intelFPGA_pro/20.1/modelsim_ase/bin:/home/edhenderson/intelFPGA_pro/20.1/qsys/bin:/home/edhenderson/intelFPGA_pro/20.1/gcc/bin:/home/edhenderson/intelFPGA_pro/20.1/hls/bin:/home/edhenderson/intelFPGA_pro/20.1/qsys/bin:/home/edhenderson/intelFPGA_pro/20.1/quartus/bin:/home/edhenderson/intelFPGA_pro/20.1/quartus/sopc_builder/bin:/home/edhenderson/bin:/home/edhenderson/bin/:/home/edhenderson/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

```

I've tried adding that last part of LD_LIBRARY_PATH: /home/edhenderson/intelFPGA_pro/20.1/modelsim_ae/gcc-4.7.4-linux/lib

but does not help or hurt.

2 Replies

  • AnilErinch_A_Intel's avatar
    AnilErinch_A_Intel
    Icon for Frequent Contributor rankFrequent Contributor

    Hi

    Would like to know whether you were able to run the compile on any other version of HLS,

    Can you try the same with 19.1 version also , so that we can rule out any version specific issues , and also rule out any issue with the setup.

    Thanks and Regards

    Anil

  • AnilErinch_A_Intel's avatar
    AnilErinch_A_Intel
    Icon for Frequent Contributor rankFrequent Contributor

    Hi ,

    Please let us know whether by using 19.1 version of HLS this issue is resolved.

    Thanks and Regards

    Anil