I'm a long time Windows user of KLayout, but new RH Linux user trying to build KLayout. I have several questions.
1) Where does build.sh assume qt4 package is installed? I think BUILD file in download archive needs update?
a) In the BUILD text file included in the download archive, it says that running:
./build.sh
will expect the Qt headers in /usr/lib/qt4/include, and the Qt library in /usr/lib/qt4/lib.
As best I can tell, our qt4 install is indeed at location /user/lib/qt4/
But, when I run the script it returns text that says:
Qt installation directory is /usr/lib (lib), /usr/bin (tools) and /usr/include/qt4 (includes)
Platform is linux-32-gcc-release
*** ERROR: no Qt headers in /usr/include/qt4
On the build web page, http://www.klayout.de/build.html, it appears the that running ./build.sh is the the same as running:
./build.sh -qtbin /usr/bin -qtlib /usr/lib -qtinc usr/include/qt4
So, it appears the BUILD file in the archive download is not current?
2) Help debug build errors.
Based on our qt install location, I've run this scrcipt:
./build.sh -qt /usr/lib/qt4
I get this response. Can you provide any quidance about what is wrong?
Qt installation directory is /usr/lib/qt4/lib (lib), /usr/lib/qt4/bin (tools) and /usr/lib/qt4/include (includes)
Platform is linux-32-gcc-release
Building plugins:
Running build ..
gmake
gmake: Warning: File `Makefile.conf' has modification time 0.022 s in the future
for d in main ; do (gmake -C $d dep ; gmake -C $d all) || exit 1; done
gmake[1]: Entering directory `/share/klayout/klayout-0.18.1/build.linux-32-gcc-release/main'
/share/klayout/klayout-0.18.1/src/Makefile.body:357: /share/klayout/klayout-0.18.1/src/contrib/gds2_txt/Makefile.body: No such file or directory
/share/klayout/klayout-0.18.1/src/Makefile.body:441: .dep: No such file or directory
gcc -DQT_THREAD_SUPPORT -DQT3_SUPPORT -MM -MG -x c++ /share/klayout/klayout-0.18.1/src/layMain.cc -I/share/klayout/klayout-0.18.1/src -I/share/klayout/klayout-0.18.1/src -I. -I/usr/lib/qt4/include >layMain.d || (rm -rf layMain.d; exit 1)
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
gmake[1]: *** [layMain.d] Error 1
gmake[1]: Leaving directory `/share/klayout/klayout-0.18.1/build.linux-32-gcc-release/main'
gmake[1]: Entering directory `/share/klayout/klayout-0.18.1/build.linux-32-gcc-release/main'
/share/klayout/klayout-0.18.1/src/Makefile.body:357: /share/klayout/klayout-0.18.1/src/contrib/gds2_txt/Makefile.body: No such file or directory
/share/klayout/klayout-0.18.1/src/Makefile.body:441: .dep: No such file or directory
gcc -DQT_THREAD_SUPPORT -DQT3_SUPPORT -MM -MG -x c++ /share/klayout/klayout-0.18.1/src/layMain.cc -I/share/klayout/klayout-0.18.1/src -I/share/klayout/klayout-0.18.1/src -I. -I/usr/lib/qt4/include >layMain.d || (rm -rf layMain.d; exit 1)
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
gmake[1]: *** [layMain.d] Error 1
gmake[1]: Leaving directory `/share/klayout/klayout-0.18.1/build.linux-32-gcc-release/main'
gmake: *** [all] Error 1
The first error appears to occur in reference to the file gds2_txt. In the contrib directory, ls shows:
[root@localhost contrib]# ll
total 0
?--------- ? ? ? ? ? gds2_txt
[root@localhost contrib]#
Thanks.
Comments
The first error appears to occur at:
gcc -DQT_THREAD_SUPPORT -DQT3_SUPPORT -MM -MG -x c++ /root/klayout-0.18.1/src/layMain.cc -I/root/klayout-0.18.1/src -I/root/klayout-0.18.1/src -I. -I/usr/lib/qt4/include >layMain.d || (rm -rf layMain.d; exit 1)
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
[root@localhost klayout-0.18.1]# ./build.sh -qt /usr/lib/qt4
Qt installation directory is /usr/lib/qt4/lib (lib), /usr/lib/qt4/bin (tools) and /usr/lib/qt4/include (includes)
Platform is linux-32-gcc-release
Building plugins:
Running build ..
gmake
for d in main ; do (gmake -C $d dep ; gmake -C $d all) || exit 1; done
gmake[1]: Entering directory `/root/klayout-0.18.1/build.linux-32-gcc-release/main'
/root/klayout-0.18.1/src/Makefile.body:441: .dep: No such file or directory
/usr/lib/qt4/bin/uic -o RubyErrorForm.h /root/klayout-0.18.1/src/RubyErrorForm.ui
/usr/lib/qt4/bin/uic -o SettingsForm.h /root/klayout-0.18.1/src/SettingsForm.ui
/usr/lib/qt4/bin/uic -o BrowserDialog.h /root/klayout-0.18.1/src/BrowserDialog.ui
/usr/lib/qt4/bin/uic -o ConfigurationDialog.h /root/klayout-0.18.1/src/ConfigurationDialog.ui
/usr/lib/qt4/bin/uic -o Console.h /root/klayout-0.18.1/src/Console.ui
/usr/lib/qt4/bin/uic -o ClipDialog.h /root/klayout-0.18.1/src/ClipDialog.ui
/usr/lib/qt4/bin/uic -o OpenLayoutModeDialog.h /root/klayout-0.18.1/src/OpenLayoutModeDialog.ui
/usr/lib/qt4/bin/uic -o PropertiesDialog.h /root/klayout-0.18.1/src/PropertiesDialog.ui
/usr/lib/qt4/bin/uic -o CellSelectionForm.h /root/klayout-0.18.1/src/CellSelectionForm.ui
/usr/lib/qt4/bin/uic -o SelectCellViewForm.h /root/klayout-0.18.1/src/SelectCellViewForm.ui
/usr/lib/qt4/bin/uic -o EditStipplesForm.h /root/klayout-0.18.1/src/EditStipplesForm.ui
/usr/lib/qt4/bin/uic -o BookmarkManagementForm.h /root/klayout-0.18.1/src/BookmarkManagementForm.ui
/usr/lib/qt4/bin/uic -o GridNetConfigPage.h /root/klayout-0.18.1/src/GridNetConfigPage.ui
/usr/lib/qt4/bin/uic -o BrowseShapesForm.h /root/klayout-0.18.1/src/BrowseShapesForm.ui
/usr/lib/qt4/bin/uic -o BrowseShapesConfigPage.h /root/klayout-0.18.1/src/BrowseShapesConfigPage.ui
/usr/lib/qt4/bin/uic -o BrowseInstancesForm.h /root/klayout-0.18.1/src/BrowseInstancesForm.ui
/usr/lib/qt4/bin/uic -o BrowseInstancesConfigPage.h /root/klayout-0.18.1/src/BrowseInstancesConfigPage.ui
/usr/lib/qt4/bin/uic -o RulerPropertiesPage.h /root/klayout-0.18.1/src/RulerPropertiesPage.ui
/usr/lib/qt4/bin/uic -o PolygonPropertiesPage.h /root/klayout-0.18.1/src/PolygonPropertiesPage.ui
Warning: name frame is already used
/usr/lib/qt4/bin/uic -o PathPropertiesPage.h /root/klayout-0.18.1/src/PathPropertiesPage.ui
Warning: name frame is already used
/usr/lib/qt4/bin/uic -o EditablePathPropertiesPage.h /root/klayout-0.18.1/src/EditablePathPropertiesPage.ui
Warning: name frame is already used
/usr/lib/qt4/bin/uic -o TextPropertiesPage.h /root/klayout-0.18.1/src/TextPropertiesPage.ui
/usr/lib/qt4/bin/uic -o BoxPropertiesPage.h /root/klayout-0.18.1/src/BoxPropertiesPage.ui
Warning: name frame is already used
/usr/lib/qt4/bin/uic -o InstPropertiesPage.h /root/klayout-0.18.1/src/InstPropertiesPage.ui
/usr/lib/qt4/bin/uic -o EditorOptionsDialog.h /root/klayout-0.18.1/src/EditorOptionsDialog.ui
/usr/lib/qt4/bin/uic -o EditorOptionsGeneric.h /root/klayout-0.18.1/src/EditorOptionsGeneric.ui
/usr/lib/qt4/bin/uic -o EditorOptionsPath.h /root/klayout-0.18.1/src/EditorOptionsPath.ui
/usr/lib/qt4/bin/uic -o EditorOptionsText.h /root/klayout-0.18.1/src/EditorOptionsText.ui
/usr/lib/qt4/bin/uic -o EditorOptionsInst.h /root/klayout-0.18.1/src/EditorOptionsInst.ui
/usr/lib/qt4/bin/uic -o InstantiationForm.h /root/klayout-0.18.1/src/InstantiationForm.ui
/usr/lib/qt4/bin/uic -o UserPropertiesForm.h /root/klayout-0.18.1/src/UserPropertiesForm.ui
/usr/lib/qt4/bin/uic -o UserPropertiesEditForm.h /root/klayout-0.18.1/src/UserPropertiesEditForm.ui
/usr/lib/qt4/bin/uic -o RulerConfigPage.h /root/klayout-0.18.1/src/RulerConfigPage.ui
/usr/lib/qt4/bin/uic -o SaveLayoutOptionsDialog.h /root/klayout-0.18.1/src/SaveLayoutOptionsDialog.ui
/usr/lib/qt4/bin/uic -o LoadLayoutOptionsDialog.h /root/klayout-0.18.1/src/LoadLayoutOptionsDialog.ui
/usr/lib/qt4/bin/uic -o LayoutViewConfigPage.h /root/klayout-0.18.1/src/LayoutViewConfigPage.ui
/usr/lib/qt4/bin/uic -o LayoutViewConfigPage2.h /root/klayout-0.18.1/src/LayoutViewConfigPage2.ui
/usr/lib/qt4/bin/uic -o LayoutViewConfigPage3.h /root/klayout-0.18.1/src/LayoutViewConfigPage3.ui
/usr/lib/qt4/bin/uic -o LayoutViewConfigPage4.h /root/klayout-0.18.1/src/LayoutViewConfigPage4.ui
/usr/lib/qt4/bin/uic -o LayoutViewConfigPage5.h /root/klayout-0.18.1/src/LayoutViewConfigPage5.ui
/usr/lib/qt4/bin/uic -o LayoutViewConfigPage6.h /root/klayout-0.18.1/src/LayoutViewConfigPage6.ui
/usr/lib/qt4/bin/uic -o LayoutProperties.h /root/klayout-0.18.1/src/LayoutProperties.ui
/usr/lib/qt4/bin/uic -o MainConfigPage.h /root/klayout-0.18.1/src/MainConfigPage.ui
/usr/lib/qt4/bin/uic -o MainConfigPage2.h /root/klayout-0.18.1/src/MainConfigPage2.ui
/usr/lib/qt4/bin/uic -o SelectStippleForm.h /root/klayout-0.18.1/src/SelectStippleForm.ui
/usr/lib/qt4/bin/uic -o HelpAboutDialog.h /root/klayout-0.18.1/src/HelpAboutDialog.ui
/usr/lib/qt4/bin/uic -o CopyModeDialog.h /root/klayout-0.18.1/src/CopyModeDialog.ui
/usr/lib/qt4/bin/uic -o DeleteModeDialog.h /root/klayout-0.18.1/src/DeleteModeDialog.ui
/usr/lib/qt4/bin/uic -o NewLayerPropertiesDialog.h /root/klayout-0.18.1/src/NewLayerPropertiesDialog.ui
/usr/lib/qt4/bin/uic -o NewLayoutPropertiesDialog.h /root/klayout-0.18.1/src/NewLayoutPropertiesDialog.ui
/usr/lib/qt4/bin/uic -o NewCellPropertiesDialog.h /root/klayout-0.18.1/src/NewCellPropertiesDialog.ui
/usr/lib/qt4/bin/uic -o DeleteCellModeDialog.h /root/klayout-0.18.1/src/DeleteCellModeDialog.ui
/usr/lib/qt4/bin/uic -o ClearLayerModeDialog.h /root/klayout-0.18.1/src/ClearLayerModeDialog.ui
/usr/lib/qt4/bin/uic -o RenameCellDialog.h /root/klayout-0.18.1/src/RenameCellDialog.ui
/usr/lib/qt4/bin/uic -o MoveOptionsDialog.h /root/klayout-0.18.1/src/MoveOptionsDialog.ui
/usr/lib/qt4/bin/uic -o ChangeLayerOptionsDialog.h /root/klayout-0.18.1/src/ChangeLayerOptionsDialog.ui
/usr/lib/qt4/bin/uic -o AlignOptionsDialog.h /root/klayout-0.18.1/src/AlignOptionsDialog.ui
/usr/lib/qt4/bin/uic -o AlignCellOptionsDialog.h /root/klayout-0.18.1/src/AlignCellOptionsDialog.ui
/usr/lib/qt4/bin/uic -o OASISWriterOptionPage.h /root/klayout-0.18.1/src/OASISWriterOptionPage.ui
/usr/lib/qt4/bin/uic -o GDS2WriterOptionPage.h /root/klayout-0.18.1/src/GDS2WriterOptionPage.ui
/usr/lib/qt4/bin/uic -o GDS2ReaderOptionPage.h /root/klayout-0.18.1/src/GDS2ReaderOptionPage.ui
/usr/lib/qt4/bin/uic -o FlattenInstOptionsDialog.h /root/klayout-0.18.1/src/FlattenInstOptionsDialog.ui
/usr/lib/qt4/bin/uic -o MakeCellOptionsDialog.h /root/klayout-0.18.1/src/MakeCellOptionsDialog.ui
/usr/lib/qt4/bin/uic -o BooleanOptionsDialog.h /root/klayout-0.18.1/src/BooleanOptionsDialog.ui
/usr/lib/qt4/bin/uic -o SizingOptionsDialog.h /root/klayout-0.18.1/src/SizingOptionsDialog.ui
/usr/lib/qt4/bin/uic -o MergeOptionsDialog.h /root/klayout-0.18.1/src/MergeOptionsDialog.ui
/usr/lib/qt4/bin/uic -o RoundCornerOptionsDialog.h /root/klayout-0.18.1/src/RoundCornerOptionsDialog.ui
/usr/lib/qt4/bin/uic -o gtfUiDialogUI.h /root/klayout-0.18.1/src/gtfUiDialogUI.ui
Warning: name compare_stck is already used
gcc -DQT_THREAD_SUPPORT -DQT3_SUPPORT -MM -MG -x c++ /root/klayout-0.18.1/src/layMain.cc -I/root/klayout-0.18.1/src -I/root/klayout-0.18.1/src -I. -I/usr/lib/qt4/include >layMain.d || (rm -rf layMain.d; exit 1)
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
gmake[1]: *** [layMain.d] Error 1
gmake[1]: Leaving directory `/root/klayout-0.18.1/build.linux-32-gcc-release/main'
gmake[1]: Entering directory `/root/klayout-0.18.1/build.linux-32-gcc-release/main'
/root/klayout-0.18.1/src/Makefile.body:441: .dep: No such file or directory
gcc -DQT_THREAD_SUPPORT -DQT3_SUPPORT -MM -MG -x c++ /root/klayout-0.18.1/src/layMain.cc -I/root/klayout-0.18.1/src -I/root/klayout-0.18.1/src -I. -I/usr/lib/qt4/include >layMain.d || (rm -rf layMain.d; exit 1)
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
gmake[1]: *** [layMain.d] Error 1
gmake[1]: Leaving directory `/root/klayout-0.18.1/build.linux-32-gcc-release/main'
gmake: *** [all] Error 1
[root@localhost klayout-0.18.1]#
How long does it take to build this package? I got the build started on a Virtul 32-bit RedHat 5.3 install, but it ran for more than 2 hours, spending a lot of time at dbShapes.cc. I killed that effort and switched over to a real 64-bit RH install. It ran much faster, but after 10 minutes came to the following error.
Anyone know what package I'm missing so that g++ can find -lQtGui?
g++ -Wl,-E -o klayout layMain.o tlString.o <and lots more object files> rbaConsoleImpl_moc.o resources.o -L/usr/lib64/qt4/lib -lQtGui -lQtCore -lQtXml -lrt -lstdc++ -lcrypt
/usr/bin/ld: cannot find -lQtGui
collect2: ld returned 1 exit status
gmake[1]: *** [klayout] Error 1
gmake[1]: Leaving directory `/home/abush/Desktop/klayout-0.18.1/kbuild/main'
gmake: *** [all] Error 1
The 32-bit compiled version runs on both my 32-bit RH 5.3 and 64-bit RH 5.3, but the 64-bit version does give some warnings, but it runs.
However, I have tried, and tried but cannot get the build to work on 64-bit, always giving the error with -lQtGui as shown before. Anyone know how to resolve that?
If we've read through this so far, thanks for considering my questions!
Hi,
Sorry for not answering that thread earlier - I was not looking into that forum after some days of inactivity ...
Regarding the build issues on 32bit: some gcc versions need a lot of memory to build dbShapes.cc. In my experience, 1G RAM should be sufficient, if you don't run a build with parallel execution. This refers to gcc version 4.3.3. I recall some older versions which require more memory. I am using Ubuntu 9.04 right now to do my builds.
Regarding the 64bit issue: either the Qt package is missing at all or there is a mixup of 32bit and 64bit versions. If the library exists (in my case in "/usr/lib/libQtGui.so"), please check if this is a 64bit library ("file /usr/lib/libQtGui.so"). Sometimes, 64bit libraries are located in /usr/lib64 or similar. I am not familiar with RH 5.x, so I just can guess.
Best regards,
Matthias
/usr/lib64/qt4/
-qt /usr/lib64/qt4/
-qtbin /usr/lib64/qt4/bin/
-qtinc /usr/lib64/qt4/include/
-qtlib /usr/lib64/qt4/lib64/
The key that I missed the first time around is the qt4 lib, that it requires another lib64 ... I thought the first /usr/lib64 was the only 64-bit specific directory.
Thanks Matthias.