Quartus 17.0 Prime install on Fedora 26

After installling Quartus on a x86_64 fedora 26, I fell upon the lib12.so.0 error.

$ quartus

quartus: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory

The simple solution is

$ sudo dnf install libpng12-devel.i686

Unfortunately I was not unable to program the bitstream on the fpga, thus I started debugging the jtag connection:

$ dmesg | tail
$ lsusb | grep Altera

$ gedit /etc/udev/rules.d/51-usbblaster.rules &

Paste the following on the file:

# For Altera USB-Blaster permissions.
SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6001", MODE="0666"

$ sudo mkdir /etc/jtagd
$ sudo cp /home/chitlesh/intelFPGA_lite/17.0/quartus/linux64/pgm_parts.txt /etc/jtagd/jtagd.pgm_parts.txt
$ jtagd --foreground --debug

JTAG daemon started
Using config file /etc/jtagd/jtagd.conf
Remote JTAG permitted when password set
No USB device change detection because libudev.so.0 not found
Can't bind to TCP port 1309 - exiting

It appears I was missing libudev.so.0

$ sudo dnf install systemd-devel.i686
$ sudo killall -9 jtagd
$ jtagconfig

1) USB-Blaster variant [2-1.2]
Unable to lock chain - Insufficient port permissions

$ sudo udevadm control --reload
$ sudo killall -9 jtagd
$ sudo /home/chitlesh/intelFPGA_lite/17.0/quartus/bin/jtagconfig

1) USB-Blaster [2-1.2]
020F30DD 10CL025(Y|Z)/EP3C25/EP4CE22

Furthermore, since I imported the nios software projects from windows, I had to delete the .metadata directory to avoid strange incompatibility errors while compiling nios software projects.

 

Modelsim Intel-Altera 10.5c on Fedora26

This blog post is about how to run Modelsim Intel-Altera 10.5c on Fedora 26 (4.12.13-300.fc26.x86_64) after its installation. Modelsim Intel-Altera 10.5c comes with intelFPGA_pro 17.0.

First install the 32-bit libraries.

$ sudo dnf install glibc.i686 zlib.i686 bzip2-libs.i686 libXft.i686 libXext.i686 ncurses-compat-libs.i686

Download the freetype of el7 from here and copy the so files to modelsim’s internal directory.

$ rpm2cpio freetype-2.4.11-9.el7.i686.rpm | cpio -idmv
$ cp usr/lib/libfreetype.so.6* intelFPGA_pro/17.0/modelsim_ase/lib/

Add the following lines to the .bashrc :

$ export PATH=$PATH:~/intelFPGA_pro/17.0/modelsim_ase/bin
$ alias vsim="LD_PRELOAD=\"/home/$USER/intelFPGA_pro/17.0/modelsim_ase/lib/libfreetype.so.6\" vsim"

If vsim is launched at this time, you will get the following error:

Error: cannot find “/home/chitlesh/intelFPGA_pro/17.0/modelsim_ase/bin/../linux_rh60/vsim”

This error occurs because the intelFPGA’s vsim script has not considered linux kernels 4.*.

[chitlesh@localhost ~]$ uname -r
 4.12.13-300.fc26.x86_64

Add this following line on line 210 of bin/vsim.

4.[1-9][0-9]*) vco="linux" ;;


Below line 50 dir=`dirname "$arg0"`, add

export LD_LIBRARY_PATH=${dir}/lib

If DPI-C is not required, rename all the gcc directories into _gcc and use +UVM_NO_DPI.

That’s it.

 

If you find this blog post useful, please do leave a comment below to let me know if you have successfully run Altera Modelsim on Fedora.

Quartus 13.1 on Fedora 20

Installing Altera Quartus on Fedora 20 64-bit:

$ ./setup.sh

You must have the 32-bit compatibility libraries installed for the Quartus II installer and software to operate properly.

Solution:

# yum install glibc.i686 libXext.i386 libX11.i386 libXau.i386 libXdmcp.i386 freetype.i386 fontconfig.i386 expat.i386

openssl: PEM_def_callback:problems getting password

Failed to acquire SSL private key ‘/etc/pki/tls/private/server.key’: error:0906406D:PEM routines:PEM_def_callback:problems getting password

This is due to the fact that the the password was not removed from the server.key file.

# openssl rsa -in server.key.ORIG -out server.key

Virtualisation versus kernel

Note to self : don’t forget this easy fix next time:

Searching for a valid kernel header path… The path “” is not a valid path to the 3.7.9-104.fc17.i686 kernel headers. Would you like to change it? [yes] ^C Execution aborted.

cp /usr/src/kernels/3.7.9-104.fc17.i686/include/generated/uapi/linux/version.h /lib/modules/3.7.9-104.fc17.i686/build/include/linux/

the missing -ldl

[sourcecode]
export CFLAGS="%{optflags} -ldl -lpthread"
[/sourcecode]

to fix

[sourcecode]
/usr/bin/ld: dynload.o: undefined reference to symbol  ‘dlsym@@GLIBC_2.2.5’
/usr/bin/ld: note: ‘dlsym@@GLIBC_2.2.5’ is defined in DSO
/lib64/libdl.so.2 so try adding it to the linker command line
/lib64/libdl.so.2: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
[/sourcecode]

Restoring Electronics-menu in Gnome3

With Gnome 3 shipped with Fedora 15, the menu “electronics” is no longer available on Fedora 15’s gnome-menu.

It was rather annoying for me, as this custom “Electronics” menu remained the first thing that non-linux users would look at if they want to embrace Free(Fedora) Electronic Lab.

Finally, I found how to fix it. It seems that the directory /etc/xdg/menus/application-merged became /etc/xdg/menus/application-gnome-merged.

[sourcecode]
$ mkdir  /etc/xdg/menus/applications-gnome-merged
$ ln -s /etc/xdg/menus/applications-merged/electronics.menu /etc/xdg/menus/applications-gnome-merged/electronics.menu
[/sourcecode]

The “electronics-menu” package will soon be updated to reflect this fix on Fedora 15.