klayout v0.24 compile issue on RHEL6.2

edited August 2015 in KLayout Support

Hi Matthias,

I tried to compile klayout v0.24 on RHEL6.2, and it showed the following errors:

/klayout-0.24/src/dbInstances.cc:1596:   instantiated from here
/klayout-0.24/src/dbInstances.cc:1596: error: explicit instantiation of `void db::Instances::insert(I, I) [with I = __gnu_cxx::__normal_iterator<db::CellInstArray*, std::vector<db::CellInstArray, std::allocator<db::CellInstArray> > >]' but no definition available
make[1]: *** [dbInstances.o] Error 1
make[1]: Leaving directory `/klayout-0.24/build.linux-64-gcc-release/main'
make: *** [all] Error 1

I guessed it's gcc version issue, so I changed the gcc version from 3.4.6 to 4.4.6 and it passed the issue then output the klayout binary file.

However the klayout binary file would crash on trace net function, and it showed the window messages:

Signal number: 6
Address: 0x1f7
Program Version: KLayout 0.24 (2015-07-30 r2926)
Backtrace:
/lib64/libc.so.6(gsignal+0x35) [0x3e5f432885]
/lib64/libc.so.6(abort+0x175) [0x3e5f434065]
/usr/lib64/libstdc++.so.6(_ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x12d) [0x3e6c4bea7d]
/usr/lib64/libstdc++.so.6() [0x3e6c4bcc06]
/usr/lib64/libstdc++.so.6() [0x3e6c4bcc33]
/usr/lib64/libstdc++.so.6() [0x3e6c4bd55f]
./klayout(_ZN2db20cut_polygon_internalINS_7polygonIiEENS_4edgeIiEEEEvRKT_RKT0_PNS_22CutPolygonReceiverBaseE+0x1814) [0xdae964]
./klayout(_ZN2db13split_polygonINS_7polygonIiEEEEvRKT_RSt6vectorIS3_SaIS3_EE+0x361) [0xdaf9f1]
./klayout(_ZN3ext9NetTracer22determine_interactionsERKN2db7polygonIiEEPKNS_14NetTracerShapeERKSt3setIjSt4lessIjESaIjEERS9_ISt4pairIS6_S8_ESA_ISH_ESaISH_EE+0x547) [0x125c3b7]
./klayout(_ZN3ext9NetTracer5traceERKN2db6LayoutERKNS1_4CellERKNS_14NetTracerShapeESA_RKNS_13NetTracerDataE+0x1377) [0x1263bb7]
./klayout(_ZN3ext9NetTracer5traceERKN2db6LayoutERKNS1_4CellERKNS_14NetTracerShapeERKNS_13NetTracerDataE+0xa8) [0x1265998]
./klayout(_ZN3ext9NetTracer5traceERKN2db6LayoutERKNS1_4CellERKNS1_5pointIiEEjRKNS_13NetTracerDataE+0x120) [0x1265ac0]
./klayout(_ZN3ext15NetTracerDialog8do_traceERKN2db3boxIddEES5_b+0x1339) [0x1e19e19]
./klayout(_ZN3ext15NetTracerDialog17mouse_click_eventERKN2db5pointIdEEjb+0x16e) [0x1e26b0e]
./klayout(_ZN3lay16ViewObjectWidget17mouseReleaseEventEP11QMouseEvent+0x294) [0x1b23bd4]
/usr/lib64/libQtGui.so.4(_ZN7QWidget5eventEP6QEvent+0x9da) [0x3e679f5a7a]
./klayout(_ZN3lay12LayoutCanvas5eventEP6QEvent+0x2f) [0x1f4d9ef]
/usr/lib64/libQtGui.so.4(_ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent+0xac) [0x3e679aaa0c]
/usr/lib64/libQtGui.so.4(_ZN12QApplication6notifyEP7QObjectP6QEvent+0x91d) [0x3e679b11ad]
./klayout(_ZN3lay11Application6notifyEP7QObjectP6QEvent+0x9) [0x1a3c5d9]
/usr/lib64/libQtCore.so.4(_ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent+0x8c) [0x3e659579fc]
/usr/lib64/libQtGui.so.4(_ZN19QApplicationPrivate14sendMouseEventEP7QWidgetP11QMouseEventS1_S1_PS1_R8QPointerIS0_Eb+0x19e) [0x3e679b039e]
/usr/lib64/libQtGui.so.4() [0x3e67a22355]
/usr/lib64/libQtGui.so.4(_ZN12QApplication15x11ProcessEventEP7_XEvent+0x8d0) [0x3e67a20d60]
/usr/lib64/libQtGui.so.4() [0x3e67a49c42]
/lib64/libglib-2.0.so.0(g_main_context_dispatch+0x22e) [0x3e60438f0e]
/lib64/libglib-2.0.so.0() [0x3e6043c938]
/lib64/libglib-2.0.so.0(g_main_context_iteration+0x7a) [0x3e6043ca3a]
/usr/lib64/libQtCore.so.4(_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0x73) [0x3e6597d2d3]
/usr/lib64/libQtGui.so.4() [0x3e67a4990e]
/usr/lib64/libQtCore.so.4(_ZN10QEventLoop13processEventsE6QFlagsINS_17ProcessEventsFlagEE+0x32) [0x3e65956442]
/usr/lib64/libQtCore.so.4(_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0xdc) [0x3e6595670c]
/usr/lib64/libQtCore.so.4(_ZN16QCoreApplication4execEv+0xb9) [0x3e659589f9]
./klayout(_ZN3lay11Application4execEv+0x2e0) [0x1a41a70]
./klayout(_ZN3lay11Application3runEv+0x1380) [0x1a43640]
./klayout(_Z12klayout_mainiPPc+0x205) [0xb51fe5]
./klayout(main+0x115) [0xb52485]
/lib64/libc.so.6(__libc_start_main+0xfd) [0x3e5f41ecdd]
./klayout() [0xb51b99]

The console would show the error messages:

pure virtual method called
terminate called without an active exception

I tried to upgrade the gcc version from 4.4.6 to 4.4.7 and it didn't help.

Is there anyway to fix it ?

Best Regards,

chhung

Comments

  • edited August 2015
    I found that gcc 4.4.6/7 are miscompiling two files with -O3.

    To get around the net tracer core dumping:
    build klayout as ususal,
    change -O3 to -O2 in config/Makefile.conf.linux-64-gcc-release,
    touch the problematic files and build again.

    ./build ...

    config/Makefile.conf.linux-64-gcc-release:20 CXXOPT=-c -O2 -m64 -o

    touch ./src/extNetTracer.cc
    touch ./src/dbPolygonTools.cc

    ./build ... (only recompiles the two touched files with -O2 and links klayout)

    I'm sure that there are more elegant ways to achieve the desired build effect,
    but this works for me.

    Best Regards

    Stefan
  • edited November -1

    Hi Stefan,

    thanks for this hint.

    I thinks you can even safely switch to -O2 in general. I have done some testing on gcc 4.8.4 on an i7 / 64bit and there are no notable differences between -O3 and -O2.

    Maybe it's the more recent compiler or the better CPU ... anyway, I think I can recommend setting the -O2 before building and then the problem should be gone. I'll do some more testing and maybe then switch to -O2 in general.

    Thanks and best regards,

    Matthias

  • edited November -1

    Hi Stefan,

    Changing -O3 to -O2 fixed the crash issue, thank you so much~

    Also thanks Matthias for new version klayout :)

    Best Regards,

    chhung

Sign In or Register to comment.