Installation

edited October 2013 in General
Hi all,

I'm trying to install KLayout in Fedora18.

After Googling I managed to compile something at least, but it still exits with an error:

--
$ ./build.sh -qtbin /usr/lib64/qt4/bin -qtlib /usr/lib64/qt4 -qtinc /usr/include -rblib /usr/lib64/libruby.so
./build.sh: line 66: ruby1.9: command not found
./build.sh: line 67: ruby1.8: command not found
Found ruby interpreter: ruby
-e:1: Use RbConfig instead of obsolete and deprecated Config.
-e:1: Use RbConfig instead of obsolete and deprecated Config.
Ruby libray found: /usr/lib64/libruby-static.a
-e:1: Use RbConfig instead of obsolete and deprecated Config.
-e:1: Use RbConfig instead of obsolete and deprecated Config.
Ruby headers found: /usr/include and /usr/include/x86_64-linux
Qt installation directory is /usr/lib64/qt4 (lib), /usr/lib64/qt4/bin (tools) and /usr/include (includes)
Ruby installation directory is /usr/lib64/libruby.so (lib), /usr/include (includes) and /usr/include/x86_64-linux (config for 1.9.x)
Platform is linux-64-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 `/home/kennethn/klayout/klayout-0.22.9/build.linux-64-gcc-release/main'
gmake[1]: `.dep' is up to date.
gmake[1]: Leaving directory `/home/kennethn/klayout/klayout-0.22.9/build.linux-64-gcc-release/main'
gmake[1]: Entering directory `/home/kennethn/klayout/klayout-0.22.9/build.linux-64-gcc-release/main'
g++ -m64 -rdynamic -g -Wl,-E -o klayout layMain.o antConfig.o antObject.o antPlugin.o antService.o antTemplate.o dbArray.o dbBox.o dbBoxConvert.o dbCell.o dbCellGraphUtils.o dbCellInst.o dbCellMapping.o dbCIF.o dbCIFReader.o dbCIFWriter.o dbClipboard.o dbClipboardData.o dbClip.o dbDXF.o dbDXFReader.o dbDXFWriter.o dbEdge.o dbEdgeProcessor.o dbFuzzyCellMapping.o dbGDS2.o dbGDS2ReaderBase.o dbGDS2Reader.o dbGDS2WriterBase.o dbGDS2Writer.o dbHershey.o dbInstances.o dbInstElement.o dbLayerProperties.o dbLayout.o dbLayoutDiff.o dbLayoutQuery.o dbLayoutStateModel.o dbLayoutUtils.o dbLibrary.o dbLibraryManager.o dbLibraryProxy.o dbLoadLayoutOptions.o dbManager.o dbMatrix.o dbMemStatistics.o dbOASIS.o dbOASISReader.o dbOASISWriter.o dbObject.o dbPath.o dbPCellDeclaration.o dbPCellHeader.o dbPCellVariant.o dbPoint.o dbPolygon.o dbPolygonTools.o dbPropertiesRepository.o dbReader.o dbSaveLayoutOptions.o dbShape.o dbShapes2.o dbShapes.o dbStatic.o dbStream.o dbStreamLayers.o dbText.o dbTextWriter.o dbTrans.o dbUserObject.o dbVector.o dbWriter.o dbWriterTools.o edtConfig.o edtMainService.o edtPlugin.o edtService.o edtServiceImpl.o edtUtils.o extDiffPlugin.o extGerberDrillFileReader.o extGerberImport.o extGerberImporter.o extNetTracer.o extRS274XApertures.o extRS274XReader.o extLEFDEFImport.o extLEFDEFImporter.o extLEFImporter.o extDEFImporter.o extStreamImport.o extStreamImporter.o extBooleanOperationsPlugin.o extXORPlugin.o gsi.o gsiTypes.o gsiClassBase.o gsiClass.o gsiObject.o gsiDeclAnt.o gsiDeclBasic.o gsiDeclDbBox.o gsiDeclDbCell.o gsiDeclDbCellMapping.o gsiDeclDbEdge.o gsiDeclDbEdgeProcessor.o gsiDeclDbInstElement.o gsiDeclDbLayout.o gsiDeclDbLayoutUtils.o gsiDeclDbLibrary.o gsiDeclDbManager.o gsiDeclDbMatrix.o gsiDeclDbPath.o gsiDeclDbPoint.o gsiDeclDbPolygon.o gsiDeclDbReader.o gsiDeclDbShape.o gsiDeclDbShapeProcessor.o gsiDeclDbShapes.o gsiDeclDbText.o gsiDeclDbTrans.o gsiDeclEdt.o gsiDeclImg.o gsiDeclInternal.o gsiDeclLayApplication.o gsiDeclLayDialogs.o gsiDeclLayLayers.o gsiDeclLayLayoutView.o gsiDeclLayMainWindow.o gsiDeclLayPlugin.o gsiDeclLayMarker.o gsiDeclLayMenu.o gsiDeclRdb.o gsiDeclTl.o gsiExpression.o imgObject.o imgPlugin.o imgService.o layAnnotationShapes.o layApplication.o layBitmap.o layBitmapRenderer.o layBitmapsToImage.o layBrowser.o layCanvasPlane.o layCellTreeModel.o layCellView.o layColorPalette.o layConverters.o layCursor.o layDrawing.o layEditable.o layExceptions.o layFileDialog.o layFinder.o layFixedFont.o layGenericSyntaxHighlighter.o layLayerProperties.o layLayoutViewConfig.o layMarker.o layMouseTracker.o layHelpSource.o layHelpProvider.o layGSIHelpProvider.o layResourceHelpProvider.o layObjectInstPath.o layParsedLayerSource.o layPlugin.o layProgress.o layProperties.o layQtTools.o layRedrawLayerInfo.o layRedrawThreadCanvas.o layRedrawThread.o layRedrawThreadWorker.o layRenderer.o layRubberBox.o laySnap.o layStipplePalette.o layStream.o layTechnology.o layTechnologySelector.o layVersion.o layViewObject.o layViewOp.o layViewport.o layZoomBox.o libBasic.o libBasicArc.o libBasicText.o libBasicCircle.o libBasicEllipse.o libBasicPie.o libBasicDonut.o libBasicRoundPath.o libBasicRoundPolygon.o libBasicStrokedPolygon.o rba.o rdb.o rdbFile.o rdbReader.o rdbRVEReader.o tlAssert.o tlClassRegistry.o tlCollection.o tlDataMapping.o tlDeflate.o tlException.o tlExpression.o tlGlobPattern.o tlInternational.o tlLog.o tlObserver.o tlProgress.o tlStaticObjects.o tlStream.o tlString.o tlThreadedWorkers.o tlTimer.o tlVariant.o tlXMLParser.o tlXMLWriter.o dbGDS2Converter.o dbGDS2Text.o dbGDS2TextReader.o dbGDS2TextWriter.o antConfigPage.o antPropertiesPage.o edtDialogs.o edtEditorOptionsPages.o edtPCellParametersPage.o edtInstPropertiesPage.o edtPartialService.o edtPropertiesPages.o extDiffToolDialog.o extGerberImportDialog.o extLEFDEFImportDialogs.o extNetTracerConfig.o extNetTracerDialog.o extStreamImportDialog.o extXORToolDialog.o extBooleanOperationsDialogs.o gtf.o imgLandmarksDialog.o imgNavigator.o imgPropertiesPage.o imgWidgets.o layAbstractMenu.o layBookmarkList.o layBookmarkManagementForm.o layBrowseInstancesForm.o layBrowserDialog.o layBrowserPanel.o layBrowseShapesForm.o layCellSelectionForm.o layCIFReaderPlugin.o layCIFWriterPlugin.o layClipDialog.o layConfigurationDialog.o layDialogs.o layDisplayState.o layDitherPattern.o layDXFReaderPlugin.o layDXFWriterPlugin.o layEditStipplesForm.o layEditStippleWidget.o layFillDialog.o layGDS2ReaderPlugin.o layGDS2WriterPlugin.o layGridNet.o layHelpDialog.o layHierarchyControlPanel.o layLayerControlPanel.o layLayerMappingWidget.o layLayerToolbox.o layLayerTreeModel.o layLayoutCanvas.o layLayoutPropertiesForm.o layLayoutStatisticsForm.o layLayoutView.o layLayoutViewConfigPages.o layLoadLayoutOptionsDialog.o layLogViewerDialog.o layMacroEditorDialog.o layMacroEditorPage.o layMacroEditorSetupDialog.o layMacro.o layMacroPropertiesDialog.o layMacroEditorTree.o layMainConfigPages.o layMainWindow.o layMove.o layNavigator.o layOASISWriterPlugin.o layProgressWidget.o layPropertiesDialog.o laySaveLayoutOptionsDialog.o laySelectCellViewForm.o laySelector.o laySelectStippleForm.o laySession.o laySettingsForm.o layTechSetupDialog.o layTipDialog.o layWidgets.o rbaConsoleImpl.o rbaRuntimeErrorForm.o rdbInfoWidget.o rdbMarkerBrowser.o rdbMarkerBrowserDialog.o rdbMarkerBrowserPage.o tlDeferredExecution.o antConfigPage_moc.o antPropertiesPage_moc.o edtDialogs_moc.o edtEditorOptionsPages_moc.o edtPCellParametersPage_moc.o edtInstPropertiesPage_moc.o edtPartialService_moc.o edtPropertiesPages_moc.o extDiffToolDialog_moc.o extGerberImportDialog_moc.o extLEFDEFImportDialogs_moc.o extNetTracerConfig_moc.o extNetTracerDialog_moc.o extStreamImportDialog_moc.o extXORToolDialog_moc.o extBooleanOperationsDialogs_moc.o gtf_moc.o imgLandmarksDialog_moc.o imgNavigator_moc.o imgPropertiesPage_moc.o imgWidgets_moc.o layAbstractMenu_moc.o layBookmarkList_moc.o layBookmarkManagementForm_moc.o layBrowseInstancesForm_moc.o layBrowserDialog_moc.o layBrowserPanel_moc.o layBrowseShapesForm_moc.o layCellSelectionForm_moc.o layCIFReaderPlugin_moc.o layCIFWriterPlugin_moc.o layClipDialog_moc.o layConfigurationDialog_moc.o layDialogs_moc.o layDisplayState_moc.o layDitherPattern_moc.o layDXFReaderPlugin_moc.o layDXFWriterPlugin_moc.o layEditStipplesForm_moc.o layEditStippleWidget_moc.o layFillDialog_moc.o layGDS2ReaderPlugin_moc.o layGDS2WriterPlugin_moc.o layGridNet_moc.o layHelpDialog_moc.o layHierarchyControlPanel_moc.o layLayerControlPanel_moc.o layLayerMappingWidget_moc.o layLayerToolbox_moc.o layLayerTreeModel_moc.o layLayoutCanvas_moc.o layLayoutPropertiesForm_moc.o layLayoutStatisticsForm_moc.o layLayoutView_moc.o layLayoutViewConfigPages_moc.o layLoadLayoutOptionsDialog_moc.o layLogViewerDialog_moc.o layMacroEditorDialog_moc.o layMacroEditorPage_moc.o layMacroEditorSetupDialog_moc.o layMacro_moc.o layMacroPropertiesDialog_moc.o layMacroEditorTree_moc.o layMainConfigPages_moc.o layMainWindow_moc.o layMove_moc.o layNavigator_moc.o layOASISWriterPlugin_moc.o layProgressWidget_moc.o layPropertiesDialog_moc.o laySaveLayoutOptionsDialog_moc.o laySelectCellViewForm_moc.o laySelector_moc.o laySelectStippleForm_moc.o laySession_moc.o laySettingsForm_moc.o layTechSetupDialog_moc.o layTipDialog_moc.o layWidgets_moc.o rbaConsoleImpl_moc.o rbaRuntimeErrorForm_moc.o rdbInfoWidget_moc.o rdbMarkerBrowser_moc.o rdbMarkerBrowserDialog_moc.o rdbMarkerBrowserPage_moc.o tlDeferredExecution_moc.o resources.o /usr/lib64/libruby.so -L/usr/lib64/qt4 -lQtGui -lQtCore -lQtXml -lQtNetwork -lQtSql -lQtDesigner -lrt -lstdc++ -lcrypt -ldl -lz -lpthread
rba.o: In function `rba::do_eval_string(char const*, char const*, int)':
rba.cc:(.text+0x45ba): undefined reference to `rb_vm_top_self'
collect2: error: ld returned 1 exit status
gmake[1]: *** [klayout] Error 1
gmake[1]: Leaving directory `/home/kennethn/klayout/klayout-0.22.9/build.linux-64-gcc-release/main'
gmake: *** [all] Error 1
--

Any ideas? How can I debug further?

Best regards,
Kenneth

Comments

  • edited October 2013

    Hi Kenneth,

    you have to make sure the build is done against the static version of your library. The shared object does not provide all the symbols required.

    Matthias

  • edited November -1
    Hi Matthias,

    Thanks for a quick reply.

    --
    $ ruby -v
    ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-linux]
    --

    /Kenneth
  • edited November -1

    Hi Kenneth,

    you're too fast :-)

    I just edited the reply. Now it says: try to link against a static version of the library. There should be one in /usr/lib64, maybe it's called libruby-static.a or similar (I don't have experience with Fedora myself).

    What happens if you just omit the -rblib argument?

    Matthias

  • edited November -1
    Hi Matthias,

    I'm usually slow, it was pure luck before:)

    Unfortunately, I don't see anything that smells like "static".
    --
    $ sudo find /usr/lib* -name "*ruby*"
    /usr/lib64/libqtruby4shared.so.2
    /usr/lib64/pkgconfig/ruby.pc
    /usr/lib64/pkgconfig/ruby-1.9.pc
    /usr/lib64/ruby
    /usr/lib64/ruby/vendor_ruby
    /usr/lib64/ruby/vendor_ruby/qtruby4.so
    /usr/lib64/libruby.so
    /usr/lib64/libqtruby4shared.so.2.0.0
    /usr/lib64/libruby.so.1.9
    /usr/lib64/libruby.so.1.9.1
    /usr/lib64/libqtruby4shared.so
    --

    Omitting the rblib argument gives an error:
    --
    *** ERROR: wrong -rblib path: /usr/lib64/libruby-static.a does not exist or not a file
    --

    I'll try to look around Fedora forums to find a solution..

    Thanks so far.

    /Kenneth
  • edited October 2013

    Hi Kenneth,

    that is strange because -rblib is taken from the configuration of your ruby installation and that says it was built with libruby-static.a. Maybe you need to install a specific package (like ruby-static or similar).

    It won't build with the shared library because some symbols are not exported. I'll try to get along without that specific function, but I have to test this solution first.

    Ff you have a staic library, you should be able to run the build without -rblib.

    Matthias

  • edited November -1
    Hi Matthias,

    Thanks for you efforts. I searched in every corner of my repositories for any Ruby-related libs named something with just a minimum taste of static, but found nothing. Google reveals some suggestions, but only for older Fedora versions, and the solutions does not apply to Fedora 18.

    I asked in Fedora-forum: http://forums.fedoraforum.org/showthread.php?t=294498 - however my usual success rate in there is quite low.

    It's very kind of you to try to do the job without the need for static libs. I will look forward to your progress on this. And in the meantime, I will keep looking for an alternative solution of the static-lib issue.

    /Kenneth
  • edited October 2013

    Hi Kenneth,

    there is always the option to build Ruby yourself or a build KLayout without Ruby support (however then you will loose some major part of the functionality).

    I have seen the Fedora "bug fix" saying that libruby-static.a has been moved into some -static subpackage, but I don't know what that means. I have not seen any static ruby subpackage myself. Ubuntu still comes with a static ruby library.

    I'll try to somehow workaround the missing symbol issue, but my first attempts failed.

    Matthias

  • edited November -1
    Hi Matthias,

    Well, I think my skills are too limited to try and build Ruby myself. But I'll put on the list (I'll try it in a virtual machine once I get it running).

    Yep, I also found that in the bugfix listings. "libruby-static.a has been moved into some -static subpackage" probably means that it was put into package named "ruby-static". This package is available for Fedora 16, but not the later versions :(

    Thanks again:)

    /Kenneth
  • edited November -1
    All,

    When I build in ubuntu 12.04 i get a missing zlib.h error. I checked and I have the build-essentials and zlib1g libraries from apt-get.

    Any help is appreciated. Thank you.

    Edward

    gcc -I/home/ediaz/Downloads/klayout-0.22.9/src -I/home/ediaz/Downloads/klayout-0.22.9/src -I. -I/usr/include/qt4 -I/usr/include/ruby-1.9.1 -I/usr/include/ruby-1.9.1/i686-linux -Wall -pedantic -Wno-deprecated -Woverloaded-virtual -Wsign-promo -Wsynth -Wno-long-long -Wno-strict-aliasing -DQT_THREAD_SUPPORT -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DHAVE_RUBY -c -m32 -O3 -o antPlugin.o /home/ediaz/Downloads/klayout-0.22.9/src/antPlugin.cc
    In file included from /home/ediaz/Downloads/klayout-0.22.9/src/tlXMLParser.h:43:0,
    from /home/ediaz/Downloads/klayout-0.22.9/src/layLayerProperties.h:35,
    from /home/ediaz/Downloads/klayout-0.22.9/src/layLayoutView.h:37,
    from /home/ediaz/Downloads/klayout-0.22.9/src/layMainWindow.h:41,
    from /home/ediaz/Downloads/klayout-0.22.9/src/antPlugin.cc:25:
    /home/ediaz/Downloads/klayout-0.22.9/src/tlStream.h:36:18: fatal error: zlib.h: No such file or directory
    compilation terminated.
    make[1]: *** [antPlugin.o] Error 1
    make[1]: Leaving directory `/home/ediaz/Downloads/klayout-0.22.9/build.linux-32-gcc-release/main'
    make: *** [all] Error 1
    ediaz@thor:~/Downloads/klayout-0.22.9$
  • edited November -1

    Hi,

    you'll need zlib1g-dev, zlib1g is just the runtime.

    BTW, you can simply use one of the .deb packages provided for download. They were built for Ubuntu 12.

    Matthias

Sign In or Register to comment.