HLS compilation issues
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