Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21184 Discussions

HLS compilation issues

Liyen
Beginner
1,544 Views

Hello,

    I installed Quartus Lite 18.1 and came with HLS compiler 18, I tried to

compile the QRD example but encountered following build errors, I think

these are related to incompatible glibc version used to build HLS i++  and

the one installed on my system, could you please advise how to work

around such problems? much appreciate for support

 

g++ --version
g++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is N
O
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOS
E.

Tried to make QRD example project here...

make  
No target specified, defaulting to test-x86-64
Available targets: test-x86-64, test-fpga, test-gpp, clean
i++  MGS.cpp QRD_Testbench.cpp TestbenchHelpers.cpp   --fpc --fp-relaxed
-march=x86-64 -o test-x86-64
In file included from MGS.cpp:1:
In file included from ./MGS.h:4:
In file included from /mnt/usb-drive1/Altera/Quartus-lite-18.1/hls/includ
e/HLS/hls.h:11:
In file included from /mnt/usb-drive1/Altera/Quartus-lite-18.1/hls/includ
e/HLS/hls_internal.h:10:
In file included from /usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../inc
lude/c++/7.5.0/stdlib.h:36:
In file included from /usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../inc
lude/c++/7.5.0/cstdlib:76:
/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/st
d_abs.h:55:26: error:  
     use of undeclared identifier '__builtin_labs'
 abs(long __i) { return __builtin_labs(__i); }
                        ^
/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/st
d_abs.h:60:31: error:  
     use of undeclared identifier '__builtin_llabs'
 abs(long long __x) { return __builtin_llabs (__x); }
                             ^
In file included from MGS.cpp:1:
In file included from ./MGS.h:5:
In file included from /mnt/usb-drive1/Altera/Quartus-lite-18.1/hls/includ
e/HLS/ac_int.h:99:
In file included from /usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../inc
lude/c++/7.5.0/iostream:38:
In file included from /usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../inc
lude/c++/7.5.0/ostream:37:
In file included from /usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../inc
lude/c++/7.5.0/ios:41:
In file included from /usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../inc
lude/c++/7.5.0/bits/ios_base.h:38:
/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/ext/ato
micity.h:48:45: error:  
     use of undeclared identifier '__ATOMIC_ACQ_REL'
 { return __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL); }
                                           ^
/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/ext/ato
micity.h:52:38: error:  
     use of undeclared identifier '__ATOMIC_ACQ_REL'
 { __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL); }
                                    ^
4 errors generated.
HLS x86-64 compile FAILED.
Makefile:40: recipe for target 'test-x86-64' failed
make: *** [test-x86-64] Error 1

make test-fpga
i++ MGS.cpp QRD_Testbench.cpp TestbenchHelpers.cpp   -v --fpc --fp-relaxe
d -I/usr/include/x86_64-linux-gnu/c++/7 -march=CycloneV -o test-fpga --fp
ga-only -ghdl
Target FPGA part name:   5CEFA9F23I7
Target FPGA family name: Cyclone V
Target FPGA speed grade: -7
Warning:-o has no effect. Project directory name set during -c compile
Analyzing MGS.cpp for testbench generation
In file included from MGS.cpp:1:
In file included from ./MGS.h:4:
In file included from /mnt/usb-drive1/Altera/Quartus-lite-18.1/hls/includ
e/HLS/hls.h:11:
In file included from /mnt/usb-drive1/Altera/Quartus-lite-18.1/hls/includ
e/HLS/hls_internal.h:10:
In file included from /usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../inc
lude/c++/7.5.0/stdlib.h:36:
In file included from /usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../inc
lude/c++/7.5.0/cstdlib:76:
/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/st
d_abs.h:55:26: error:  
     use of undeclared identifier '__builtin_labs'
 abs(long __i) { return __builtin_labs(__i); }
                        ^
/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/st
d_abs.h:60:31: error:  
     use of undeclared identifier '__builtin_llabs'
 abs(long long __x) { return __builtin_llabs (__x); }
                             ^
In file included from MGS.cpp:1:
In file included from ./MGS.h:5:
In file included from /mnt/usb-drive1/Altera/Quartus-lite-18.1/hls/includ
e/HLS/ac_int.h:99:
In file included from /usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../inc
lude/c++/7.5.0/iostream:38:
In file included from /usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../inc
lude/c++/7.5.0/ostream:37:
In file included from /usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../inc
lude/c++/7.5.0/ios:41:
In file included from /usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../inc
lude/c++/7.5.0/bits/ios_base.h:38:
/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/ext/ato
micity.h:48:45: error:  
     use of undeclared identifier '__ATOMIC_ACQ_REL'
 { return __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL); }
                                           ^
