klayout
klayout copied to clipboard
Execution an error occurred during build.sh compilation, 'libklayout_rba. so: undefined reference to ` rb_gc_writebarrier_unprotect'. How can I resolve it? '
Execution an error occurred during build.sh compilation, 'libklayout_rba. so: undefined reference to ` rb_gc_writebarrier_unprotect'. How can I resolve it? '
My system is Centos7
This is not a log, this is a screenshot. Send the whole log and I may be able to help.
My recommendation is to build inside a clean Docker container. That avoids guessing about your particular system configuration. The centos7 Docker image that works for me is built using this Dockerfile:
FROM centos:7
RUN yum -y update \
&& yum clean all \
&& yum -y install \
gcc \
gcc-c++ \
make \
qt \
qt-devel \
ruby \
ruby-devel \
python3 \
python3-devel \
wget \
fontconfig \
gtk2 \
dejavu-sans-mono-fonts \
dejavu-sans-fonts \
dejavu-serif-fonts \
dejavu-fonts-common \
openssh-server \
git \
which \
rpm-build \
xorg-x11-server-Xvfb \
sudo
Based on your suggestion, I used Centos7 Docker and successfully compiled klayout. However, when running the klayout program in the container, there is no interface to display it. How can I see the program interface?
I meant using the Docker container you can build KLayout and deploy the resulting binaries to your target system. This way you do not have to deal with build problems arising from a contaminated system.
Just make sure you have installed the corresponding packages there or at least "qt", "ruby" and "python3".
Matthias
I copied the compiled klayout project from the Docker container to a Centos7 system outside the container. However, when I attempted to run the klayout program, the interface appeared as a blank page rather than the expected klayout interface. What could be the reason for this discrepancy?
https://github.com/KLayout/klayout/issues/1367#issuecomment-1550626276 @klayoutmatthias Could you please answer this question? Thank you very much!
Did you check that you have these packages installed : qt, ruby, python3 ?
What is the output when you type these 4 commands separately in console ? which qt which ruby which python3 klayout -d 20
I think your target system is lacking the font packages and/or the image plugins from Qt.
But without access to the system I cannot tell further details.
Matthias
Please try to install all the packages listed above also on your target system.
@klayoutmatthias @chkkbim Thank you very much for your answer. I have successfully run klayout! But I can only copy the entire klayout project compiled in the Docker container to the Centos host, and finally run klayout and successfully display the interface. But I want to use X server directly in the container to display the klayout interface, but reporting errors as shown in the following figure. What should I do?
Centos host environment:
Running klayout in the Docker container reported an error:
Docker is a standard technology and there are many tutorials how to use it with UI applications. One I used myself is this one: https://janert.me/guides/running-gui-applications-in-a-docker-container/