I installed klayout on ubuntu20 by following cloni...
# klayout
d
I installed klayout on ubuntu20 by following cloning the klayout github repo and running the ./build.sh script. The script finds ruby, python3, etc. The installation dies at this point. Any suggestions?
t
@David Lindley: This is what I did:
Copy code
sudo apt install qtcreator qtbase5-dev qt5-qmake
sudo apt install qtmultimedia5-dev  libqt5xmlpatterns5-dev
sudo apt install libqt5svg5-dev qttools5-dev-tools qttools5-dev
sudo apt install python3-dev
git clone <https://github.com/KLayout/klayout>
cd klayout
./build.sh
echo Put Klayout in a normal system executable path
sudo mv bin-release /usr/local/share/klayout
sudo ln -s /usr/local/share/klayout/klayout /usr/local/bin/klayout
sudo cat > /etc/ld.so.conf.d/klayout-x86_64.conf << EOF
/usr/local/share/klayout
EOF
sudo ldconfig
These instructions are from my writeup here: https://docs.google.com/document/d/1QXi2kqWgQ8JR_BJCfUgFkQCSSxetXcnWrDHRJdLBsy0, which you may find useful.
m
@David Lindley let us know if @Tim Edwards’s instructions don’t work. I think I had to modify the
qmake
lookup.
d
@Mitch Bailey I made it much further this time but still bombed out.
m
How does the beginning of your build log compare to this?
Copy code
Scanning installation ..

Version Info:
    Version: 0.28.12
    Date: 2023-10-18
    Revision: 01c19048a

Using qmake: qmake-qt4

Using Ruby interpreter: ruby
    Ruby library found: /usr/lib/x86_64-linux-gnu/libruby-2.5.so.2.5.5
    Ruby headers found: /usr/include/ruby-2.5.0 and /usr/include/x86_64-linux-gnu/ruby-2.5.0
    Ruby installation is in:
    - /usr/lib/x86_64-linux-gnu/libruby-2.5.so.2.5.5 (lib)
    - /usr/include/ruby-2.5.0 (headers)
    - /usr/include/x86_64-linux-gnu/ruby-2.5.0 (arch headers)
    Ruby version code is 20505

Using Python interpreter: python3
    INFO: Python library not in default path, trying to use MULTIARCH
    Python library found: /usr/lib/x86_64-linux-gnu/libpython3.7m.so
    Python headers found: /usr/include/python3.7m
    Python extension suffix: .cpython-37m-x86_64-linux-gnu.so
    Python installation is in:
    - /usr/lib/x86_64-linux-gnu/libpython3.7m.so (lib)
    - /usr/include/python3.7m (includes)

Features:
    Qt bindings enabled
    Compilation caching is deactivated!
    Installation target: /home/kanobailey/local/bin
    Build directory: /home/kanobailey/pull-requests/klayout/build-release

    Build flags:
      HAVE_RUBY=1
      HAVE_PYTHON=1
      HAVE_QTBINDINGS=1
      HAVE_QT=1
      HAVE_QT_UITOOLS=1
      HAVE_QT_NETWORK=1
      HAVE_QT_SQL=1
      HAVE_QT_SVG=1
      HAVE_QT_PRINTSUPPORT=1
      HAVE_QT_MULTIMEDIA=1
      HAVE_QT_DESIGNER=1
      HAVE_QT_XML=1
      HAVE_64BIT_COORD=0
      HAVE_CURL=0
      HAVE_PNG=0
      HAVE_EXPAT=0
      RPATH=/home/kanobailey/local/bin
    Building plugins: streamers tools 

