I am using Ubuntu 18.04. I have Quartus Prime Lite 19.1 installed and it is running okay, including ModelSim and the Nios II software development kit.
I installed the HLS available for Lite 19.1. The file makes it sound like the Pro version, but I doubt that.
When I try to compile anything with i++, I get errors such as missing bits/c++config.h or __builtin_labs and __builtin_llabs.
The getting started guide for HLS Standard, says it only works with gcc 4.4.7. The getting started guide for HLS Pro says it only works with gcc 9.1.0. Neither is available with Ubuntu 18.04.
The version of i++ is 19.1.
What version of gcc do I need for HLS with Quartus Prime Lite 19.1?
The latest version of OS officially supported for 19.1 is Ubuntu 16.04 as you can see from the below link.
But if you would like , you can try to use GCC version 4.4.7 in Ubuntu 18.04 for the compilation and let us know results.
Thanks and Regards
Just as a side note - Ubuntu 16.04 is no easy fix for Quartus. When I initially had issues getting Quartus Prime Lite 19.1 running under Ubuntu 18.04, I installed Ubuntu 16.04 hoping that it would solve the issues since it is the officially supported version. But it did not fix anything. So I went back to Ubuntu 18.04. I had to do many things to get Quartus to run without any errors. Getting ModelSim and the Nios II EDK running were equally frustrating. But I eventually got them working. I found other people on the internet had run into the same issues.
GCC version 4.4.7 is not available in Ubuntu 18.04 nor Ubuntu 16.04, but it is available in Ubuntu 12.04. So I installed a chroot environment with Ubuntu 12.04 in my Ubuntu 18.04 system. I manually installed gcc 4.4.7 (because it was still not the default version). I had to install a few libraries and add an include directive for the compiler. I don't have ModelSim working yet under Ubuntu 12.04.
But by using both Ubuntu 12.04 for gcc and Ubuntu 18.04 for i++, I have been able to successfully make the /hls/examples/tutorials/usability/compiler_interoperability fpga_testbench.
It shouldn't be this difficult. I'm only putting up with this software mess because there is some hardware I want to use.
Using CentOS could have saved you a lot of time; CentOS is by the far the best-supported OS for FPGA development both for Intel and Xilinx. Also you can manually compile any version of GCC from source on any OS, you don't need to go all the way back to Ubuntu 12.04 which reached its end of life a long time ago to get access to GCC 4.4.7.