Making klayout-0.25.9 for Fedora Core 30

Hi all,

New member to the Discussion forum here. Please let me know if I'm doing something inaapropriate.

I'm on a freshly upgraded Fedora Core 30 system. So I figured I needed to build my ow copy of klayout from source. I used the klayout-0.25.9.gz tarball, which bombed when trying to include stdlib.h. I'm guessing I don't have the right libraries installed. Is there a summary of the required libraries/supporting packages available?

Thanks much,

-bill richards-

Comments

  • Hi Bill,

    it's OK to ask such questions here :)

    You'll find a list of packages for some Linuxes here: https://www.klayout.de/build.html

    A first test with a Docker image (fedora:30) tells me you'll probably need these packages: gcc g++ make ruby ruby-devel qt-devel python3-devel.

    Matthias

  • Thanks much Matthias,

    I'll check out my configuration based on the package list you suggested.

    -bill-

  • Hi Matthias,

    I spent a little time downloading and trying the klayout build with different package versions. Things seemed to generally work, but I ended up with the error as shown below. Is this still a package version issue encountered during the make? Or am I still nissing something?

    Thanks for any suggestions...

    -bill-

    >

    cd lay/ && gmake -f Makefile 
    gmake[2]: Entering directory '/home/richards/Downloads/klayout/klayout-0.25.9/build-release/lay/lay'
    g++ -c -pipe -fvisibility=hidden -O2 -D_REENTRANT -Wall -W -pedantic -Woverloaded-virtual -Wsign-promo -Wsynth -Wno-deprecated -Wno-long-long -Wno-strict-aliasing -Wno-deprecated-declarations -Wno-reserved-user-defined-literal -fPIC -DHAVE_QTBINDINGS -DHAVE_PYTHON -DHAVE_RUBY -DHAVE_RUBY_VERSION_CODE=20603 -DKLAYOUT_VERSION=0.25.9 -DKLAYOUT_VERSION_REV=LatestSourcePackage -DKLAYOUT_VERSION_DATE=2019-09-11 -DKLAYOUT_MAJOR_VERSION=0 -DKLAYOUT_MINOR_VERSION=25 -DKLAYOUT_TINY_VERSION=9 -DMAKE_LAY_LIBRARY -DQT_NO_DEBUG -DQT_SCRIPT_LIB -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib64/qt4/mkspecs/linux-g++ -I../../../src/lay/lay -I/usr/include/QtDesigner -I/usr/include/QtCore -I/usr/include/QtNetwork -I/usr/include/QtGui -I/usr/include/QtXml -I/usr/include/QtSql -I/usr/include/QtScript -I/usr/include -I../../../src/tl/tl -I../../../src/gsi/gsi -I../../../src/db/db -I../../../src/rdb/rdb -I../../../src/laybasic/laybasic -I../../../src/ant/ant -I../../../src/img/img -I../../../src/edt/edt -I../../../src/lym/lym -I../../laybasic/laybasic -I../../../src/gsiqt -I../../../src/rba/rba -I../../../src/pya/pya -I. -I. -I../../../src/lay/lay -I. -o layFillDialog.o ../../../src/lay/lay/layFillDialog.cc
    In file included from ../../../src/laybasic/laybasic/layCellSelectionForm.h:29,
                     from ../../../src/lay/lay/layFillDialog.cc:36:
    ../../laybasic/laybasic/ui_CellSelectionForm.h:14:10: fatal error: QtWidgets/QApplication: No such file or directory
       14 | #include <QtWidgets/QApplication>
          |          ^~~~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    gmake[2]: *** [Makefile:3073: layFillDialog.o] Error 1
    gmake[2]: Leaving directory '/home/richards/Downloads/klayout/klayout-0.25.9/build-release/lay/lay'
    gmake[1]: *** [Makefile:40: sub-lay-make_default] Error 2
    gmake[1]: Leaving directory '/home/richards/Downloads/klayout/klayout-0.25.9/build-release/lay'
    gmake: *** [Makefile:244: sub-lay-make_default] Error 2
    
  • Hi again Matthias,

    Oops. In my last post, it looks like I screwed up the formatting in the "Leave a Comment" text box. Sorry about that! Is there a way to cleanly embed code on a Linux box?

    Thanks much,

    -bill-

  • Nice image. I like it. HTML art :-)

    You can include code by putting a triple backtick line before and after.

    Looks like Qt headers are not installed or are only partially installed. Did you install "qt-devel" or "qt5-devel"? That's the package which - as far as I see - provides these headers.

    From the log it looks like you're using Qt5's qmake. Please check with "qmake -v". If that is some 5.x.y version, you need to install Qt5 headers too (usually qmake and the headers come with the same package).

    If you have more than one qmake and want a specific version to be used, you can pick one with

    build.sh -qmake <path-to-qmake> ...
    

    Matthias

  • Still no luck. It looks like I have both the qt and qt5 libraries installed, as well as gcc and g++. Also, I did not find a qmake on the system; but a qmake-qt4 and qmake-qt5. I tried making klayout using:

    ./build.sh -qmake /bin/qmake-qt5 -ruby /bin/ruby
    

    and saw (truncated) output as follows:

    In file included from ../../../src/db/db/dbBox.h:29,
                     from ../../../src/laybasic/laybasic/layLayerProperties.h:29,
                     from ../../../src/laybasic/laybasic/layLayoutView.h:38,
                     from ../../../src/lay/lay/layFillDialog.h:29,
                     from ../../../src/lay/lay/layFillDialog.cc:24:
    ../../../src/db/db/dbPoint.h:84:3: note: because ‘db::point<double>’ has user-provided ‘db::point<C>::point(const db::point<C>&) [with C = double]’
       84 |   point (const point<C> &d) : m_x (d.x ()), m_y (d.y ()) { }
          |   ^~~~~
    At global scope:
    cc1plus: warning: unrecognized command line option ‘-Wno-reserved-user-defined-literal’
    gmake[2]: *** [Makefile:3716: layFillDialog.o] Error 1
    gmake[2]: Leaving directory '/home/richards/Downloads/klayout/klayout-0.25.9/build-release/lay/lay'
    gmake[1]: *** [Makefile:48: sub-lay-make_first] Error 2
    gmake[1]: Leaving directory '/home/richards/Downloads/klayout/klayout-0.25.9/build-release/lay'
    gmake: *** [Makefile:276: sub-lay-make_first] Error 2
    

    Is this still a library package installation problem?

    -bill-

  • Hi Bill,

    that's just the tail of the log. I'd need more.

    But this doesn't really lead anywhere. I don't know what's with your installation.

    But luckily we live in the 21st century. We have Docker. You should install Docker and do the build there. Here is my Dockerfile:

    FROM fedora:30
    
    RUN yum -y update \
     && yum clean all \
     && yum -y install \
          gcc \
          gcc-c++ \
          make \
          qt-devel \
          ruby \
          ruby-devel \
          python3 \
          python3-devel \
          git 
    
    RUN mkdir build_klayout && \
        git clone https://github.com/KLayout/klayout.git build_klayout && \
        cd build_klayout && \
        git checkout v0.26 && \
        ./build.sh -j 4 
    

    After you have built KLayout with

    # from the place where the Dockerfile is kept:
    docker build . -t klayout-fedora-30 
    

    you can pull out the binaries from the Docker image with:

    id=$(docker create klayout-fedora-30:latest)
    docker cp $id:/build_klayout/bin-release bin-release
    docker rm -v $id
    

    This was working for me and has to work for you too.

    Matthias

  • Hi Matthias,

    Sorry to be a bother. I've never used Docker, and will check it out. I agree... something is boogered up with my FC30 installation. Hopefully the use of Docker will not only lead to a successful klayout make, but point to the problems with my system as well.

    Thanks much for your help,

    -bill-

  • If you want to try: I have uploaded the output of the above run here: https://www.klayout.org/downloads/etc/klayout-0.26-fedora30.tar.gz

    It's not a RPM, but the binaries produced for version 0.26. You might be able to run them when you set LD_LIBRARY_PATH to the absolute path where you unpacked the tar file (I assume it will find the Qt libraries without this).

    Matthias

Sign In or Register to comment.