Build strm2cif error: undefined reference to Py*

Please advise how to resolve these compile errors:
g++ -c -pipe -std=c++0x -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 -DQT_WEBKIT -DHAVE_QTBINDINGS -DHAVE_PYTHON -DHAVE_RUBY -DHAVE_RUBY_VERSION_CODE=20100 -DHAVE_QT -DHAVE_QT_NETWORK -DHAVE_QT_SQL -DHAVE_QT_SVG -DHAVE_QT_PRINTSUPPORT -DHAVE_QT_MULTIMEDIA -DHAVE_QT_DESIGNER -DHAVE_QT_XML -DKLAYOUT_VERSION=0.27.4 -DKLAYOUT_VERSION_REV=LatestSourcePackage -DKLAYOUT_VERSION_DATE=2021-11-10 -DKLAYOUT_MAJOR_VERSION=0 -DKLAYOUT_MINOR_VERSION=27 -DKLAYOUT_TINY_VERSION=4 -DBD_TARGET=strm2cif -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/share/qt4/mkspecs/default -I../../../../src/buddies/src/strm2cif -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/buddies/src/bd -I../../../../src/tl/tl -I../../../../src/gsi/gsi -I../../../../src/rba/rba -I../../../../src/pya/pya -I/nfs/disks/tools/klayout-0.27.4/build-release/buddies/src/strm2cif/. -I../../../../src/buddies/src/strm2cif -I. -o main.o ../../../../src/buddies/src/bd/main.cc
g++ -Wl,-O1 -Wl,-rpath,/nfs/disks/tools/klayout-0.27.4 -o ../../../../build-release/strm2cif main.o -L/usr/lib64 -lz -L/nfs/disks/tools/klayout-0.27.4/build-release/buddies/src/strm2cif/../../.. -lklayout_bd -lklayout_db -lklayout_tl -lklayout_gsi -lklayout_lib -lklayout_rdb -lklayout_lym -lklayout_rba -lklayout_pya /usr/lib64/libruby2.1.so.2.1.0 -ldl -lQtScript -L/usr/lib64 -lQtSql -lQtXml -lQtGui -L/usr/X11R6/lib -lQtNetwork -lQtCore -lQtDesigner -lpthread
/nfs/site/itools/em64t_SLES12SP5/pkgs/gcc/4.7.2/.bin/../lib64/gcc/x86_64-suse-linux/4.7.2/../../../../x86_64-suse-linux/bin/ld: warning: libpython3.7m.so.1.0, needed by /nfs/pdx/disks/ad_fdk_fill/tools/klayout-0.27.4/build-release/buddies/src/strm2cif/../../../libklayout_pya.so, not found (try using -rpath or -rpath-link)
/nfs/disks/tools/klayout-0.27.4/build-release/buddies/src/strm2cif/../../../libklayout_pya.so: undefined reference to PyErr_SetNone' /nfs/disks/tools/klayout-0.27.4/build-release/buddies/src/strm2cif/../../../libklayout_pya.so: undefined reference toPyLong_FromLong'
...
cif/../../../libklayout_pya.so: undefined reference to PyBytes_FromStringAndSize' /nfs/disks/tools/klayout-0.27.4/build-release/buddies/src/strm2cif/../../../libklayout_pya.so: undefined reference toPyWeakref_NewRef'
collect2: error: ld returned 1 exit status
Makefile:107: recipe for target '../../../../build-release/strm2cif' failed
gmake[3]: *** [../../../../build-release/strm2cif] Error 1
gmake[3]: Leaving directory '/nfs/disks/tools/klayout-0.27.4/build-release/buddies/src/strm2cif'
Makefile:72: recipe for target 'sub-strm2cif-make_default' failed
gmake[2]: *** [sub-strm2cif-make_default] Error 2
gmake[2]: Leaving directory '/nfs/pdx/disks/ad_fdk_fill/nickau/tools/klayout-0.27.4/build-release/buddies/src'
Makefile:40: recipe for target 'sub-src-make_default' failed
gmake[1]: *** [sub-src-make_default] Error 2
gmake[1]: Leaving directory '/nfs/pdx/disks/ad_fdk_fill/nickau/tools/klayout-0.27.4/build-release/buddies'
Makefile:320: recipe for target 'sub-buddies-make_default' failed
gmake: *** [sub-buddies-make_default] Error 2

Comments

  • Please read the log:

    /x86_64-suse-linux/bin/ld: warning: libpython3.7m.so.1.0, needed by /nfs/pdx/disks/ad_fdk_fill/tools/klayout-0.27.4/build-release/buddies/src/strm2cif/../../../libklayout_pya.so, not found (try using -rpath or -rpath-link)
    

    Looks like your build system isn't configured properly. It seems like your Python installation isn't enabled to building modules against it.

    Matthias

Sign In or Register to comment.