/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/ext/ato
micity.h:52:38: error:  
     use of undeclared identifier '__ATOMIC_ACQ_REL'
 { __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL); }
                                    ^
4 errors generated.
HLS Testbench parse FAILED.
Makefile:54: recipe for target 'test-fpga' failed
make: *** [test-fpga] Error 1

 

Labels (1)
0 Kudos
8 Replies
BoonBengT_Intel
Moderator
1,499 Views

Hi @Liyen


Thank you for posting in Intel community forum and hope all is well.

Suspecting as per mention the gcc seems to be incompatible version, recommende version of gcc for version 18 is 4.4.7.

Hence would suggestion to reinstall the correct gcc version by following the instruction in the link below:

- https://cdrdv2-public.intel.com/705011/ug-hls-getting-started-18-1-1-683680-705011.pdf


Hope that clarify.

Best Wishes

BB


0 Kudos
Liyen
Beginner
1,399 Views

Hi Boon,

    much appreciate for responding to my questions, in fact, per wonderful know-how folks who were so nice to describe their kindness, these issues are all cleared but left some intrinsic GUI issues of modelsim which

were known decades ago, perhaps they didn't think that matter, this is okay.

     the problem is still strange, that why modelsim looks into a directory under root, / , which wasn't installed

by modelsim starter edition installer, for all the required packages? but it behaved properly after clean up

several issues of init, config files under my personal home. thank you very much for all endeavors.

     To be honest to you, the reason I dived into intel FPGA device development was for, complex project work

like open-cv, gnu-radio, and adas/ ai types, I'd believe besides intrinsic HDL works, there are also critical HLS

development, but I don't find something like xf-opencv from xilinx that was offered by altera/intel? I wonder

if you could advise some professional (open source is preferred) HLS project works based upon altera/intel

FPGA development packages? thank you

 

-lieyn-

0 Kudos
BoonBengT_Intel
Moderator
1,470 Views

Hi @Liyen,


Greetings, just checking in to see if there is any further doubts in regards to this matter.

Hope your doubts have been clarified.


Best Wishes

BB


0 Kudos
Liyen
Beginner
1,457 Views

HI Boon,

   Much appreciate for the advice, it did solve my problem to launch i++, however, I immediately ran into

another issue with, this time, Modelsim starter edition, below is the error prompted either I ran in the

terminal or thru Quartus interface, I understood these were emitted from libtcl, the issue is that

/mtitcl/vsim wasn't part of Modelsim_ase setup during Quartus installation, and I don't see how/where

I can modify this path to lead to correct location (I found pkgIndex.tcl provided uch info), could you

please help me on this one as well? much appreciate

 

linux$ vsim

Error in startup script: can't find package Msg
   while executing
"package require Msg"
   invoked from within
"ncFyP12 -+"
   (file "/mtitcl/vsim/vsim" line 1)
** Fatal: Read failure in vlm process (0,0)

0 Kudos
BoonBengT_Intel
Moderator
1,415 Views

Hi @Liyen,


Good to know that you managed to run i++ now.

As for the modelsim issues, to check you have installed modelsim starter edition you mention?

And based on the error it seems like a missing files/library, and you mention you are able to find the required files and modify the path accordingly?

Does that help on fixing the issues?


Best Wishes

BB


0 Kudos
BoonBengT_Intel
Moderator
1,322 Views

Hi @Liyen,


Good to know that the complier gcc version issues has been fixed.

For the modelsim issues we do have a better experiences team supporting that as link below:

- https://community.intel.com/t5/Intel-FPGA-Software-Installation/bd-p/fpga-software-installation-licensing

Perhaps if you can provide more details on the errors and logs that would be better for us to dig deeper into the strange issues.


As for the example project for HLS, upon installation there will be included in the following path below:

- <quartus_installdir>/hls/examples/<design_example_name>

Hope that clarify


Best Wishes

BB


0 Kudos
BoonBengT_Intel
Moderator
1,289 Views

Hi @Liyen,


Greetings, just checking in to see if there is any further doubts in regards to this matter.

Hope your doubts have been clarified.


Best Wishes

BB


0 Kudos
BoonBengT_Intel
Moderator
1,221 Views

Hi @Liyen,


Greetings, as we do not receive any further clarification/updates on the matter, hence would assume challenge are overcome. Please login to ‘https://supporttickets.intel.com’, view details of the desire request, and post a feed/response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. For new queries, please feel free to open a new thread and we will be right with you. Pleasure having you here.


Best Wishes

BB


0 Kudos
Reply