iMath iMath - 7 months ago 22
Python Question

error when compiling cx_Freeze on Ubuntu

I'm using Python 3.3.2 on Ubuntu , when I compiled cx_Freeze from source ,the following error occurred ,any ideas?

philip@linuxmint ~/cx_Freeze-4.3.2 $ sudo python3 setup.py install
[sudo] password for philip:
adding base module named _dummy_thread
adding base module named _frozen_importlib
adding base module named _strptime
adding base module named _threading_local
adding base module named _weakrefset
adding base module named abc
adding base module named argparse
adding base module named base64
adding base module named bz2
adding base module named calendar
adding base module named codecs
adding base module named collections
adding base module named collections.abc
adding base module named contextlib
adding base module named copy
adding base module named copyreg
adding base module named datetime
adding base module named dummy_threading
adding base module named encodings
adding base module named encodings.aliases
adding base module named encodings.ascii
adding base module named encodings.base64_codec
adding base module named encodings.big5
adding base module named encodings.big5hkscs
adding base module named encodings.bz2_codec
adding base module named encodings.charmap
adding base module named encodings.cp037
adding base module named encodings.cp1006
adding base module named encodings.cp1026
adding base module named encodings.cp1140
adding base module named encodings.cp1250
adding base module named encodings.cp1251
adding base module named encodings.cp1252
adding base module named encodings.cp1253
adding base module named encodings.cp1254
adding base module named encodings.cp1255
adding base module named encodings.cp1256
adding base module named encodings.cp1257
adding base module named encodings.cp1258
adding base module named encodings.cp424
adding base module named encodings.cp437
adding base module named encodings.cp500
adding base module named encodings.cp65001
adding base module named encodings.cp720
adding base module named encodings.cp737
adding base module named encodings.cp775
adding base module named encodings.cp850
adding base module named encodings.cp852
adding base module named encodings.cp855
adding base module named encodings.cp856
adding base module named encodings.cp857
adding base module named encodings.cp858
adding base module named encodings.cp860
adding base module named encodings.cp861
adding base module named encodings.cp862
adding base module named encodings.cp863
adding base module named encodings.cp864
adding base module named encodings.cp865
adding base module named encodings.cp866
adding base module named encodings.cp869
adding base module named encodings.cp874
adding base module named encodings.cp875
adding base module named encodings.cp932
adding base module named encodings.cp949
adding base module named encodings.cp950
adding base module named encodings.euc_jis_2004
adding base module named encodings.euc_jisx0213
adding base module named encodings.euc_jp
adding base module named encodings.euc_kr
adding base module named encodings.gb18030
adding base module named encodings.gb2312
adding base module named encodings.gbk
adding base module named encodings.hex_codec
adding base module named encodings.hp_roman8
adding base module named encodings.hz
adding base module named encodings.idna
adding base module named encodings.iso2022_jp
adding base module named encodings.iso2022_jp_1
adding base module named encodings.iso2022_jp_2
adding base module named encodings.iso2022_jp_2004
adding base module named encodings.iso2022_jp_3
adding base module named encodings.iso2022_jp_ext
adding base module named encodings.iso2022_kr
adding base module named encodings.iso8859_1
adding base module named encodings.iso8859_10
adding base module named encodings.iso8859_11
adding base module named encodings.iso8859_13
adding base module named encodings.iso8859_14
adding base module named encodings.iso8859_15
adding base module named encodings.iso8859_16
adding base module named encodings.iso8859_2
adding base module named encodings.iso8859_3
adding base module named encodings.iso8859_4
adding base module named encodings.iso8859_5
adding base module named encodings.iso8859_6
adding base module named encodings.iso8859_7
adding base module named encodings.iso8859_8
adding base module named encodings.iso8859_9
adding base module named encodings.johab
adding base module named encodings.koi8_r
adding base module named encodings.koi8_u
adding base module named encodings.latin_1
adding base module named encodings.mac_arabic
adding base module named encodings.mac_centeuro
adding base module named encodings.mac_croatian
adding base module named encodings.mac_cyrillic
adding base module named encodings.mac_farsi
adding base module named encodings.mac_greek
adding base module named encodings.mac_iceland
adding base module named encodings.mac_latin2
adding base module named encodings.mac_roman
adding base module named encodings.mac_romanian
adding base module named encodings.mac_turkish
adding base module named encodings.mbcs
adding base module named encodings.palmos
adding base module named encodings.ptcp154
adding base module named encodings.punycode
adding base module named encodings.quopri_codec
adding base module named encodings.raw_unicode_escape
adding base module named encodings.rot_13
adding base module named encodings.shift_jis
adding base module named encodings.shift_jis_2004
adding base module named encodings.shift_jisx0213
adding base module named encodings.tis_620
adding base module named encodings.undefined
adding base module named encodings.unicode_escape
adding base module named encodings.unicode_internal
adding base module named encodings.utf_16
adding base module named encodings.utf_16_be
adding base module named encodings.utf_16_le
adding base module named encodings.utf_32
adding base module named encodings.utf_32_be
adding base module named encodings.utf_32_le
adding base module named encodings.utf_7
adding base module named encodings.utf_8
adding base module named encodings.utf_8_sig
adding base module named encodings.uu_codec
adding base module named encodings.zlib_codec
adding base module named functools
adding base module named genericpath
adding base module named gettext
adding base module named heapq
adding base module named imp
adding base module named importlib
adding base module named importlib._bootstrap
adding base module named importlib.machinery
adding base module named io
adding base module named keyword
adding base module named linecache
adding base module named locale
adding base module named optparse
adding base module named os
adding base module named posixpath
adding base module named quopri
adding base module named re
adding base module named reprlib
adding base module named sre_compile
adding base module named sre_constants
adding base module named sre_parse
adding base module named stat
adding base module named stringprep
adding base module named struct
adding base module named textwrap
adding base module named threading
adding base module named token
adding base module named tokenize
adding base module named traceback
adding base module named types
adding base module named warnings
adding base module named weakref
running install
Checking .pth file support in /usr/local/lib/python3.3/dist-packages/
/usr/bin/python3 -E -c pass
TEST PASSED: /usr/local/lib/python3.3/dist-packages/ appears to support .pth files
running bdist_egg
running egg_info
writing cx_Freeze.egg-info/PKG-INFO
writing top-level names to cx_Freeze.egg-info/top_level.txt
writing dependency_links to cx_Freeze.egg-info/dependency_links.txt
reading manifest file 'cx_Freeze.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'cx_Freeze.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-i686/egg
running install_lib
running build_py
creating build/lib.linux-i686-3.3
creating build/lib.linux-i686-3.3/cx_Freeze
copying cx_Freeze/hooks.py -> build/lib.linux-i686-3.3/cx_Freeze
copying cx_Freeze/freezer.py -> build/lib.linux-i686-3.3/cx_Freeze
copying cx_Freeze/main.py -> build/lib.linux-i686-3.3/cx_Freeze
copying cx_Freeze/finder.py -> build/lib.linux-i686-3.3/cx_Freeze
copying cx_Freeze/__init__.py -> build/lib.linux-i686-3.3/cx_Freeze
copying cx_Freeze/dist.py -> build/lib.linux-i686-3.3/cx_Freeze
copying cx_Freeze/windist.py -> build/lib.linux-i686-3.3/cx_Freeze
copying cx_Freeze/macdist.py -> build/lib.linux-i686-3.3/cx_Freeze
copying cx_Freeze/setupwriter.py -> build/lib.linux-i686-3.3/cx_Freeze
creating build/lib.linux-i686-3.3/cx_Freeze/initscripts
copying cx_Freeze/initscripts/Console3.py -> build/lib.linux-i686-3.3/cx_Freeze/initscripts
copying cx_Freeze/initscripts/ConsoleKeepPath3.py -> build/lib.linux-i686-3.3/cx_Freeze/initscripts
creating build/lib.linux-i686-3.3/cx_Freeze/samples
creating build/lib.linux-i686-3.3/cx_Freeze/samples/relimport
copying cx_Freeze/samples/relimport/setup.py -> build/lib.linux-i686-3.3/cx_Freeze/samples/relimport
copying cx_Freeze/samples/relimport/relimport.py -> build/lib.linux-i686-3.3/cx_Freeze/samples/relimport
creating build/lib.linux-i686-3.3/cx_Freeze/samples/PyQt4
copying cx_Freeze/samples/PyQt4/setup.py -> build/lib.linux-i686-3.3/cx_Freeze/samples/PyQt4
copying cx_Freeze/samples/PyQt4/PyQt4app.py -> build/lib.linux-i686-3.3/cx_Freeze/samples/PyQt4
creating build/lib.linux-i686-3.3/cx_Freeze/samples/matplotlib
copying cx_Freeze/samples/matplotlib/test_matplotlib.py -> build/lib.linux-i686-3.3/cx_Freeze/samples/matplotlib
copying cx_Freeze/samples/matplotlib/setup.py -> build/lib.linux-i686-3.3/cx_Freeze/samples/matplotlib
creating build/lib.linux-i686-3.3/cx_Freeze/samples/Tkinter
copying cx_Freeze/samples/Tkinter/setup.py -> build/lib.linux-i686-3.3/cx_Freeze/samples/Tkinter
copying cx_Freeze/samples/Tkinter/SimpleTkApp.py -> build/lib.linux-i686-3.3/cx_Freeze/samples/Tkinter
creating build/lib.linux-i686-3.3/cx_Freeze/samples/zope
copying cx_Freeze/samples/zope/qotd.py -> build/lib.linux-i686-3.3/cx_Freeze/samples/zope
copying cx_Freeze/samples/zope/setup.py -> build/lib.linux-i686-3.3/cx_Freeze/samples/zope
creating build/lib.linux-i686-3.3/cx_Freeze/samples/service
copying cx_Freeze/samples/service/Config.py -> build/lib.linux-i686-3.3/cx_Freeze/samples/service
copying cx_Freeze/samples/service/setup.py -> build/lib.linux-i686-3.3/cx_Freeze/samples/service
copying cx_Freeze/samples/service/ServiceHandler.py -> build/lib.linux-i686-3.3/cx_Freeze/samples/service
creating build/lib.linux-i686-3.3/cx_Freeze/samples/simple
copying cx_Freeze/samples/simple/setup.py -> build/lib.linux-i686-3.3/cx_Freeze/samples/simple
copying cx_Freeze/samples/simple/hello.py -> build/lib.linux-i686-3.3/cx_Freeze/samples/simple
creating build/lib.linux-i686-3.3/cx_Freeze/samples/wx
copying cx_Freeze/samples/wx/setup.py -> build/lib.linux-i686-3.3/cx_Freeze/samples/wx
copying cx_Freeze/samples/wx/wxapp.py -> build/lib.linux-i686-3.3/cx_Freeze/samples/wx
creating build/lib.linux-i686-3.3/cx_Freeze/samples/advanced
copying cx_Freeze/samples/advanced/advanced_2.py -> build/lib.linux-i686-3.3/cx_Freeze/samples/advanced
copying cx_Freeze/samples/advanced/setup.py -> build/lib.linux-i686-3.3/cx_Freeze/samples/advanced
copying cx_Freeze/samples/advanced/advanced_1.py -> build/lib.linux-i686-3.3/cx_Freeze/samples/advanced
running build_ext
building 'cx_Freeze.util' extension
creating build/temp.linux-i686-3.3/source
i686-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.3m -c source/util.c -o build/temp.linux-i686-3.3/source/util.o
i686-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wno-unused-result -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-i686-3.3/source/util.o -o build/lib.linux-i686-3.3/cx_Freeze/util.cpython-33m.so
creating build/temp.linux-i686-3.3/source/bases
i686-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -Ibuild/temp.linux-i686-3.3 -I/usr/include/python3.3m -c source/bases/Console.c -o build/temp.linux-i686-3.3/source/bases/Console.o
In file included from source/bases/Console.c:41:0:
source/bases/Common.c: In function ‘ExecuteScript’:
source/bases/Common.c:307:5: warning: passing argument 1 of ‘PyEval_EvalCode’ from incompatible pointer type [enabled by default]
In file included from /usr/include/python3.3m/Python.h:123:0,
from source/bases/Console.c:6:
/usr/include/python3.3m/eval.h:10:24: note: expected ‘struct PyObject *’ but argument is of type ‘struct PyCodeObject *’
creating build/lib.linux-i686-3.3/cx_Freeze/bases
i686-linux-gnu-gcc -pthread build/temp.linux-i686-3.3/source/bases/Console.o -o build/lib.linux-i686-3.3/cx_Freeze/bases/Console -s
build/temp.linux-i686-3.3/source/bases/Console.o: In function `GetImporterHelper':
/home/philip/cx_Freeze-4.3.2/source/bases/Common.c:211: undefined reference to `PyObject_CallMethod'
/home/philip/cx_Freeze-4.3.2/source/bases/Common.c:215: undefined reference to `PyErr_Clear'
build/temp.linux-i686-3.3/source/bases/Console.o: In function `GetDirName':
/home/philip/cx_Freeze-4.3.2/source/bases/Common.c:66: undefined reference to `Py_FileSystemDefaultEncoding'
/home/philip/cx_Freeze-4.3.2/source/bases/Common.c:66: undefined reference to `PyUnicode_Decode'
build/temp.linux-i686-3.3/source/bases/Console.o: In function `FatalError':
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:24: undefined reference to `PyErr_Print'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:25: undefined reference to `Py_FatalError'
build/temp.linux-i686-3.3/source/bases/Console.o: In function `cxString_ToString':
/home/philip/cx_Freeze-4.3.2/source/bases/Common.c:41: undefined reference to `Py_FileSystemDefaultEncoding'
/home/philip/cx_Freeze-4.3.2/source/bases/Common.c:41: undefined reference to `PyUnicode_AsEncodedString'
build/temp.linux-i686-3.3/source/bases/Console.o: In function `FatalError':
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:24: undefined reference to `PyErr_Print'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:25: undefined reference to `Py_FatalError'
build/temp.linux-i686-3.3/source/bases/Console.o: In function `main':
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:64: undefined reference to `Py_NoSiteFlag'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:65: undefined reference to `Py_FrozenFlag'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:66: undefined reference to `Py_IgnoreEnvironmentFlag'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:67: undefined reference to `PyImport_FrozenModules'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:72: undefined reference to `Py_SetPythonHome'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:74: undefined reference to `PyMem_Malloc'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:79: undefined reference to `PyMem_Malloc'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:86: undefined reference to `Py_SetProgramName'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:87: undefined reference to `Py_GetProgramFullPath'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:89: undefined reference to `Py_Initialize'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:90: undefined reference to `PySys_SetArgv'
build/temp.linux-i686-3.3/source/bases/Console.o: In function `SetExecutableName':
/home/philip/cx_Freeze-4.3.2/source/bases/Common.c:93: undefined reference to `Py_FileSystemDefaultEncoding'
/home/philip/cx_Freeze-4.3.2/source/bases/Common.c:93: undefined reference to `PyUnicode_Decode'
/home/philip/cx_Freeze-4.3.2/source/bases/Common.c:115: undefined reference to `Py_FileSystemDefaultEncoding'
/home/philip/cx_Freeze-4.3.2/source/bases/Common.c:115: undefined reference to `PyUnicode_Decode'
/home/philip/cx_Freeze-4.3.2/source/bases/Common.c:136: undefined reference to `Py_FileSystemDefaultEncoding'
/home/philip/cx_Freeze-4.3.2/source/bases/Common.c:136: undefined reference to `PyUnicode_Decode'
build/temp.linux-i686-3.3/source/bases/Console.o: In function `FatalError':
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:24: undefined reference to `PyErr_Print'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:25: undefined reference to `Py_FatalError'
build/temp.linux-i686-3.3/source/bases/Console.o: In function `main':
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:105: undefined reference to `Py_Finalize'
build/temp.linux-i686-3.3/source/bases/Console.o: In function `SetExecutableName':
/home/philip/cx_Freeze-4.3.2/source/bases/Common.c:155: undefined reference to `Py_FileSystemDefaultEncoding'
/home/philip/cx_Freeze-4.3.2/source/bases/Common.c:155: undefined reference to `PyUnicode_Decode'
/home/philip/cx_Freeze-4.3.2/source/bases/Common.c:167: undefined reference to `Py_FileSystemDefaultEncoding'
/home/philip/cx_Freeze-4.3.2/source/bases/Common.c:167: undefined reference to `PyUnicode_Decode'
build/temp.linux-i686-3.3/source/bases/Console.o: In function `SetPathToSearch':
/home/philip/cx_Freeze-4.3.2/source/bases/Common.c:186: undefined reference to `PySys_GetObject'
/home/philip/cx_Freeze-4.3.2/source/bases/Common.c:189: undefined reference to `PyList_Insert'
/home/philip/cx_Freeze-4.3.2/source/bases/Common.c:191: undefined reference to `PyList_Insert'
/home/philip/cx_Freeze-4.3.2/source/bases/Common.c:193: undefined reference to `PyList_Insert'
/home/philip/cx_Freeze-4.3.2/source/bases/Common.c:195: undefined reference to `PyList_Insert'
build/temp.linux-i686-3.3/source/bases/Console.o: In function `GetImporter':
/home/philip/cx_Freeze-4.3.2/source/bases/Common.c:231: undefined reference to `PyImport_ImportModule'
build/temp.linux-i686-3.3/source/bases/Console.o: In function `ExecuteScript':
/home/philip/cx_Freeze-4.3.2/source/bases/Common.c:295: undefined reference to `PyDict_New'
build/temp.linux-i686-3.3/source/bases/Console.o: In function `PopulateInitScriptDict':
/home/philip/cx_Freeze-4.3.2/source/bases/Common.c:256: undefined reference to `PyEval_GetBuiltins'
/home/philip/cx_Freeze-4.3.2/source/bases/Common.c:256: undefined reference to `PyDict_SetItemString'
/home/philip/cx_Freeze-4.3.2/source/bases/Common.c:258: undefined reference to `PyDict_SetItemString'
/home/philip/cx_Freeze-4.3.2/source/bases/Common.c:260: undefined reference to `PyDict_SetItemString'
/home/philip/cx_Freeze-4.3.2/source/bases/Common.c:262: undefined reference to `PyDict_SetItemString'
/home/philip/cx_Freeze-4.3.2/source/bases/Common.c:265: undefined reference to `PyDict_SetItemString'
build/temp.linux-i686-3.3/source/bases/Console.o:/home/philip/cx_Freeze-4.3.2/source/bases/Common.c:268: more undefined references to `PyDict_SetItemString' follow
build/temp.linux-i686-3.3/source/bases/Console.o: In function `ExecuteScript':
/home/philip/cx_Freeze-4.3.2/source/bases/Common.c:303: undefined reference to `PyObject_CallMethod'
/home/philip/cx_Freeze-4.3.2/source/bases/Common.c:307: undefined reference to `PyEval_EvalCode'
build/temp.linux-i686-3.3/source/bases/Console.o: In function `SetExecutableName':
/home/philip/cx_Freeze-4.3.2/source/bases/Common.c:102: undefined reference to `PyExc_OSError'
/home/philip/cx_Freeze-4.3.2/source/bases/Common.c:102: undefined reference to `PyErr_SetFromErrnoWithFilename'
build/temp.linux-i686-3.3/source/bases/Console.o: In function `FatalError':
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:24: undefined reference to `PyErr_Print'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:25: undefined reference to `Py_FatalError'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:24: undefined reference to `PyErr_Print'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:25: undefined reference to `Py_FatalError'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:24: undefined reference to `PyErr_Print'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:25: undefined reference to `Py_FatalError'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:24: undefined reference to `PyErr_Print'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:25: undefined reference to `Py_FatalError'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:24: undefined reference to `PyErr_Print'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:25: undefined reference to `Py_FatalError'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:24: undefined reference to `PyErr_Print'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:25: undefined reference to `Py_FatalError'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:24: undefined reference to `PyErr_Print'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:25: undefined reference to `Py_FatalError'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:24: undefined reference to `PyErr_Print'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:25: undefined reference to `Py_FatalError'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:24: undefined reference to `PyErr_Print'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:25: undefined reference to `Py_FatalError'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:24: undefined reference to `PyErr_Print'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:25: undefined reference to `Py_FatalError'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:24: undefined reference to `PyErr_Print'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:25: undefined reference to `Py_FatalError'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:24: undefined reference to `PyErr_Print'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:25: undefined reference to `Py_FatalError'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:24: undefined reference to `PyErr_Print'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:25: undefined reference to `Py_FatalError'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:24: undefined reference to `PyErr_Print'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:25: undefined reference to `Py_FatalError'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:24: undefined reference to `PyErr_Print'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:25: undefined reference to `Py_FatalError'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:24: undefined reference to `PyErr_Print'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:25: undefined reference to `Py_FatalError'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:24: undefined reference to `PyErr_Print'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:25: undefined reference to `Py_FatalError'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:24: undefined reference to `PyErr_Print'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:25: undefined reference to `Py_FatalError'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:24: undefined reference to `PyErr_Print'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:25: undefined reference to `Py_FatalError'
build/temp.linux-i686-3.3/source/bases/Console.o: In function `FatalScriptError':
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:36: undefined reference to `PyErr_Print'
build/temp.linux-i686-3.3/source/bases/Console.o: In function `FatalError':
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:24: undefined reference to `PyErr_Print'
/home/philip/cx_Freeze-4.3.2/source/bases/Console.c:25: undefined reference to `Py_FatalError'
collect2: error: ld returned 1 exit status
error: command 'i686-linux-gnu-gcc' failed with exit status 1
philip@linuxmint ~/cx_Freeze-4.3.2 $

Answer

Change file setup.py from

if not vars.get("Py_ENABLE_SHARED", 0):
            vars = distutils.sysconfig.get_config_vars()
            if not vars.get("Py_ENABLE_SHARED", 0):

to

if True:
            vars = distutils.sysconfig.get_config_vars()
            if True:

Remember to install python(3)-dev and run sudo python3 setup.py install

See https://bitbucket.org/anthony_tuininga/cx_freeze/issues/32/cant-compile-cx_freeze-in-ubuntu-1304 for more details.

Comments