Running qmake-qt4 ..
QMake version 2.01a
d
A couple newer versions and running qmake, not qmake-qt4 Scanning installation .. Version Info: Version: 0.28.15 Date: 2024-02-10 Revision: 6a27a046b Using qmake: qmake Using Ruby interpreter: ruby Ruby library found: /usr/lib/x86_64-linux-gnu/libruby-3.0.so.3.0.2 Ruby headers found: /usr/include/ruby-3.0.0 and /usr/include/x86_64-linux-gnu/ruby-3.0.0 Ruby installation is in: - /usr/lib/x86_64-linux-gnu/libruby-3.0.so.3.0.2 (lib) - /usr/include/ruby-3.0.0 (headers) - /usr/include/x86_64-linux-gnu/ruby-3.0.0 (arch headers) Ruby version code is 30002 Using Python interpreter: python3 Python library found: /usr/lib/x86_64-linux-gnu/libpython3.10.so Python headers found: /usr/include/python3.10 Python extension suffix: .cpython-310-x86_64-linux-gnu.so Python installation is in: - /usr/lib/x86_64-linux-gnu/libpython3.10.so (lib) - /usr/include/python3.10 (includes) Features: Qt bindings enabled Uses libgit2 for Git access Compilation caching is deactivated! Installation target: /home/dl/asic/klayout/bin-release Build directory: /home/dl/asic/klayout/build-release Build flags: HAVE_RUBY=1 HAVE_PYTHON=1 HAVE_QTBINDINGS=1 HAVE_QT=1 HAVE_QT_UITOOLS=1 HAVE_QT_NETWORK=1 HAVE_QT_SQL=1 HAVE_QT_SVG=1 HAVE_QT_PRINTSUPPORT=1 HAVE_QT_MULTIMEDIA=1 HAVE_QT_DESIGNER=1 HAVE_QT_XML=1 HAVE_64BIT_COORD=0 HAVE_CURL=0 HAVE_PNG=0 HAVE_EXPAT=0 HAVE_GIT2=1 RPATH= Building plugins: streamers tools Running qmake .. QMake version 3.1 Using Qt version 5.15.3 in /usr/lib/x86_64-linux-gnu
m
Your qmake is version 3. There was some way to override that. But it seems that your running into problems with the git header which wasn’t included in my version, so maybe it’s not relevant. You might try
locate qmake
to see what versions you have installed. Maybe download a newer version and use
build.sh -qmake qmake-qt4
.
d
I don't have a qmake-qt5 (or qt4) executable to run build.sh with the qmake option. I've been googling but haven't come up with a way to install a newer version of qmake. You wouldn't happen to have a link, would you?
m
Do Tim’s suggestions
Copy code
sudo apt install qtcreator qtbase5-dev qt5-qmake
sudo apt install qtmultimedia5-dev  libqt5xmlpatterns5-dev
sudo apt install libqt5svg5-dev qttools5-dev-tools qttools5-dev
work?
d
All that had been previously installed. Looking at the git2.h error I'm getting, I ran
Copy code
sudo apt install git-all
to make sure I had all things git installed, but still get the git2.h include error. How do I get a version without the git header?
v
@Tim Edwards Any help on how to install
qmake
on RHEL9. It is not getting installed with
qt5
.
qt6
does has
qmake
but same is not executable in
./build.sh
Following steps given on page-29 of document at this link https://docs.google.com/document/d/1QXi2kqWgQ8JR_BJCfUgFkQCSSxetXcnWrDHRJdLBsy0
t
As far as I can understand,
yum install qt-devel
should have installed
qmake
.
v
@Tim Edwards RHEL 9 does not identify
qt-devel
. No package found. Appstream-qt-devel is available on rhel-CRB repo but installing it does not seem to make
qmake
available somehow. (qmake not found)
t
That's a surprise. I was able to do the
yum install qt-devel
on Fedora, which is not far removed from RHEL.
v
@Tim Edwards Please check output of
yum install qt-devel
on RHEL 9.3 and suggest a way forward for klayout installation.
d
@Tim Edwards, @Mitch Bailey after giving up on fixing the git header problem I tried following the instructions in the document shared by xks which led me to https://www.klayout.de/build.html. I was able to install klayout on my windows box and run it with no problems, but that doesn't really help me run it in WSL. I tried downloading the executable klayout_0.28.16-1_amd64.deb but again run into git problems. That led me to installing libgit2-dev and libsecret-1-0, though I don't remember the order. And that allowed me to compile the version I downloaded from the repository. Whew.
👍 2
v
@Tim Edwards @Mitch Bailey Any suggestions on how to install klayout on RHEL 9.3 ? I faced issues in
qt-devel
installation as shared above in this thread.
m
@vks Looks like you might need a red hat subscription. Red hat 9 uses dnf right? Maybe
dnf search qt
to find out what’s available? klayout make should tell you what’s missing, so just keep adding until it works.
v
@Mitch Bailey Subscription for RHEL 9.3 is available and we did tried
dnf
to install required package. I tried steps given on Klayout website for installation for Cent OS 8 and was able to complete installation but klayout is still not invoking. Please see output of
./build.sh
in below screenshot. It gives few messages like below, don't think klayout has installed properly. Any suggestions on this issue ?
gmake[2]: Nothing to be done for 'install'.
gmake[2]: Leaving directory
gmake[1]: Nothing to be done for 'install'.
m
If you did not specify
./build.sh -prefix <bin-dir>
, klayout will be installed in
/root/gits/kayout-0.28.16/bin-release
. Is this directory in your path?
echo $PATH
v
Following is output of
echo $PATH
root@localhost bin-release]# echo $PATH
/root/.local/bin:/root/bin:/usr/share/Modules/bin:/home/raman/.local/bin:/home/raman/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin
Any suggestions what should I use with
./build.sh -prefix  <bin-dir>
for proper installation ?
m
You could just add
/root/gits/klayout-0.28.16/bin-release
to your path.
v
Ok, I tried invoking klayout form inside
bin-release
folder but it didn't work. Will adding /`root/gits/klayout-0.28.16/bin-release` to path help in that case ?
m
There are a lot of libraries installed in the same directory. These are the commands Tim used to move the installation
Copy code
echo Put Klayout in a normal system executable path
sudo mv bin-release /usr/local/share/klayout
sudo ln -s /usr/local/share/klayout/klayout /usr/local/bin/klayout
sudo cat > /etc/ld.so.conf.d/klayout-x86_64.conf << EOF
/usr/local/share/klayout
EOF
sudo ldconfig
v
Sorry, but I couldn't understand what was implied in your last reply. Can you please elaborate what I need to do?
m
The
bin-release
directory contains a lot of files. Tim’s solution was to copy that entire directory to a common shared location
/usr/local/share/klayout
. He then linked the executable
/usr/local/klayout/klayout
to a common directory on the path
/usr/local/bin
. In order to access all the libraries in
/usr/local/share/klayout
, he created a file
/etc/ld.so.conf.d/klayout-x86_64.conf
that contained one line
Copy code
/usr/local/share/klayout
which is the directory containing the libraries and then executed
ldconfig
to register those libraries.
v
Thanks for clarification, David. But I am still not able to make out. Can you please tell what steps should I follow from start for installing Klayout on RHEL 9.3.
m
How about these commands
Copy code
cd /root/gits/klayout-0.28.16/
sudo mv bin-release /usr/local/share/klayout
sudo ln -s /usr/local/share/klayout/klayout /usr/local/bin/klayout
sudo cat > /etc/ld.so.conf.d/klayout-x86_64.conf <<EOF
/usr/local/share/klayout
EOF
sudo ldconfig
v
Yes, it's opening now. Thank you, David, for your assistance. I'd like to understand what caused the issue with the installation steps, including the use of
./build.sh
as outlined on klayout website. Additionally, could you advise on whether I can update this current klayout setup for newer versions in future, or would you recommend an alternate way to install it to avoid any issues in future ?
👍 1
m
Can’t really give a better solution. I just do whatever works. 😬
v
Not an issue. I am happy it is working for now. Thanks again 🙏