Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
1,357 Views

Compiler error: Could not initialize class sun.awt.X11.XToolkit

Dear all, 

 

I'm trying to compile kernels, but sometimes the compiler gives an "Error: Qsys-script FAILED" error. 

 

In <kernelname/kernelname.log>: there are several error messages: 

 

Error: add_instance clk_1x altera_clock_bridge : Can't connect to X11 window server using 'localhost:11.0' as the value of the DISPLAY variable. 

add_instance clk_2x altera_clock_bridge : Could not initialize class sun.awt.X11.XToolkit 

... (more errors complaining about sun.awt.X11.XToolkit) 

Error: save_system kernel_system.qsys: Could not initialize class sun.awt.X11.XToolkit 

 

The compiler parameters were: aoc --fp-relaxed --fpc --report --profile <kernel.cl

 

It is expected that it cannot open a window (it is running in a "screen"), but I do not want it to. How do I prevent this error? Currently my guess is to unset the display variable. As I do not know what triggers this error, and compiling takes pretty long, I do not currently know if this works. 

 

Ideas welcome! Thanks in advance!
0 Kudos
3 Replies
Altera_Forum
Honored Contributor I
256 Views

This is a very old bug in Quartus, I sometimes encountered it with v15 but I don't remember encountering it again since v16. Are you using the latest version of Quartus and the OpenCL SDK? 

If you are using the latest version of Quartus and you still get this error, make sure you are not enabling X11 forwarding when you are connecting to your machine with SSH (no -X or -Y). Also try closing your screen session and opening a new one.
Altera_Forum
Honored Contributor I
256 Views

Thanks for the suggestion, I'll try it out. I'm using v16.0 (no v16.1 for our board yet).  

 

For reference for others: ssh X forwarding is sometimes enabled by default, turn it off by using ssh -x. Disabling X forwarding means the DISPLAY enviroment variable does not get set.
Altera_Forum
Honored Contributor I
256 Views

Update: This seems to work. You can also use 

 

unset DISPLAY 

 

before starting the compiler instead of disabling X forwarding.
Reply