Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
vcae-lubuntu-18.04 [2019/03/28 20:31] beckmanf [Run Modelsim] |
vcae-lubuntu-18.04 [2020/03/22 23:20] (current) beckmanf CXXABI_1.3.9 problem |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Install Quartus 18.1 on Lubuntu 18.04 LTS ===== | + | ===== Install Quartus 18.1 and Matlab =====Ìý |
+ | Ìý | ||
+ | This description assumes that version 13.0sp1 is already installed on Lubuntu 18.04. The Quartus 18.1 version is used only by the Master Course. | ||
==== Download ==== | ==== Download ==== | ||
- | Download [[https://www.hs-augsburg.de/~beckmanf/restricted/Quartus-lite-18.1.0.625-linux.tar|Quartus-lite-18.1.0.625-linux.tar]] from [[http://fpgasoftware.intel.com/?edition=lite|Intel]] | + | Download [[https://www.hs-augsburg.de/~beckmanf/restricted/Quartus-lite-18.1.0.625-linux.tar|Quartus-lite-18.1.0.625-linux.tar]] from [[http://fpgasoftware.intel.com/?edition=lite|Intel]]. You can download withÌý |
+ | Ìý | ||
+ | <code>Ìý | ||
+ | cdÌý | ||
+ | cd caeÌý | ||
+ | wget --user=YOURUSERNAME --ask-password https://www.hs-augsburg.de/~beckmanf/restricted/Quartus-lite-18.1.0.625-linux.tarÌý | ||
+ | </code> | ||
==== Install ==== | ==== Install ==== | ||
- | Make sure that you install the software at "/opt/altera/18.1". Create the altera directory and change the owner to your username. Replace "fritz:fritz" with your username and group. | + | Check that you have |
- | <code>Ìý | + | * [[http://www.hs-augsburg.de/homes/beckmanf/dokuwiki/doku.php?id=ubuntu_virtual_cae_system#missing_libpng12|Installed the missing libpng12]] |
- | sudo mkdir /opt/alteraÌý | + | |
- | sudo chown fritz:fritz /opt/alteraÌý | + | |
- | </code> | + | |
- | When you run the installation, you can deselect all FPGA device families, except Cyclone V. | + | Make sure that you install the software at "/opt/altera/18.1". When you run the installation, you can deselect all FPGA device families, except Cyclone V. |
<code> | <code> | ||
- | mkdir /tmp/qi | ||
- | cd /tmp/qi | ||
- | cp <TheQuartusTarFile> . | ||
tar -xvf Quartus-lite-18.1.0.625-linux.tar | tar -xvf Quartus-lite-18.1.0.625-linux.tar | ||
./setup.sh | ./setup.sh | ||
</code> | </code> | ||
- | ==== Setting PATH Variable ==== | + | Check that you haveÌý |
+ | * [[http://www.hs-augsburg.de/homes/beckmanf/dokuwiki/doku.php?id=ubuntu_virtual_cae_system#fix_the_libfreetype_problem|Compiled the libfreetype library]] | ||
- | In order to be able to start the binaries from the commandline, the path for the binaries has to be in the PATH environment variable. For that you have to modify the .profile file in your home directory. Append the following snippet to the .profile file: | + | and copy the library to the 18.1 directory |
- | .profileÌý | + | <code>Ìý |
- | Ìý | + | mkdir /opt/altera/18.1/modelsim_ase/lib32Ìý |
- | <code bash>Ìý | + | cp ~/cae/freetype-2.8.1/objs/.libs/libfreetype.so* /opt/altera/18.1/modelsim_ase/lib32/ |
- | # Include the ALTERA fpga softwareÌý | + | |
- | PATH="$PATH:/opt/altera/18.1/quartus/bin"Ìý | + | |
- | # Include the ALTERA Modelsim VHDL simulatorÌý | + | |
- | PATH="$PATH:/opt/altera/18.1/modelsim_ase/bin" | + | |
</code> | </code> | ||
- | To see the changes in the PATH variable, you have to logout and login again. After that you can already start modelsim and quartus (see below). To check the setting of the PATH variable do: | + | Change /opt/altera/18.1/modelsim_ase/vco file and find the location: |
- | <code bash>Ìý | + | <code>Ìý |
- | fritz@vcae:~$ echo $PATHÌý | + | dir=`dirname "$arg0"` |
- | /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/altera/18.1/quartus/bin:/opt/altera/18.1/modelsim_ase/binÌý | + | |
- | fritz@vcae:~$ | + | |
</code> | </code> | ||
- | You can see that the altera directories are now part of the PATH variable.Ìý | + | After that line add |
- | Ìý | + | |
- | ==== Run Quartus and install remaining libraries ====Ìý | + | |
- | Ìý | + | |
- | === Missing libpng12 === | + | |
<code> | <code> | ||
- | fritz@vcae:~$ quartusÌý | + | export LD_LIBRARY_PATH=/opt/altera/18.1/modelsim_ase/lib32 |
- | quartus: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directoryÌý | + | |
- | fritz@vcae:~$ | + | |
</code> | </code> | ||
- | The following check shows that libpng16 is installed but quartus needs libpng12.Ìý | + | and [[http://www.hs-augsburg.de/homes/beckmanf/dokuwiki/doku.php?id=ubuntu_virtual_cae_system#fix_linux_rh60_vco_script_problem|Fix linux rh60 problem]] in that file. |
- | <code>Ìý | + | |
- | fritz@vcae:~$ dpkg -l | grep pngÌý | + | |
- | ii libpng16-16:amd64 1.6.34-1ubuntu0.18.04.1 amd64 PNG library - runtime (version 1.6)Ìý | + | |
- | fritz@vcae:~$Ìý | + | |
- | </code> | + | |
- | So download, compile and copy the libpng12 library to the quartus install directory | + | === libstdc++ CXXABI_1.3.9 problem === |
- | <code>Ìý | + | The following problem |
- | sudo apt install build-essentialÌý | + | |
- | wget https://www.hs-augsburg.de/homes/beckmanf/public/libpng-1.2.59.tar.gzÌý | + | |
- | tar -xvzf libpng-1.2.59.tar.gzÌý | + | |
- | cd libpng-1.2.59Ìý | + | |
- | ./configureÌý | + | |
- | makeÌý | + | |
- | cp .libs/libpng12.so* /opt/altera/18.1/quartus/linux64Ìý | + | |
- | </code>Ìý | + | |
- | Ìý | + | |
- | === Wrong libc ===Ìý | + | |
- | Ìý | + | |
- | When you try to run quartus and see this | + | |
<code> | <code> | ||
- | fritz@vcae:/tmp$ quartusÌý | + | /opt/altera/version/quartus/linux64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /usr/lib/x86_64-linux-gnu/libproxy.so.1) |
- | /opt/altera/18.1/quartus/linux64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /usr/lib/x86_64-linux-gnu/libproxy.so.1) | + | |
Failed to load module: /usr/lib/x86_64-linux-gnu/gio/modules/libgiolibproxy.so | Failed to load module: /usr/lib/x86_64-linux-gnu/gio/modules/libgiolibproxy.so | ||
- | |||
- | (quartus:47747): Gtk-WARNING **: 18:17:46.016: Error loading theme icon 'dialog-warning' for stock: Unable to load image-loading module: /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so: /opt/altera/18.1/quartus/linux64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /usr/lib/x86_64-linux-gnu/libicuuc.so.60) | ||
</code> | </code> | ||
- | then, you can do the following | + | is due to different libstdc++ versions which have different ABI versions. If you delete |
<code> | <code> | ||
- | cd /opt/altera/18.1/quartus/linux64Ìý | + | rm /opt/altera/18.1/quartus/linux64/libstdc++.* |
- | fritz@vcae:/opt/altera/18.1/quartus/linux64$ mv ./libstdc++.so.6 libstdc++.so.6.orig_distÌý | + | |
- | fritz@vcae:/opt/altera/18.1/quartus/linux64$ ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 .Ìý | + | |
</code> | </code> | ||
- | === Run Quartus === | + | then quartus will find the default libstdc++ in /usr/lib/x86_64-linux-gnu. |
- | Run Quartus with | + | ==== Create a version switcher for the PATH variable ==== |
- | <code>Ìý | + | You can set the PATH variable as in the 13.0sp1 installation in .profile. If you install two versions, then you can append the following to .bashrc |
- | quartus Ìý | + | |
- | </code>Ìý | + | |
- | Ìý | + | |
- | and click the "Run the Quartus Prime software" buttonÌý | + | |
- | Ìý | + | |
- | ==== Run Modelsim ====Ìý | + | |
- | Ìý | + | |
- | === Fix linux_rh60 vco script problem ===Ìý | + | |
- | Ìý | + | |
- | When you run modelsim and see: | + | |
<code> | <code> | ||
- | fritz@vcae:/tmp$ vsimÌý | + | alias v13="ln -rsvfT /opt/altera/13.0sp1 /opt/altera/version"Ìý |
- | Error: cannot find "/opt/altera/18.1/modelsim_ase/bin/../linux_rh60/vsim"Ìý | + | alias v18="ln -rsvfT /opt/altera/18.1 /opt/altera/version" |
- | fritz@vcae:/tmp$ | + | |
</code> | </code> | ||
- | then, you have to fix the vco script. First change the permissions such that you can modify the script. | + | You need to open a new bash to make the changes active. Then you can switch between the versions by running v18 or v13. |
- | <code>Ìý | + | ===== Matlab ===== |
- | cd /opt/altera/18.1/modelsim_aseÌý | + | |
- | chmod u+w vcoÌý | + | |
- | </code> | + | |
- | Open the vco with | + | ==== License and Activation ==== |
- | <code>Ìý | + | Students of 91Âþ» Augsburg can have a [[https://www.hs-augsburg.de/Rechenzentrum/Matlab-TAH-Lizenz.html|license]] but they need to [[https://de.mathworks.com|Create a student account at Mathworks]]. You must use your hs-augsburg.de email address. |
- | vi vcoÌý | + | |
- | </code> | + | |
- | and find the following section | + | ==== Download ==== |
- | <code>Ìý | + | Download Matlab version R2018b from https://de.mathworks.com/downloads/web_downloads/ |
- | elseÌý | + | |
- | case $utype inÌý | + | |
- | 2.4.[7-9]*) vco="linux" ;;Ìý | + | |
- | 2.4.[1-9][0-9]*) vco="linux" ;;Ìý | + | |
- | 2.[5-9]*) vco="linux" ;;Ìý | + | |
- | 2.[1-9][0-9]*) vco="linux" ;;Ìý | + | |
- | 3.[0-9]*) vco="linux" ;;Ìý | + | |
- | *) vco="linux_rh60" ;;Ìý | + | |
- | </code> | + | |
- | And change the "linux_rh60" entry to "linux".Ìý | + | ==== Install ==== |
- | Ìý | + | |
- | === Install i386 Libraries ===Ìý | + | |
- | Ìý | + | |
- | See: [[https://www.intel.com/content/www/us/en/programmable/support/support-resources/knowledge-base/tools/2019/why-does-my-quartus-prime-18-1-fail-to-run-on-ubuntu-18-04-lts-.html?wapkw=why+does+my+quartus+prime+18.1+fail+to+run+on+ubuntu+18.04+lts%3f&language=en_US|missing i386 libraries]] on the Intel site. | + | |
<code> | <code> | ||
- | sudo apt install libc6:i386 libncurses5:i386 libxtst6:i386 libxft2:i386 libc6:i386 libncurses5:i386 libstdc++6:i386 libc6-dev-i386 libxft2 lib32z1 lib32ncurses5 libqt5xml5 liblzma-devÌý | + | cdÌý |
- | Ìý | + | cd caeÌý |
- | libc6:i386, libncurses5:i386, libxtst6:i386, libxft2:i386, libc6:i386, libncurses5:i386, libstdc++6:i386, libc6-dev-i386, libxft2, lib32z1, lib32ncurses5, lib32bz2-1.0, libpng12, libqt5xml5, liblzma-dev | + | mkdir matlabÌý |
+ | mv ../Downloads/matlab_R2018b_glnxa64.zip matlabÌý | ||
+ | cd matlabÌý | ||
+ | unzip matlab_R2018b_glnxa64.zipÌý | ||
+ | sudo mkdir /opt/matlabÌý | ||
+ | sudo chown caeuser:caeuser /opt/matlabÌý | ||
+ | ./install | ||
</code> | </code> | ||
- | === Fix the libfreetype problem ===Ìý | + | During the installation process you have to login to Mathworks and activate the license. Choose as installation directory: |
- | Ìý | + | |
- | If you see | + | |
<code> | <code> | ||
- | caeuser@ADLab-Tools-OS:~$ vsimÌý | + | /opt/matlab/R2018b |
- | Error in startup script:Ìý | + | |
- | Initialization problem, exiting.Ìý | + | |
- | Ìý | + | |
- | Initialization problem, exiting.Ìý | + | |
- | Ìý | + | |
- | while executingÌý | + | |
- | "InitializeINIFile quietly"Ìý | + | |
- | invoked from withinÌý | + | |
- | "ncFyP12 -+"Ìý | + | |
- | (file "/mtitcl/vsim/vsim" line 1)Ìý | + | |
- | ** Fatal: Read failure in vlm process (0,0)Ìý | + | |
- | caeuser@ADLab-Tools-OS:~$ | + | |
</code> | </code> | ||
- | then you have to install an old version of libfreetype. Make sure that you have enable the deb-src packages in the /etc/apt/sources.list file to make the build dependencies work. | + | Select the following matlab toolboxes |
- | <code>Ìý | + | * MATLAB 9.5Ìý |
- | sudo apt-get install libc6-dev-i386Ìý | + | * Simulink 9.2Ìý |
- | sudo apt-get build-dep -a i386 libfreetype6Ìý | + | * DSP System ToolboxÌý |
- | wget https://download.savannah.gnu.org/releases/freetype/freetype-2.8.1.tar.gzÌý | + | * Filter Design HDL CoderÌý |
- | tar -xvzf freetype-2.8.1.tar.gzÌý | + | * Fixed-Point DesignerÌý |
- | cd freetype-2.8.1Ìý | + | * HDL CoderÌý |
- | ./configure --build=i686-pc-linux-gnu --without-png "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32"Ìý | + | * MATLAB CoderÌý |
- | make -j8Ìý | + | * Signal Processing Toolbox |
- | </code> | + | |
- | Now copy the libfreetype library files to the modelsim directory | + | === PATH === |
- | <code> | ||
- | mkdir /opt/altera/18.1/modelsim_ase/lib32 | ||
- | cp objs/.libs/libfreetype.so* /opt/altera/18.1/modelsim_ase/lib32/ | ||
- | </code> | ||
- | Now you have to change modelsim vco file and find the location: | ||
- | <code> | ||
- | dir=`dirname "$arg0"` | ||
- | </code> | ||
- | After that line add | ||
- | |||
- | <code> | ||
- | export LD_LIBRARY_PATH=/opt/altera/18.1/modelsim_ase/lib32 | ||
- | </code> | ||