Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install klayout without sudo #1326

Closed
joamatab opened this issue Apr 4, 2023 · 10 comments
Closed

install klayout without sudo #1326

joamatab opened this issue Apr 4, 2023 · 10 comments
Labels

Comments

@joamatab
Copy link
Contributor

joamatab commented Apr 4, 2023

What's the best way to install klayout without sudo?

I've been looking at https://github.com/flaport/condalayout but seems to have some issues
flaport/condalayout#3

@sebastian-goeldi
@HelgeGehring
@proppy

@sebastian-goeldi
Copy link
Contributor

There is no easy way on linux afaik. .deb packages (and similar) aren't meant to be installed by users. Afaik you have 2.5 options:

  • Compile it yourself and put it to ~/.local/bin
  • use docker/podman

Podman is completely in iserspace, so no need for sudo at all afaik. Docker needs sudo to be installed

@klayoutmatthias
Copy link
Collaborator

I personally use Docker for quick test installs. The advantage is to have a clean system. It's somewhat tricky to configure Docker to forward X11 - I have not figured out yet how to do this without disabling X11 authentication (xhost +). Apart from that, this works nicely. You can also map you own working directories into docker to access files sitting on the outside.

Another thing that comes to mind is snap. I have no experience however how to package for snap.

Matthias

@sebastian-goeldi
Copy link
Contributor

Instead of snap I would highly recommend flatpak instead. Snap has a bad history in regards to being open, whereas for flatpak both client side and server side is open and you are less bound to ubuntu flavors ;). (see https://itsfoss.com/flatpak-vs-snap/ , disclaimer: this is just the first article that explains it better than my memory, therefore not necessarily complete or any strong opinion, just personal taste)

But both options would need setup and unless the article is wrong, snap still needs root privileges to install whereas flat doesn't

@proppy
Copy link

proppy commented Apr 4, 2023

What about the conda packages at https://anaconda.org/litex-hub/klayout?

@klayoutmatthias
Copy link
Collaborator

Is that functional? https://beta.flathub.org/apps/de.klayout.KLayout

Anaconda was tried a number of times, but so far (AFAIK) no general solution for packaging has evolved. I assume mainly because for Linux there are better alternatives.

Matthias

@sebastian-goeldi
Copy link
Contributor

The flatpak works for me, yes.

@atorkmabrains
Copy link

@joamatab

Download this makefile anywhere:
https://gist.github.com/atorkmabrains/56d924c7dee111febfa741d289aba9cb

And just run:

make install_klayout-v0.28.5

And it will install klayout version v0.28.5. To install another version for example:

make install_klayout-v0.28.6

So on so forth.

@atorkmabrains
Copy link

@joamatab Please make sure to install required packages for building klayout:
https://www.klayout.de/build.html

For Ubuntu 22.04 for example:

C++ toolchain: gcc, g++ and make
Qt including development tools: qtbase5-dev, qttools5-dev, libqt5xmlpatterns5-dev, qtmultimedia5-dev, libqt5multimediawidgets5 and libqt5svg5-dev
Ruby: ruby and ruby-dev
Python: python3 and python3-dev
zlib: libz-dev

@klayoutmatthias
Copy link
Collaborator

Can I close this ticket?

@ejprinz
Copy link

ejprinz commented May 13, 2023

Specifically for a RHEL7 system, this seems to work (done only one time, so YMMV):

Download the Centos7 binary rpm archive from:
https://www.klayout.de/build.html

Transfer to the RHEL7 system.
Run this command in a new (local) directory:

rpm2cpio klayout-0.28.7-0.x86_64.rpm |cpio -diun

Move the files from this directory into e.g. the ~/.local/(bin, lib, share) tree.
Add script to export LD_LIBRARY_PATH variable to contain ~/.local/lib.

Then start klayout with this script.

#! /bin/bash

export root=~/.local

cd $root

export LD_LIBRARY_PATH=${root}/lib/klayout

${root}/bin/klayout

Note that all dependent libraries have to be installed already with rpm's in the RHEL7 system.

Also for RHEL7 the rpm from klayout.de is based on Qt4 so it does not include the 2.5d view feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants