Last active
June 30, 2024 06:42
-
-
Save tejainece/1c5edf08482c587cefb2 to your computer and use it in GitHub Desktop.
This script installs all the 32 bit library dependencies of modelsim and also compiles freetype.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ALTERA_PATH=~/altera/13.1/ | |
sudo dpkg --add-architecture i386 | |
sudo apt-get update | |
sudo apt-get install gcc-multilib g++-multilib \ | |
lib32z1 lib32stdc++6 lib32gcc1 \ | |
expat:i386 fontconfig:i386 libfreetype6:i386 libexpat1:i386 libc6:i386 libgtk-3-0:i386 \ | |
libcanberra0:i386 libpng12-0:i386 libice6:i386 libsm6:i386 libncurses5:i386 zlib1g:i386 \ | |
libx11-6:i386 libxau6:i386 libxdmcp6:i386 libxext6:i386 libxft2:i386 libxrender1:i386 \ | |
libxt6:i386 libxtst6:i386 | |
cd /tmp | |
wget http://download.savannah.gnu.org/releases/freetype/freetype-2.4.12.tar.bz2 | |
tar -xjvf freetype-2.4.12.tar.bz2 | |
cd freetype-2.4.12 | |
./configure --build=i686-pc-linux-gnu "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32" | |
make -j8 | |
mkdir $(ALTERA_PATH)/modelsim_ase/lib32 | |
sudo cp objs/.libs/libfreetype.so* $(ALTERA_PATH)/modelsim_ase/lib32 | |
#this file is usually read-only, make it writeable | |
chmod 755 $(ALTERA_PATH)/modelsim_ase/vco | |
echo -e "Add the following line \n\texport LD_LIBRARY_PATH=\${dir}/lib32\nafter this line\n\tdir=\`dirname \$arg0\`\nin the file ${ALTERA_PATH}modelsim_ase/vco" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo dpkg --add-architecture i386 | |
sudo apt-get update | |
sudo apt-get install wine | |
sudo apt-get install gcc-multilib g++-multilib lib32z1 lib32stdc++6 lib32gcc1 \ | |
expat:i386 fontconfig:i386 libfreetype6:i386 libexpat1:i386 libc6:i386 libgtk-3-0:i386 \ | |
libcanberra0:i386 libpng12-0:i386 libice6:i386 libsm6:i386 libncurses5:i386 zlib1g:i386 \ | |
libx11-6:i386 libxau6:i386 libxdmcp6:i386 libxext6:i386 libxft2:i386 libxrender1:i386 \ | |
libxt6:i386 libxtst6:i386 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir -p /tmp/modelsim_crack | |
tar -xvzf ModelSim_linux_crack.tar.gz -C /tmp/modelsim_crack | |
cd /tmp/modelsim_crack/ | |
./sfk6 rep -yes -pat -bin /5589E557565381ECD00000008B5508/31C0C357565381ECD00000008B5508/ -dir ~/modelsim/ | |
sudo ./MentorKG.exe -i license.src -o ~/modelsim/license.dat -hn -pkg ~/modelsim/modeltech/linux_x86_64/mgls/lib/mgc.pkginfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /tmp | |
wget http://download.savannah.gnu.org/releases/freetype/freetype-2.4.12.tar.bz2 | |
tar -xjvf freetype-2.4.12.tar.bz2 | |
cd freetype-2.4.12 | |
./configure --build=i686-pc-linux-gnu "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32" | |
make -j8 | |
mkdir ~/modelsim/modeltech/lib32 | |
sudo cp objs/.libs/libfreetype.so* ~/modelsim/modeltech/lib32 | |
#this file is usually read-only, make it writeable | |
chmod 755 ~/modelsim/modeltech/vco | |
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/teja/modelsim/modeltech/lib32/ | |
echo -e "Add the following line \n\texport LD_LIBRARY_PATH=\${dir}/lib32\nafter this line\n\tdir=\`dirname \$arg0\`\nin the file ~/modelsim/modeltech/lib32/vco" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export LM_LICENSE_FILE=~/modelsim/license.dat | |
export PATH=$PATH:/home/teja/modelsim/modeltech/linux_x86_64/ | |
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/teja/modelsim/modeltech/lib32/ |
You might have trouble with your NIC not being called eth0 (or ethX) as expected by modelsim, which will make it fail to accept your license file. A workaround is described at http://www.itzgeek.com/how-tos/mini-howtos/change-default-network-name-ens33-to-old-eth0-on-ubuntu-16-04.html
For details about what you're disabling, check FreeDesktop on predictable network interfaces
just a big THANK YOU for these scripts, I was really struggling to get ModelSim 10.5b running on Ubuntu 18.04 until I found these
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
actually... this is now working for me after making the following changes to configure_modelsim.sh and running it:
ALTERA_PATH=~/altera/13.1/
to=~/altera/*/
$(ALTERA_PATH)/
to${ALTERA_PATH}
in 2 locationsthen updating modelsim_env.sh and running that
THANKS!!