Nuitka: MacOS - ld: symbol(s) not found for architecture x86_64

Created on 4 Aug 2018  路  42Comments  路  Source: Nuitka/Nuitka

Hello,

I'm trying to compile a simple Hello World module and I'm getting this error:

ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
scons: * [prueba.exe] Error 1

I've tested it with both Python 3.7 and 3.6.6 with the same results. Compilation works, but there is a problem with the linker.

I'm working with MacOS High Sierra and XCode is installed.

What am I missing?

wontfix

Most helpful comment

I experience the same problem on my Mac with Python 3.7.0 also installed via pyenv.

All 42 comments

How come you didn't fill out the issue template?

Sorry, my fault.

  • Nuitka version, full Python version and Platform (Windows, OSX, Linux ...)
  • Nuitka version 0.5.32.2
  • Tested with both Python 3.6.6 and 3.7
  • MacOS High Sierra 10.13.6
  • How did you install Nuitka and Python (pip, anaconda, deb, rpm, from source,
    what is a virtualenv ...), this is very important usually.
  • Nuitka installed using virtualenv + pip
  • If possible please supply a Short, Self Contained, Correct, Example
    that demonstrates the issue i.e a small piece of code which reproduces
    the issue and can be run with out any other (or as few as possible)
    external dependencies.
  1. Create a prueba.py Python module with this content:
    print('Hello world')

  2. Run Nuitka
    python -m nuitka prueba.py

  • If this is a regression (used to work in an earlier version of Nuitka),
    please note what you know about that.
  • Nothing to add here

The Python version is a bit unspecific. Seems on MacOS there is various ways of installing things, maybe include "sys.version" value which out to say that.

Python 3.6.6 sys.version outputs:

3.6.6 (default, Jul 22 2018, 16:00:01)
[GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.2)]

And Python 3.7:

3.7.0 (default, Jun 29 2018, 20:13:13)
[Clang 9.1.0 (clang-902.0.39.2)]

It's really bad that i have no Mac OS access here. I will ask people and get back to this. Very likely your installation source of Python is not supported, but I actually cannot try out anything myself.

I sent out a tweet asking for a machine. What I am missing, is where you downloaded your Pythons, I mean, they are not part of MacOS, or are they?

No, they are not the MacOS builtin Pythons. I'm using pyenv to manage Python versions.

I experience the same problem on my Mac with Python 3.7.0 also installed via pyenv.

Can you try out Homebrew Python and tell me if that works?

Also which symbols are missing, just a few, or like all? I never saw any error output telling me which ones it would be.

I think there are like all symbols missing. Here is the complete list I get when trying to compile a simple "hello world" script.

$ nuitka3 test.py

Undefined symbols for architecture x86_64:
  "_PyArg_ParseTuple", referenced from:
      _Nuitka_Method_reduce_ex in CompiledMethodType.o
  "_PyArg_ParseTupleAndKeywords", referenced from:
      __inspect_getgeneratorstate_replacement in InspectPatcher.o
      __inspect_getcoroutinestate_replacement in InspectPatcher.o
      __types_coroutine_replacement in InspectPatcher.o
      __path_unfreezer_get_data in MetaPathBasedLoader.o
      __path_unfreezer_find_module in MetaPathBasedLoader.o
      __path_unfreezer_load_module in MetaPathBasedLoader.o
      __path_unfreezer_is_package in MetaPathBasedLoader.o
      ...
  "_PyArg_UnpackTuple", referenced from:
      _Nuitka_Method_tp_new in CompiledMethodType.o
      _Nuitka_Generator_throw in CompiledGeneratorType.o
      _Nuitka_Coroutine_throw in CompiledCoroutineType.o
      _Nuitka_CoroutineWrapper_throw in CompiledCoroutineType.o
      _Nuitka_AsyncgenAsend_throw in CompiledAsyncgenType.o
      _Nuitka_AsyncgenAthrow_send in CompiledAsyncgenType.o
      _Nuitka_AsyncgenAthrow_throw in CompiledAsyncgenType.o
      ...
  "_PyAsyncGen_Type", referenced from:
      _Nuitka_PyGen_gen_close_iter in CompiledGeneratorType.o
      _Nuitka_PyGen_gen_send_ex in CompiledGeneratorType.o
      _Nuitka_IsInstance in CompiledCodeHelpers.o
  "_PyBaseObject_Type", referenced from:
      __initSlotIternext in CompiledCodeHelpers.o
  "_PyBool_Type", referenced from:
      _DEEP_COPY in CompiledCodeHelpers.o
  "_PyByteArray_FromObject", referenced from:
      _BUILTIN_BYTEARRAY1 in CompiledCodeHelpers.o
      _DEEP_COPY in CompiledCodeHelpers.o
  "_PyByteArray_FromStringAndSize", referenced from:
      _UNSTREAM_BYTEARRAY in CompiledCodeHelpers.o
  "_PyByteArray_Type", referenced from:
      _BUILTIN_ORD in CompiledCodeHelpers.o
      _DEEP_COPY in CompiledCodeHelpers.o
  "_PyBytes_FromStringAndSize", referenced from:
      _UNSTREAM_BYTES in CompiledCodeHelpers.o
  "_PyCFunction_NewEx", referenced from:
      _patchInspectModule in InspectPatcher.o
      _patchBuiltinModule in InspectPatcher.o
      _registerMetaPathBasedUnfreezer in MetaPathBasedLoader.o
  "_PyCFunction_Type", referenced from:
      _CALL_FUNCTION_WITH_ARGS1 in __helpers.o
      _CALL_FUNCTION_WITH_ARGS2 in __helpers.o
      _CALL_FUNCTION_WITH_ARGS3 in __helpers.o
      _CALL_FUNCTION_WITH_ARGS4 in __helpers.o
      _CALL_FUNCTION_WITH_ARGS5 in __helpers.o
      _Nuitka_Method_tp_call in CompiledMethodType.o
      _DEEP_COPY in CompiledCodeHelpers.o
      ...
  "_PyCallIter_Type", referenced from:
      _BUILTIN_ITER2 in CompiledCodeHelpers.o
  "_PyCallable_Check", referenced from:
      _Nuitka_Method_tp_new in CompiledMethodType.o
      _BUILTIN_CALLABLE in CompiledCodeHelpers.o
  "_PyCapsule_New", referenced from:
      _createGlobalConstants in __constants.o
  "_PyCode_New", referenced from:
      _MAKE_CODEOBJ in CompiledFrameType.o
  "_PyCode_Type", referenced from:
      _COMPILE_CODE in CompiledCodeHelpers.o
  "_PyComplex_Type", referenced from:
      _DEEP_COPY in CompiledCodeHelpers.o
  "_PyCoro_Type", referenced from:
      _Nuitka_UncompiledGenerator_throw in CompiledGeneratorType.o
      _Nuitka_PyGen_gen_close_iter in CompiledGeneratorType.o
      _Nuitka_PyGen_gen_send_ex in CompiledGeneratorType.o
      _GENERATOR_YIELD_FROM in CompiledGeneratorType.o
      __YIELD_FROM in CompiledGeneratorType.o
      _GENERATOR_YIELD_FROM_IN_HANDLER in CompiledGeneratorType.o
      __YIELD_FROM_IN_HANDLER in CompiledGeneratorType.o
      ...
  "_PyDict_DelItem", referenced from:
      _main in MainProgram.o
      _Nuitka_CallFunctionPosArgsKwArgs in CompiledFunctionType.o
  "_PyDict_GetItem", referenced from:
      _parseArgumentsPos in CompiledFunctionType.o
      _parseArgumentsMethodPos in CompiledFunctionType.o
      _Nuitka_CallFunctionPosArgsKwArgs in CompiledFunctionType.o
      _Nuitka_CallMethodFunctionNoArgs in CompiledFunctionType.o
      _Nuitka_CallMethodFunctionPosArgs in CompiledFunctionType.o
      _Nuitka_Function_get_module in CompiledFunctionType.o
      _MAKE_FRAME in CompiledFrameType.o
      ...
  "_PyDict_New", referenced from:
      _PyInit___main__ in module.__main__.o
      _parseArgumentsPos in CompiledFunctionType.o
      _parseArgumentsMethodPos in CompiledFunctionType.o
      _Nuitka_CallFunctionPosArgsKwArgs in CompiledFunctionType.o
      _Nuitka_CallMethodFunctionNoArgs in CompiledFunctionType.o
      _Nuitka_CallMethodFunctionPosArgs in CompiledFunctionType.o
      _Nuitka_Function_get_dict in CompiledFunctionType.o
      ...
  "_PyDict_Next", referenced from:
      _Nuitka_CallFunctionPosArgsKwArgs in CompiledFunctionType.o
  "_PyDict_SetItem", referenced from:
      _UPDATE_STRING_DICT1 in module.__main__.o
      _UPDATE_STRING_DICT0 in module.__main__.o
      _Nuitka_CallFunctionPosArgsKwArgs in CompiledFunctionType.o
      _Nuitka_Function_set_module in CompiledFunctionType.o
      _MAKE_FRAME in CompiledFrameType.o
      _Nuitka_Frame_getlocals in CompiledFrameType.o
      _EVAL_CODE in CompiledCodeHelpers.o
      ...
  "_PyDict_SetItemString", referenced from:
      _COMPILE_CODE in CompiledCodeHelpers.o
      _CALL_BUILTIN_KW_ARGS in CompiledCodeHelpers.o
      _IMPORT_EMBEDDED_MODULE in MetaPathBasedLoader.o
      _registerMetaPathBasedUnfreezer in MetaPathBasedLoader.o
  "_PyDict_Type", referenced from:
      _Nuitka_CallFunctionPosArgsKwArgs in CompiledFunctionType.o
      _DEEP_COPY in CompiledCodeHelpers.o
  "_PyErr_BadArgument", referenced from:
      _Nuitka_Cell_tp_richcompare in CompiledCellType.o
  "_PyErr_ExceptionMatches", referenced from:
      _Nuitka_UncompiledGenerator_throw in CompiledGeneratorType.o
      _Nuitka_PyGen_gen_close_iter in CompiledGeneratorType.o
      _Nuitka_PyGen_gen_send_ex in CompiledGeneratorType.o
      _Nuitka_gen_close_iter in CompiledCoroutineType.o
      __Nuitka_Coroutine_throw2 in CompiledCoroutineType.o
      _Nuitka_Asyncgen_unwrap_value in CompiledAsyncgenType.o
      __Nuitka_Asyncgen_throw2 in CompiledAsyncgenType.o
      ...
  "_PyErr_Format", referenced from:
      _CALL_FUNCTION_WITH_ARGS1 in __helpers.o
      _CALL_FUNCTION in __helpers.o
      _CALL_FUNCTION_WITH_ARGS2 in __helpers.o
      _CALL_FUNCTION_WITH_ARGS3 in __helpers.o
      _CALL_FUNCTION_WITH_ARGS4 in __helpers.o
      _CALL_FUNCTION_WITH_ARGS5 in __helpers.o
      _parseArgumentsPos in CompiledFunctionType.o
      ...
  "_PyErr_GivenExceptionMatches", referenced from:
      _Nuitka_UncompiledGenerator_throw in CompiledGeneratorType.o
      __Nuitka_Coroutine_throw2 in CompiledCoroutineType.o
      __Nuitka_Asyncgen_throw2 in CompiledAsyncgenType.o
  "_PyErr_NormalizeException", referenced from:
      _Nuitka_UncompiledGenerator_throw in CompiledGeneratorType.o
      _Nuitka_Generator_send2 in CompiledGeneratorType.o
      _CHAIN_EXCEPTION in CompiledGeneratorType.o
      _Nuitka_Generator_throw in CompiledGeneratorType.o
      __Nuitka_Coroutine_send in CompiledCoroutineType.o
      _CHAIN_EXCEPTION in CompiledCoroutineType.o
      __Nuitka_Coroutine_throw2 in CompiledCoroutineType.o
      ...
  "_PyErr_Print", referenced from:
      _MAKE_RELATIVE_PATH in CompiledCodeHelpers.o
      _IMPORT_EMBEDDED_MODULE in MetaPathBasedLoader.o
      _loadTriggeredModule in MetaPathBasedLoader.o
  "_PyErr_PrintEx", referenced from:
      _PyInit___main__ in module.__main__.o
      _main in MainProgram.o
      _COMPILE_CODE in CompiledCodeHelpers.o
      _BUILTIN_OPEN in CompiledCodeHelpers.o
      _BUILTIN_STATICMETHOD in CompiledCodeHelpers.o
      _BUILTIN_CLASSMETHOD in CompiledCodeHelpers.o
      _BUILTIN_BYTES1 in CompiledCodeHelpers.o
      ...
  "_PyErr_SetNone", referenced from:
      _PyGen_Send in CompiledGeneratorType.o
      _Nuitka_PyGen_gen_close_iter in CompiledGeneratorType.o
      _Nuitka_PyGen_gen_send_ex in CompiledGeneratorType.o
      _Nuitka_AsyncgenAsend_tp_iternext in CompiledAsyncgenType.o
      _Nuitka_AsyncgenAsend_send in CompiledAsyncgenType.o
      _Nuitka_Asyncgen_unwrap_value in CompiledAsyncgenType.o
      _Nuitka_AsyncgenAsend_throw in CompiledAsyncgenType.o
      ...
  "_PyErr_SetObject", referenced from:
      _PyGen_Send in CompiledGeneratorType.o
      __Nuitka_Coroutine_send in CompiledCoroutineType.o
      _Nuitka_AIterWrapper_iternext in CompiledCoroutineType.o
      __Nuitka_Asyncgen_send in CompiledAsyncgenType.o
  "_PyErr_SetString", referenced from:
      _Nuitka_Cell_get_contents in CompiledCellType.o
      _Nuitka_Function_set_dict in CompiledFunctionType.o
      _GENERATOR_YIELD_FROM in CompiledGeneratorType.o
      _GENERATOR_YIELD_FROM_IN_HANDLER in CompiledGeneratorType.o
  "_PyErr_WriteUnraisable", referenced from:
      _Nuitka_PyGen_gen_close_iter in CompiledGeneratorType.o
      _Nuitka_Generator_close in CompiledGeneratorType.o
      _Nuitka_Generator_tp_dealloc in CompiledGeneratorType.o
      _Nuitka_Generator_tp_del in CompiledGeneratorType.o
      _EXCEPTION_MATCH_BOOL_SINGLE in CompiledGeneratorType.o
      __YIELD_FROM in CompiledGeneratorType.o
      __YIELD_FROM_IN_HANDLER in CompiledGeneratorType.o
      ...
  "_PyEval_EvalCode", referenced from:
      _EVAL_CODE in CompiledCodeHelpers.o
  "_PyEval_EvalCodeEx", referenced from:
      _CALL_FUNCTION_NO_ARGS in CompiledCodeHelpers.o
      _callPythonFunction in CompiledCodeHelpers.o
  "_PyEval_EvalFrameEx", referenced from:
      _PyGen_Send in CompiledGeneratorType.o
      _Nuitka_PyGen_gen_send_ex in CompiledGeneratorType.o
      _CALL_FUNCTION_NO_ARGS in CompiledCodeHelpers.o
      _callPythonFunction in CompiledCodeHelpers.o
  "_PyEval_GetFrame", referenced from:
      _Nuitka_Coroutine_New in CompiledCoroutineType.o
  "_PyEval_GetFuncName", referenced from:
      _Nuitka_Method_tp_call in CompiledMethodType.o
  "_PyExc_AttributeError", referenced from:
      _Nuitka_Function_set_closure in CompiledFunctionType.o
      _Nuitka_UncompiledGenerator_throw in CompiledGeneratorType.o
      _Nuitka_PyGen_gen_close_iter in CompiledGeneratorType.o
      __YIELD_FROM in CompiledGeneratorType.o
      __YIELD_FROM_IN_HANDLER in CompiledGeneratorType.o
      _Nuitka_gen_close_iter in CompiledCoroutineType.o
      _yieldFromCoroutine in CompiledCoroutineType.o
      ...
  "_PyExc_GeneratorExit", referenced from:
      _Nuitka_UncompiledGenerator_throw in CompiledGeneratorType.o
      _Nuitka_PyGen_gen_close_iter in CompiledGeneratorType.o
      _Nuitka_Generator_close in CompiledGeneratorType.o
      __YIELD_FROM in CompiledGeneratorType.o
      __YIELD_FROM_IN_HANDLER in CompiledGeneratorType.o
      _Nuitka_Coroutine_close in CompiledCoroutineType.o
      _yieldFromCoroutine in CompiledCoroutineType.o
      ...
  "_PyExc_ImportError", referenced from:
      _IMPORT_NAME in CompiledCodeHelpers.o
  "_PyExc_IndexError", referenced from:
      _IMPORT_MODULE_STAR in CompiledCodeHelpers.o
  "_PyExc_MemoryError", referenced from:
      _Nuitka_Generator_send2 in CompiledGeneratorType.o
      __Nuitka_Coroutine_send in CompiledCoroutineType.o
      __Nuitka_Asyncgen_send in CompiledAsyncgenType.o
  "_PyExc_RuntimeError", referenced from:
      _Nuitka_Function_set_code in CompiledFunctionType.o
      _Nuitka_Method_New in CompiledMethodType.o
      _Nuitka_Method_deepcopy in CompiledMethodType.o
      _Nuitka_PyGen_gen_close_iter in CompiledGeneratorType.o
      _Nuitka_PyGen_gen_send_ex in CompiledGeneratorType.o
      _Nuitka_Generator_send2 in CompiledGeneratorType.o
      _Nuitka_Generator_close in CompiledGeneratorType.o
      ...
  "_PyExc_StopAsyncIteration", referenced from:
      _Nuitka_PyGen_gen_send_ex in CompiledGeneratorType.o
      __Nuitka_Asyncgen_send in CompiledAsyncgenType.o
      _Nuitka_Asyncgen_unwrap_value in CompiledAsyncgenType.o
      __Nuitka_Asyncgen_throw2 in CompiledAsyncgenType.o
      _Nuitka_AsyncgenAthrow_send in CompiledAsyncgenType.o
  "_PyExc_StopIteration", referenced from:
      _PyGen_Send in CompiledGeneratorType.o
      _Nuitka_PyGen_gen_close_iter in CompiledGeneratorType.o
      _Nuitka_PyGen_gen_send_ex in CompiledGeneratorType.o
      _Nuitka_Generator_qiter in CompiledGeneratorType.o
      _Nuitka_Generator_send2 in CompiledGeneratorType.o
      _Nuitka_Generator_close in CompiledGeneratorType.o
      _ERROR_GET_STOP_ITERATION_VALUE in CompiledGeneratorType.o
      ...
  "_PyExc_SystemError", referenced from:
      _CALL_FUNCTION_WITH_ARGS1 in __helpers.o
      _CALL_FUNCTION in __helpers.o
      _CALL_FUNCTION_WITH_ARGS2 in __helpers.o
      _CALL_FUNCTION_WITH_ARGS3 in __helpers.o
      _CALL_FUNCTION_WITH_ARGS4 in __helpers.o
      _CALL_FUNCTION_WITH_ARGS5 in __helpers.o
      _CALL_FUNCTION in CompiledCodeHelpers.o
      ...
  "_PyExc_TypeError", referenced from:
      _CALL_FUNCTION_WITH_ARGS1 in __helpers.o
      _CALL_FUNCTION in __helpers.o
      _CALL_FUNCTION_WITH_ARGS2 in __helpers.o
      _CALL_FUNCTION_WITH_ARGS3 in __helpers.o
      _CALL_FUNCTION_WITH_ARGS4 in __helpers.o
      _CALL_FUNCTION_WITH_ARGS5 in __helpers.o
      _parseArgumentsPos in CompiledFunctionType.o
      ...
  "_PyExc_ValueError", referenced from:
      _Nuitka_Cell_get_contents in CompiledCellType.o
      _PyGen_Send in CompiledGeneratorType.o
      _Nuitka_PyGen_gen_send_ex in CompiledGeneratorType.o
      _Nuitka_Generator_send2 in CompiledGeneratorType.o
      __Nuitka_Coroutine_send in CompiledCoroutineType.o
      __Nuitka_Asyncgen_send in CompiledAsyncgenType.o
      _MAKE_XRANGE in CompiledCodeHelpers.o
      ...
  "_PyException_GetContext", referenced from:
      _CHAIN_EXCEPTION in CompiledGeneratorType.o
      _CHAIN_EXCEPTION in CompiledCoroutineType.o
      _CHAIN_EXCEPTION in CompiledAsyncgenType.o
      _PRINT_EXCEPTION in CompiledCodeHelpers.o
  "_PyException_GetTraceback", referenced from:
      _Nuitka_UncompiledGenerator_throw in CompiledGeneratorType.o
  "_PyException_SetCause", referenced from:
      _Nuitka_Generator_send2 in CompiledGeneratorType.o
      __Nuitka_Coroutine_send in CompiledCoroutineType.o
      __Nuitka_Asyncgen_send in CompiledAsyncgenType.o
  "_PyException_SetContext", referenced from:
      _Nuitka_Generator_send2 in CompiledGeneratorType.o
      _CHAIN_EXCEPTION in CompiledGeneratorType.o
      __Nuitka_Coroutine_send in CompiledCoroutineType.o
      _CHAIN_EXCEPTION in CompiledCoroutineType.o
      __Nuitka_Asyncgen_send in CompiledAsyncgenType.o
      _CHAIN_EXCEPTION in CompiledAsyncgenType.o
  "_PyException_SetTraceback", referenced from:
      _CHAIN_EXCEPTION in CompiledGeneratorType.o
      _CHAIN_EXCEPTION in CompiledCoroutineType.o
      _CHAIN_EXCEPTION in CompiledAsyncgenType.o
  "_PyFloat_FromDouble", referenced from:
      _UNSTREAM_FLOAT in CompiledCodeHelpers.o
  "_PyFloat_Type", referenced from:
      _DEEP_COPY in CompiledCodeHelpers.o
  "_PyFrame_GetLineNumber", referenced from:
      _Nuitka_Coroutine_New in CompiledCoroutineType.o
  "_PyFrame_New", referenced from:
      _CALL_FUNCTION_NO_ARGS in CompiledCodeHelpers.o
      _callPythonFunction in CompiledCodeHelpers.o
  "_PyFrame_Type", referenced from:
      _Nuitka_IsInstance in CompiledCodeHelpers.o
  "_PyFrozenSet_New", referenced from:
      _DEEP_COPY in CompiledCodeHelpers.o
  "_PyFrozenSet_Type", referenced from:
      _DEEP_COPY in CompiledCodeHelpers.o
  "_PyFunction_Type", referenced from:
      _CALL_FUNCTION_WITH_ARGS1 in __helpers.o
      _CALL_FUNCTION_WITH_ARGS2 in __helpers.o
      _CALL_FUNCTION_WITH_ARGS3 in __helpers.o
      _CALL_FUNCTION_WITH_ARGS4 in __helpers.o
      _CALL_FUNCTION_WITH_ARGS5 in __helpers.o
      _Nuitka_Method_tp_call in CompiledMethodType.o
      _CALL_FUNCTION_NO_ARGS in CompiledCodeHelpers.o
      ...
  "_PyGen_Type", referenced from:
      _Nuitka_UncompiledGenerator_throw in CompiledGeneratorType.o
      _Nuitka_PyGen_gen_close_iter in CompiledGeneratorType.o
      __YIELD_FROM in CompiledGeneratorType.o
      __YIELD_FROM_IN_HANDLER in CompiledGeneratorType.o
      _PyCoro_GetAwaitableIter in CompiledCoroutineType.o
      _yieldFromCoroutine in CompiledCoroutineType.o
      __Nuitka_Coroutine_throw2 in CompiledCoroutineType.o
      ...
  "_PyImport_ExecCodeModuleEx", referenced from:
      _patchInspectModule in InspectPatcher.o
      _IMPORT_EMBEDDED_MODULE in MetaPathBasedLoader.o
  "_PyImport_FrozenModules", referenced from:
      _IMPORT_EMBEDDED_MODULE in MetaPathBasedLoader.o
      __path_unfreezer_find_module in MetaPathBasedLoader.o
  "_PyImport_GetModuleDict", referenced from:
      _IMPORT_NAME_OR_MODULE in CompiledCodeHelpers.o
      _IMPORT_EMBEDDED_MODULE in MetaPathBasedLoader.o
  "_PyImport_ImportFrozenModule", referenced from:
      _IMPORT_EMBEDDED_MODULE in MetaPathBasedLoader.o
  "_PyImport_ImportModule", referenced from:
      _Nuitka_Method_deepcopy in CompiledMethodType.o
      __initBuiltinModule in CompiledCodeHelpers.o
      __path_unfreezer_find_spec in MetaPathBasedLoader.o
  "_PyIter_Next", referenced from:
      _Nuitka_CallFunctionPosArgsKwArgs in CompiledFunctionType.o
  "_PyList_Insert", referenced from:
      _registerMetaPathBasedUnfreezer in MetaPathBasedLoader.o
  "_PyList_New", referenced from:
      _DEEP_COPY in CompiledCodeHelpers.o
      _IMPORT_EMBEDDED_MODULE in MetaPathBasedLoader.o
  "_PyList_SetItem", referenced from:
      _IMPORT_EMBEDDED_MODULE in MetaPathBasedLoader.o
  "_PyList_Type", referenced from:
      _Nuitka_CallFunctionPosArgsKwArgs in CompiledFunctionType.o
      _BUILTIN_SUM1 in CompiledCodeHelpers.o
  "_PyLong_AsLong", referenced from:
      _BUILTIN_CHR in CompiledCodeHelpers.o
  "_PyLong_AsLongAndOverflow", referenced from:
      _BUILTIN_SUM1 in CompiledCodeHelpers.o
  "_PyLong_FromLong", referenced from:
      _Nuitka_Frame_getlineno in CompiledFrameType.o
      _BUILTIN_ORD in CompiledCodeHelpers.o
      _BUILTIN_SUM1 in CompiledCodeHelpers.o
  "_PyLong_FromSsize_t", referenced from:
      _Nuitka_Frame_sizeof in CompiledFrameType.o
      _BUILTIN_HASH in CompiledCodeHelpers.o
      _BUILTIN_LEN in CompiledCodeHelpers.o
  "_PyLong_FromUnsignedLong", referenced from:
      _createGlobalConstants in __constants.o
  "_PyLong_Type", referenced from:
      _Nuitka_CallFunctionPosArgsKwArgs in CompiledFunctionType.o
      _BUILTIN_SUM1 in CompiledCodeHelpers.o
  "_PyMapping_Check", referenced from:
      _EVAL_CODE in CompiledCodeHelpers.o
  "_PyMarshal_ReadObjectFromString", referenced from:
      _IMPORT_EMBEDDED_MODULE in MetaPathBasedLoader.o
  "_PyMem_Malloc", referenced from:
      _Nuitka_CallFunctionPosArgsKwArgs in CompiledFunctionType.o
      _convertCommandLineParameters in CompiledCodeHelpers.o
      _DEEP_COPY in CompiledCodeHelpers.o
  "_PyMethod_Type", referenced from:
      _Nuitka_Method_tp_call in CompiledMethodType.o
      _Nuitka_IsInstance in CompiledCodeHelpers.o
      _Nuitka_type_tp_richcompare in InspectPatcher.o
  "_PyModule_Create2", referenced from:
      _PyInit___main__ in module.__main__.o
  "_PyModule_GetDict", referenced from:
      _Nuitka_Function_get_globals in CompiledFunctionType.o
      _IMPORT_MODULE_STAR in CompiledCodeHelpers.o
  "_PyModule_GetFilenameObject", referenced from:
      _IMPORT_NAME in CompiledCodeHelpers.o
      __path_unfreezer_repr_module in MetaPathBasedLoader.o
  "_PyModule_GetName", referenced from:
      _IMPORT_NAME_OR_MODULE in CompiledCodeHelpers.o
      __path_unfreezer_repr_module in MetaPathBasedLoader.o
  "_PyModule_New", referenced from:
      _IMPORT_EMBEDDED_MODULE in MetaPathBasedLoader.o
  "_PyModule_Type", referenced from:
      __initBuiltinModule in CompiledCodeHelpers.o
  "_PyNumber_Add", referenced from:
      _MAKE_XRANGE in CompiledCodeHelpers.o
      _BUILTIN_SUM1 in CompiledCodeHelpers.o
      _MAKE_RELATIVE_PATH in CompiledCodeHelpers.o
  "_PyNumber_AsSsize_t", referenced from:
      _IMPORT_MODULE_STAR in CompiledCodeHelpers.o
      _LOOKUP_SUBSCRIPT in MetaPathBasedLoader.o
  "_PyNumber_FloorDivide", referenced from:
      _MAKE_XRANGE in CompiledCodeHelpers.o
  "_PyNumber_InPlaceAdd", referenced from:
      _MAKE_RELATIVE_PATH in CompiledCodeHelpers.o
  "_PyNumber_Index", referenced from:
      _BUILTIN_XRANGE1 in CompiledCodeHelpers.o
      _MAKE_XRANGE in CompiledCodeHelpers.o
  "_PyNumber_Negative", referenced from:
      _MAKE_XRANGE in CompiledCodeHelpers.o
  "_PyNumber_Subtract", referenced from:
      _MAKE_XRANGE in CompiledCodeHelpers.o
  "_PyNumber_ToBase", referenced from:
      _BUILTIN_BIN in CompiledCodeHelpers.o
      _BUILTIN_OCT in CompiledCodeHelpers.o
      _BUILTIN_HEX in CompiledCodeHelpers.o
  "_PyObject_Call", referenced from:
      __YIELD_FROM in CompiledGeneratorType.o
      __YIELD_FROM_IN_HANDLER in CompiledGeneratorType.o
      _yieldFromCoroutine in CompiledCoroutineType.o
      _yieldFromAsyncgen in CompiledAsyncgenType.o
  "_PyObject_CallFunctionObjArgs", referenced from:
      _Nuitka_Method_deepcopy in CompiledMethodType.o
      _PyGen_Send in CompiledGeneratorType.o
      _Nuitka_UncompiledGenerator_throw in CompiledGeneratorType.o
      __YIELD_FROM in CompiledGeneratorType.o
      __YIELD_FROM_IN_HANDLER in CompiledGeneratorType.o
      __Nuitka_Coroutine_send in CompiledCoroutineType.o
      _yieldFromCoroutine in CompiledCoroutineType.o
      ...
  "_PyObject_CallMethodObjArgs", referenced from:
      __YIELD_FROM in CompiledGeneratorType.o
      __YIELD_FROM_IN_HANDLER in CompiledGeneratorType.o
      _yieldFromCoroutine in CompiledCoroutineType.o
      _yieldFromAsyncgen in CompiledAsyncgenType.o
  "_PyObject_CallObject", referenced from:
      _Nuitka_Generator_send2 in CompiledGeneratorType.o
      __Nuitka_Coroutine_send in CompiledCoroutineType.o
      __Nuitka_Asyncgen_send in CompiledAsyncgenType.o
  "_PyObject_ClearWeakRefs", referenced from:
      _Nuitka_Function_tp_dealloc in CompiledFunctionType.o
      _Nuitka_Method_tp_dealloc in CompiledMethodType.o
      _Nuitka_Generator_tp_dealloc in CompiledGeneratorType.o
      _Nuitka_Coroutine_tp_dealloc in CompiledCoroutineType.o
      _Nuitka_Asyncgen_tp_dealloc in CompiledAsyncgenType.o
  "_PyObject_GC_Del", referenced from:
      _Nuitka_Cell_tp_dealloc in CompiledCellType.o
      _Nuitka_Function_tp_dealloc in CompiledFunctionType.o
      _Nuitka_Method_tp_dealloc in CompiledMethodType.o
      _Nuitka_Generator_tp_dealloc in CompiledGeneratorType.o
      _Nuitka_Coroutine_tp_dealloc in CompiledCoroutineType.o
      _Nuitka_CoroutineWrapper_tp_dealloc in CompiledCoroutineType.o
      _Nuitka_AIterWrapper_dealloc in CompiledCoroutineType.o
      ...
  "_PyObject_GC_Track", referenced from:
      _Nuitka_Cell_New in CompiledCellType.o
      _Nuitka_Cells_New in CompiledCellType.o
      _Nuitka_Function_New in CompiledFunctionType.o
      _Nuitka_CallFunctionPosArgsKwArgs in CompiledFunctionType.o
      _Nuitka_Method_New in CompiledMethodType.o
      _Nuitka_Method_deepcopy in CompiledMethodType.o
      _Nuitka_Generator_New in CompiledGeneratorType.o
      ...
  "_PyObject_GC_UnTrack", referenced from:
      _Nuitka_Cell_tp_dealloc in CompiledCellType.o
      _Nuitka_Function_tp_dealloc in CompiledFunctionType.o
      _Nuitka_Method_tp_dealloc in CompiledMethodType.o
      _Nuitka_Generator_tp_dealloc in CompiledGeneratorType.o
      _Nuitka_Coroutine_tp_dealloc in CompiledCoroutineType.o
      _Nuitka_CoroutineWrapper_tp_dealloc in CompiledCoroutineType.o
      _Nuitka_AIterWrapper_dealloc in CompiledCoroutineType.o
      ...
  "_PyObject_GenericGetAttr", referenced from:
      _Nuitka_Cell_Type in CompiledCellType.o
      _Nuitka_Function_Type in CompiledFunctionType.o
      _Nuitka_Generator_Type in CompiledGeneratorType.o
      _Nuitka_Coroutine_Type in CompiledCoroutineType.o
      _Nuitka_CoroutineWrapper_Type in CompiledCoroutineType.o
      _Nuitka_AIterWrapper_Type in CompiledCoroutineType.o
      _Nuitka_Asyncgen_Type in CompiledAsyncgenType.o
      ...
  "_PyObject_GenericSetAttr", referenced from:
      _Nuitka_Method_Type in CompiledMethodType.o
      _Nuitka_Frame_Type in CompiledFrameType.o
      _Nuitka_BuiltinModule_SetAttr in CompiledCodeHelpers.o
  "_PyObject_GetAttr", referenced from:
      _Nuitka_Method_tp_call in CompiledMethodType.o
      _Nuitka_Method_tp_getattro in CompiledMethodType.o
      _Nuitka_UncompiledGenerator_throw in CompiledGeneratorType.o
      _Nuitka_PyGen_gen_close_iter in CompiledGeneratorType.o
      __YIELD_FROM in CompiledGeneratorType.o
      __YIELD_FROM_IN_HANDLER in CompiledGeneratorType.o
      _Nuitka_gen_close_iter in CompiledCoroutineType.o
      ...
  "_PyObject_GetAttrString", referenced from:
      _Nuitka_Method_deepcopy in CompiledMethodType.o
      _patchInspectModule in InspectPatcher.o
      _patchBuiltinModule in InspectPatcher.o
      __inspect_getgeneratorstate_replacement in InspectPatcher.o
      __inspect_getcoroutinestate_replacement in InspectPatcher.o
      __path_unfreezer_find_spec in MetaPathBasedLoader.o
  "_PyObject_GetIter", referenced from:
      _Nuitka_CallFunctionPosArgsKwArgs in CompiledFunctionType.o
  "_PyObject_Hash", referenced from:
      _BUILTIN_HASH in CompiledCodeHelpers.o
  "_PyObject_IsInstance", referenced from:
      _Nuitka_Method_tp_call in CompiledMethodType.o
  "_PyObject_IsSubclass", referenced from:
      _Nuitka_Method_tp_descr_get in CompiledMethodType.o
      _Nuitka_Generator_close in CompiledGeneratorType.o
      _EXCEPTION_MATCH_BOOL_SINGLE in CompiledGeneratorType.o
      _Nuitka_Coroutine_close in CompiledCoroutineType.o
      _EXCEPTION_MATCH_BOOL_SINGLE in CompiledCoroutineType.o
      _Nuitka_Asyncgen_close in CompiledAsyncgenType.o
      _EXCEPTION_MATCH_BOOL_SINGLE in CompiledAsyncgenType.o
      ...
  "_PyObject_Repr", referenced from:
      _formatErrorTooFewKwOnlyArguments in CompiledFunctionType.o
      _formatErrorTooFewArguments in CompiledFunctionType.o
      _Nuitka_Method_tp_repr in CompiledMethodType.o
      _PRINT_REPR in CompiledCodeHelpers.o
  "_PyObject_RichCompare", referenced from:
      _Nuitka_Cell_tp_richcompare in CompiledCellType.o
  "_PyObject_RichCompareBool", referenced from:
      _Nuitka_Method_tp_richcompare in CompiledMethodType.o
      _MAKE_XRANGE in CompiledCodeHelpers.o
      _Nuitka_BuiltinModule_SetAttr in CompiledCodeHelpers.o
  "_PyObject_SelfIter", referenced from:
      _Nuitka_Generator_Type in CompiledGeneratorType.o
      _Nuitka_CoroutineWrapper_Type in CompiledCoroutineType.o
      _Nuitka_AIterWrapper_as_async in CompiledCoroutineType.o
      _Nuitka_AIterWrapper_Type in CompiledCoroutineType.o
      _Nuitka_Asyncgen_as_async in CompiledAsyncgenType.o
      _Nuitka_AsyncgenAsend_Type in CompiledAsyncgenType.o
      _Nuitka_AsyncgenAthrow_Type in CompiledAsyncgenType.o
      ...
  "_PyObject_SetAttr", referenced from:
      _BUILTIN_TYPE3 in CompiledCodeHelpers.o
      _BUILTIN_SETATTR in CompiledCodeHelpers.o
      _IMPORT_EMBEDDED_MODULE in MetaPathBasedLoader.o
  "_PyObject_SetAttrString", referenced from:
      _patchInspectModule in InspectPatcher.o
      _patchBuiltinModule in InspectPatcher.o
  "_PyObject_SetItem", referenced from:
      _PyInit___main__ in module.__main__.o
  "_PyObject_Size", referenced from:
      _BUILTIN_LEN in CompiledCodeHelpers.o
  "_PyRange_Type", referenced from:
      _BUILTIN_XRANGE1 in CompiledCodeHelpers.o
      _MAKE_XRANGE in CompiledCodeHelpers.o
      _DEEP_COPY in CompiledCodeHelpers.o
  "_PySeqIter_Type", referenced from:
      _MAKE_ITERATOR in CompiledGeneratorType.o
      _MAKE_ITERATOR in CompiledCodeHelpers.o
  "_PySequence_Check", referenced from:
      _MAKE_ITERATOR in CompiledGeneratorType.o
      _MAKE_ITERATOR in CompiledCodeHelpers.o
  "_PySequence_GetItem", referenced from:
      _LOOKUP_SUBSCRIPT in MetaPathBasedLoader.o
  "_PySet_New", referenced from:
      _DEEP_COPY in CompiledCodeHelpers.o
  "_PySet_Type", referenced from:
      _DEEP_COPY in CompiledCodeHelpers.o
  "_PySlice_Type", referenced from:
      _DEEP_COPY in CompiledCodeHelpers.o
  "_PyStructSequence_SetItem", referenced from:
      _main in MainProgram.o
  "_PySuper_Type", referenced from:
      _BUILTIN_SUPER in CompiledCodeHelpers.o
  "_PySys_GetObject", referenced from:
      _PyInit___main__ in module.__main__.o
      _main in MainProgram.o
      _PRINT_NEW_LINE_TO in CompiledCodeHelpers.o
      _PRINT_ITEM_TO in CompiledCodeHelpers.o
      _PRINT_REFCOUNT in CompiledCodeHelpers.o
      _PRINT_STRING in CompiledCodeHelpers.o
      _PRINT_ITEM in CompiledCodeHelpers.o
      ...
  "_PySys_SetArgv", referenced from:
      _setCommandLineParameters in CompiledCodeHelpers.o
  "_PySys_SetObject", referenced from:
      _createGlobalConstants in __constants.o
  "_PySys_WriteStderr", referenced from:
      _IMPORT_EMBEDDED_MODULE in MetaPathBasedLoader.o
      _loadTriggeredModule in MetaPathBasedLoader.o
      _registerMetaPathBasedUnfreezer in MetaPathBasedLoader.o
      __path_unfreezer_find_module in MetaPathBasedLoader.o
      __path_unfreezer_load_module in MetaPathBasedLoader.o
  "_PyThreadState_Get", referenced from:
      _PyInit___main__ in module.__main__.o
      _CALL_FUNCTION_WITH_ARGS1 in __helpers.o
      _CALL_FUNCTION in __helpers.o
      _CALL_FUNCTION_WITH_ARGS2 in __helpers.o
      _CALL_FUNCTION_WITH_ARGS3 in __helpers.o
      _CALL_FUNCTION_WITH_ARGS4 in __helpers.o
      _CALL_FUNCTION_WITH_ARGS5 in __helpers.o
      ...
  "_PyTraceBack_Type", referenced from:
      _Nuitka_UncompiledGenerator_throw in CompiledGeneratorType.o
      _Nuitka_Generator_throw in CompiledGeneratorType.o
      __Nuitka_Coroutine_throw2 in CompiledCoroutineType.o
      __Nuitka_Asyncgen_throw2 in CompiledAsyncgenType.o
      _MAKE_TRACEBACK in InspectPatcher.o
      _patchTracebackDealloc in InspectPatcher.o
  "_PyTuple_New", referenced from:
      _PyInit___main__ in module.__main__.o
      _createGlobalConstants in __constants.o
      _CALL_FUNCTION_WITH_ARGS1 in __helpers.o
      _CALL_FUNCTION_WITH_ARGS2 in __helpers.o
      _CALL_FUNCTION_WITH_ARGS3 in __helpers.o
      _CALL_FUNCTION_WITH_ARGS4 in __helpers.o
      _CALL_FUNCTION_WITH_ARGS5 in __helpers.o
      ...
  "_PyTuple_SetItem", referenced from:
      _IMPORT_NAME_OR_MODULE in CompiledCodeHelpers.o
  "_PyTuple_Size", referenced from:
      _Nuitka_Function_set_defaults in CompiledFunctionType.o
      _Nuitka_Method_tp_call in CompiledMethodType.o
      _DEEP_COPY in CompiledCodeHelpers.o
  "_PyTuple_Type", referenced from:
      _Nuitka_CallFunctionPosArgsKwArgs in CompiledFunctionType.o
      _BUILTIN_SUM1 in CompiledCodeHelpers.o
  "_PyType_IsSubtype", referenced from:
      _BUILTIN_TYPE3 in CompiledCodeHelpers.o
      _BUILTIN_SUPER in CompiledCodeHelpers.o
      _BUILTIN_DIVMOD in CompiledCodeHelpers.o
      _BUILTIN_ORD in CompiledCodeHelpers.o
      _SELECT_METACLASS in CompiledCodeHelpers.o
      _MY_RICHCOMPARE in CompiledCodeHelpers.o
      _MY_RICHCOMPARE_NORECURSE in CompiledCodeHelpers.o
      ...
  "_PyType_Ready", referenced from:
      __initCompiledCellType in CompiledCellType.o
      __initCompiledFunctionType in CompiledFunctionType.o
      __initCompiledMethodType in CompiledMethodType.o
      __initCompiledGeneratorType in CompiledGeneratorType.o
      __initCompiledCoroutineTypes in CompiledCoroutineType.o
      __initCompiledAsyncgenTypes in CompiledAsyncgenType.o
      __initCompiledFrameType in CompiledFrameType.o
      ...
  "_PyType_Type", referenced from:
      _BUILTIN_TYPE3 in CompiledCodeHelpers.o
      __initSlotIternext in CompiledCodeHelpers.o
      _patchTypeComparison in InspectPatcher.o
      _registerMetaPathBasedUnfreezer in MetaPathBasedLoader.o
  "_PyUnicode_AsUTF8", referenced from:
      _main in MainProgram.o
      _Nuitka_Function_tp_repr in CompiledFunctionType.o
      _parseArgumentsPos in CompiledFunctionType.o
      _formatErrorTooFewKwOnlyArguments in CompiledFunctionType.o
      _handleMethodArgumentsPlainOnly in CompiledFunctionType.o
      _Nuitka_CallFunctionPosArgsKwArgs in CompiledFunctionType.o
      _formatErrorTooFewArguments in CompiledFunctionType.o
      ...
  "_PyUnicode_Concat", referenced from:
      _formatErrorTooFewKwOnlyArguments in CompiledFunctionType.o
      _formatErrorTooFewArguments in CompiledFunctionType.o
  "_PyUnicode_Find", referenced from:
      _PyInit___main__ in module.__main__.o
  "_PyUnicode_FromFormat", referenced from:
      _Nuitka_Cell_tp_repr in CompiledCellType.o
      _Nuitka_Function_tp_repr in CompiledFunctionType.o
      _Nuitka_Method_tp_repr in CompiledMethodType.o
      _Nuitka_Generator_tp_repr in CompiledGeneratorType.o
      _Nuitka_Coroutine_tp_repr in CompiledCoroutineType.o
      _Nuitka_Asyncgen_tp_repr in CompiledAsyncgenType.o
      _Nuitka_Frame_tp_repr in CompiledFrameType.o
      ...
  "_PyUnicode_FromOrdinal", referenced from:
      _BUILTIN_CHR in CompiledCodeHelpers.o
  "_PyUnicode_FromString", referenced from:
      _main in MainProgram.o
      _formatErrorTooFewKwOnlyArguments in CompiledFunctionType.o
      _formatErrorTooFewArguments in CompiledFunctionType.o
      _IMPORT_NAME in CompiledCodeHelpers.o
      _PRINT_REFCOUNT in CompiledCodeHelpers.o
      _PRINT_STRING in CompiledCodeHelpers.o
      _PRINT_ITEM in CompiledCodeHelpers.o
      ...
  "_PyUnicode_FromStringAndSize", referenced from:
      _STRING_FROM_CHAR in CompiledCodeHelpers.o
      _UNSTREAM_STRING in CompiledCodeHelpers.o
      _UNSTREAM_CHAR in CompiledCodeHelpers.o
  "_PyUnicode_GetLength", referenced from:
      _PyInit___main__ in module.__main__.o
  "_PyUnicode_InternInPlace", referenced from:
      _UNSTREAM_STRING in CompiledCodeHelpers.o
      _UNSTREAM_CHAR in CompiledCodeHelpers.o
  "_PyUnicode_Substring", referenced from:
      _PyInit___main__ in module.__main__.o
  "_PyUnicode_Type", referenced from:
      _PyInit___main__ in module.__main__.o
      _UPDATE_STRING_DICT1 in module.__main__.o
      _UPDATE_STRING_DICT0 in module.__main__.o
      _COMPILE_CODE in CompiledCodeHelpers.o
      _BUILTIN_OPEN in CompiledCodeHelpers.o
      _BUILTIN_STATICMETHOD in CompiledCodeHelpers.o
      _BUILTIN_CLASSMETHOD in CompiledCodeHelpers.o
      ...
  "_Py_BuildValue", referenced from:
      _Nuitka_Coroutine_New in CompiledCoroutineType.o
  "_Py_BytesWarningFlag", referenced from:
      _main in MainProgram.o
  "_Py_CompileStringExFlags", referenced from:
      _patchInspectModule in InspectPatcher.o
  "_Py_DebugFlag", referenced from:
      _main in MainProgram.o
  "_Py_DontWriteBytecodeFlag", referenced from:
      _main in MainProgram.o
  "_Py_Exit", referenced from:
      _PyInit___main__ in module.__main__.o
      _main in MainProgram.o
      _COMPILE_CODE in CompiledCodeHelpers.o
      _BUILTIN_OPEN in CompiledCodeHelpers.o
      _BUILTIN_STATICMETHOD in CompiledCodeHelpers.o
      _BUILTIN_CLASSMETHOD in CompiledCodeHelpers.o
      _BUILTIN_BYTES1 in CompiledCodeHelpers.o
      ...
  "_Py_FrozenFlag", referenced from:
      _main in MainProgram.o
  "_Py_IgnoreEnvironmentFlag", referenced from:
      _main in MainProgram.o
  "_Py_Initialize", referenced from:
      _main in MainProgram.o
  "_Py_InspectFlag", referenced from:
      _main in MainProgram.o
  "_Py_InteractiveFlag", referenced from:
      _main in MainProgram.o
  "_Py_NoSiteFlag", referenced from:
      _main in MainProgram.o
      _patchInspectModule in InspectPatcher.o
  "_Py_NoUserSiteDirectory", referenced from:
      _main in MainProgram.o
  "_Py_OptimizeFlag", referenced from:
      _main in MainProgram.o
  "_Py_SetProgramName", referenced from:
      _setCommandLineParameters in CompiledCodeHelpers.o
  "_Py_UTF8Mode", referenced from:
      _main in MainProgram.o
  "_Py_VerboseFlag", referenced from:
      _main in MainProgram.o
      _IMPORT_EMBEDDED_MODULE in MetaPathBasedLoader.o
      _loadTriggeredModule in MetaPathBasedLoader.o
      _registerMetaPathBasedUnfreezer in MetaPathBasedLoader.o
      __path_unfreezer_find_module in MetaPathBasedLoader.o
      __path_unfreezer_load_module in MetaPathBasedLoader.o
  "__PyArg_NoKeywords", referenced from:
      _Nuitka_Method_tp_new in CompiledMethodType.o
  "__PyAsyncGenWrappedValue_Type", referenced from:
      _Nuitka_Asyncgen_unwrap_value in CompiledAsyncgenType.o
      _Nuitka_AsyncgenAthrow_send in CompiledAsyncgenType.o
      _Nuitka_AsyncgenAthrow_throw in CompiledAsyncgenType.o
  "__PyDict_NewPresized", referenced from:
      _createGlobalConstants in __constants.o
      _DEEP_COPY in CompiledCodeHelpers.o
  "__PyErr_FormatFromCause", referenced from:
      _Nuitka_PyGen_gen_send_ex in CompiledGeneratorType.o
      _COROUTINE_ASYNC_MAKE_ITERATOR in CompiledCoroutineType.o
      _COROUTINE_ASYNC_ITERATOR_NEXT in CompiledCoroutineType.o
  "__PyFloat_Unpack8", referenced from:
      _UNSTREAM_FLOAT in CompiledCodeHelpers.o
  "__PyGen_FetchStopIterationValue", referenced from:
      _Nuitka_UncompiledGenerator_throw in CompiledGeneratorType.o
      __Nuitka_Coroutine_throw2 in CompiledCoroutineType.o
      __Nuitka_Asyncgen_throw2 in CompiledAsyncgenType.o
  "__PyGen_SetStopIterationValue", referenced from:
      _Nuitka_Asyncgen_unwrap_value in CompiledAsyncgenType.o
  "__PyObject_GC_Malloc", referenced from:
      _Nuitka_Function_New in CompiledFunctionType.o
      _Nuitka_Generator_New in CompiledGeneratorType.o
      _Nuitka_Coroutine_New in CompiledCoroutineType.o
      _Nuitka_Asyncgen_New in CompiledAsyncgenType.o
      _MAKE_FRAME in CompiledFrameType.o
  "__PyObject_GC_New", referenced from:
      _Nuitka_Cell_New in CompiledCellType.o
      _Nuitka_Cells_New in CompiledCellType.o
      _Nuitka_CallFunctionPosArgsKwArgs in CompiledFunctionType.o
      _Nuitka_Method_New in CompiledMethodType.o
      _Nuitka_Method_deepcopy in CompiledMethodType.o
      _MAKE_ITERATOR in CompiledGeneratorType.o
      _Nuitka_AIterWrapper_New in CompiledCoroutineType.o
      ...
  "__PyObject_GC_Resize", referenced from:
      _Nuitka_Function_New in CompiledFunctionType.o
      _Nuitka_Generator_New in CompiledGeneratorType.o
      _Nuitka_Coroutine_New in CompiledCoroutineType.o
      _Nuitka_Asyncgen_New in CompiledAsyncgenType.o
      _MAKE_FRAME in CompiledFrameType.o
  "__PyObject_New", referenced from:
      _BUILTIN_XRANGE1 in CompiledCodeHelpers.o
      _MAKE_XRANGE in CompiledCodeHelpers.o
  "__PyType_Lookup", referenced from:
      _Nuitka_Method_tp_getattro in CompiledMethodType.o
      _LOOKUP_ATTRIBUTE in CompiledCodeHelpers.o
      _CALL_METHOD_NO_ARGS in CompiledCodeHelpers.o
      _LOOKUP_SUBSCRIPT in MetaPathBasedLoader.o
  "__PyUnicode_Ready", referenced from:
      _BUILTIN_ORD in CompiledCodeHelpers.o
  "__PyWarnings_Init", referenced from:
      _main in MainProgram.o
  "__Py_CheckRecursionLimit", referenced from:
      _CALL_FUNCTION_WITH_ARGS1 in __helpers.o
      _CALL_FUNCTION in __helpers.o
      _CALL_FUNCTION_WITH_ARGS2 in __helpers.o
      _CALL_FUNCTION_WITH_ARGS3 in __helpers.o
      _CALL_FUNCTION_WITH_ARGS4 in __helpers.o
      _CALL_FUNCTION_WITH_ARGS5 in __helpers.o
      _CALL_FUNCTION in CompiledCodeHelpers.o
      ...
  "__Py_CheckRecursiveCall", referenced from:
      _CALL_FUNCTION_WITH_ARGS1 in __helpers.o
      _CALL_FUNCTION in __helpers.o
      _CALL_FUNCTION_WITH_ARGS2 in __helpers.o
      _CALL_FUNCTION_WITH_ARGS3 in __helpers.o
      _CALL_FUNCTION_WITH_ARGS4 in __helpers.o
      _CALL_FUNCTION_WITH_ARGS5 in __helpers.o
      _CALL_FUNCTION in CompiledCodeHelpers.o
      ...
  "__Py_DecodeUTF8_surrogateescape", referenced from:
      _convertCommandLineParameters in CompiledCodeHelpers.o
  "__Py_EllipsisObject", referenced from:
      _DEEP_COPY in CompiledCodeHelpers.o
  "__Py_FalseStruct", referenced from:
      _Nuitka_Cell_tp_richcompare in CompiledCellType.o
      _Nuitka_CallFunctionPosArgsKwArgs in CompiledFunctionType.o
      _Nuitka_Method_tp_richcompare in CompiledMethodType.o
      _Nuitka_Frame_getlocals in CompiledFrameType.o
      _Nuitka_Frame_gettracelines in CompiledFrameType.o
      _Nuitka_Frame_gettraceopcodes in CompiledFrameType.o
      _BUILTIN_CALLABLE in CompiledCodeHelpers.o
      ...
  "__Py_NoneStruct", referenced from:
      _PyInit___main__ in module.__main__.o
      _Nuitka_Function_descr_get in CompiledFunctionType.o
      _Nuitka_Function_New in CompiledFunctionType.o
      _Nuitka_CallFunctionPosArgsKwArgs in CompiledFunctionType.o
      _Nuitka_Function_set_doc in CompiledFunctionType.o
      _Nuitka_Function_set_defaults in CompiledFunctionType.o
      _Nuitka_Function_get_closure in CompiledFunctionType.o
      ...
  "__Py_NotImplementedStruct", referenced from:
      _Nuitka_Cell_tp_richcompare in CompiledCellType.o
      _Nuitka_Method_tp_richcompare in CompiledMethodType.o
      _BUILTIN_DIVMOD in CompiledCodeHelpers.o
      _MY_RICHCOMPARE in CompiledCodeHelpers.o
      _MY_RICHCOMPARE_NORECURSE in CompiledCodeHelpers.o
      _DEEP_COPY in CompiledCodeHelpers.o
  "__Py_TrueStruct", referenced from:
      _Nuitka_Cell_tp_richcompare in CompiledCellType.o
      _Nuitka_CallFunctionPosArgsKwArgs in CompiledFunctionType.o
      _Nuitka_Method_tp_richcompare in CompiledMethodType.o
      _Nuitka_Frame_getlocals in CompiledFrameType.o
      _BUILTIN_CALLABLE in CompiledCodeHelpers.o
      _Nuitka_IsInstance in CompiledCodeHelpers.o
      _BUILTIN_ISINSTANCE in CompiledCodeHelpers.o
      ...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
scons: *** [hello.exe] Error 1

Nuitka version 0.5.32.2
Tested with Python 3.7 via pyenv
M acOS High Sierra 10.13.6

I think we have related issues with #94 here, where static Python was detected. I think for pyenv, that detection is probably broken.

Can you locate a python3.7-config near the Python binary used, and its output with the --ldflags argument? Also otool output on the Python binary should show that it doesn't link against any Python library.

The static Python detection is this code:

def isStaticallyLinkedPython():
    try:
        import sysconfig
    except ImportError:
        # Cannot detect this properly for Python 2.6, but we don't care much
        # about that anyway.
        return False

    return sysconfig.get_config_var("Py_ENABLE_SHARED") == 0

It would be interesting to know, if this is "True" for you. I specifically hunted for something that manylinux did, which is also statically linked.

Or maybe it's not statically linked, and then the issue is different entirely.

Yours,
Kay

The output of the isStaticallyLinkedPython() function is True for me.

The outut of python3.7-config --ldflags is the following:

-L/Users/stefan/.pyenv/versions/3.7.0/lib/python3.7/config-3.7m-darwin -lpython3.7m -ldl -framework CoreFoundation -Wl,-stack_size,1000000 -framework CoreFoundation

So that's great. There is hope then, that my fix is going to help both issues at the same time. I will keep you posted.

If I switch to the Homebrew Python, I keep experiencing the same problem.

@kayhayen Thanks for your efforts. Looking forward to it.

I pushed a fix for this to the factory branch. Please try it out, and I might even include it in a hotfix release coming: http://nuitka.net/doc/factory.html

For me, the MiniConda works on Linux with these changes. Basically I only had to more thoroughly check, if while the running Python is static, there still is a shared library nearby. For manylinux there was none, but there seems for MiniConda and Homebrew there is, or at least so I hope. From what I recall, the python-config output on manylinux was plain wrong and could also be for you.

Getting this exception now:

Traceback (most recent call last):
File "/Users/pposca/.virtualenvs/prueba_003/lib/python3.7/site-packages/nuitka/__main__.py", line 218, in
main()
File "/Users/pposca/.virtualenvs/prueba_003/lib/python3.7/site-packages/nuitka/__main__.py", line 212, in main
MainControl.main()
File "/Users/pposca/.virtualenvs/prueba_003/lib/python3.7/site-packages/nuitka/MainControl.py", line 807, in main
main_module = main_module
File "/Users/pposca/.virtualenvs/prueba_003/lib/python3.7/site-packages/nuitka/MainControl.py", line 719, in compileTree
quiet = not Options.isShowScons()
File "/Users/pposca/.virtualenvs/prueba_003/lib/python3.7/site-packages/nuitka/MainControl.py", line 526, in runScons
if not Options.shallMakeModule() and isStaticallyLinkedPython():
File "/Users/pposca/.virtualenvs/prueba_003/lib/python3.7/site-packages/nuitka/PythonVersions.py", line 209, in isStaticallyLinkedPython
stderr = devnull
File "/Users/pposca/.virtualenvs/prueba_003/lib/python3.7/site-packages/nuitka/utils/Execution.py", line 143, in check_output
**kwargs
File "/Users/pposca/.pyenv/versions/3.7.0/lib/python3.7/subprocess.py", line 756, in __init__
restore_signals, start_new_session)
File "/Users/pposca/.pyenv/versions/3.7.0/lib/python3.7/subprocess.py", line 1499, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/Users/pposca/.virtualenvs/prueba_003/bin/python3.7-config': '/Users/pposca/.virtualenvs/prueba_003/bin/python3.7-config'

I tried the version from the factory branch. Now a lot of symbol exceptions disappeared. I only get the following error:

duplicate symbol _Py_GetArgcArgv in:
    hello.build/MainProgram.o
    /Users/stefan/.pyenv/versions/3.7.0/lib/libpython3.7m.a(main.o)
ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
scons: *** [hello.exe] Error 1

@pposca Can you check if there is any *-config binary in /Users/pposca/.virtualenvs/prueba_003/bin/ at all? Probably not, right? Just the original Python this virtualenv came from has it?

@stlehmann I am not sure the ".a" should be used, that is static linking. Can you provide the --show-scons output, so I can see the linker command line now?

Here is the output of the command nuitka3 hello.py --show-scons:

Scons command: /Users/stefan/.pyenv/versions/3.7.0/bin/python3.7 -W ignore /Users/stefan/.pyenv/versions/3.7.0/lib/python3.7/site-packages/nuitka/build/inline_copy/bin/scons.py -f /Users/stefan/.pyenv/versions/3.7.0/lib/python3.7/site-packages/nuitka/build/SingleExe.scons --jobs 4 --warn=no-deprecated --no-site-dir --debug=explain name=hello result_name=hello source_dir=hello.build debug_mode=false python_debug=false unstripped_mode=false module_mode=false full_compat=false experimental= trace_mode=false python_version=3.7 target_arch=x86_64 python_prefix=/Users/stefan/.pyenv/versions/3.7.0 nuitka_src=/Users/stefan/.pyenv/versions/3.7.0/lib/python3.7/site-packages/nuitka/build nuitka_cache=/Users/stefan/Library/Caches/Nuitka module_count=2 show_scons=true abiflags=m
scons: Reading SConscript files ...
Initial CC: gcc
Initial CCVERSION: 9.1.0
Initial CXX: g++
Initial CXXVERSION: 9.1.0
Scons compiler: Using /usr/bin/clang
scons: Told to run compilation on 4 CPUs.
scons: done reading SConscript files.
scons: Building targets ...
scons: building `hello.build/__constants_data.o' because it doesn't exist
clang -o hello.build/__constants_data.o -c -fvisibility=hidden -std=c11 -w -fvisibility=hidden -fvisibility-inlines-hidden -O3 -pipe -D_XOPEN_SOURCE -D_NUITKA_SYSFLAG_BYTES_WARNING=0 -D_NUITKA_SYSFLAG_NO_SITE=0 -D_NUITKA_SYSFLAG_VERBOSE=0 -D_NUITKA_SYSFLAG_UTF8=0 -D__NUITKA_NO_ASSERT__ -D_NUITKA_FROZEN=0 -D_NUITKA_MODULE_COUNT=2 -D_NUITKA_EXE -I/Users/stefan/.pyenv/versions/3.7.0/include/python3.7m -I/Users/stefan/.pyenv/versions/3.7.0/PC -Ihello.build -I/Users/stefan/.pyenv/versions/3.7.0/lib/python3.7/site-packages/nuitka/build/include -I/Users/stefan/.pyenv/versions/3.7.0/lib/python3.7/site-packages/nuitka/build/static_src hello.build/__constants_data.c
scons: building `hello.build/module.__main__.o' because it doesn't exist
clang -o hello.build/module.__main__.o -c -fvisibility=hidden -std=c11 -w -fvisibility=hidden -fvisibility-inlines-hidden -O3 -pipe -D_XOPEN_SOURCE -D_NUITKA_SYSFLAG_BYTES_WARNING=0 -D_NUITKA_SYSFLAG_NO_SITE=0 -D_NUITKA_SYSFLAG_VERBOSE=0 -D_NUITKA_SYSFLAG_UTF8=0 -D__NUITKA_NO_ASSERT__ -D_NUITKA_FROZEN=0 -D_NUITKA_MODULE_COUNT=2 -D_NUITKA_EXE -I/Users/stefan/.pyenv/versions/3.7.0/include/python3.7m -I/Users/stefan/.pyenv/versions/3.7.0/PC -Ihello.build -I/Users/stefan/.pyenv/versions/3.7.0/lib/python3.7/site-packages/nuitka/build/include -I/Users/stefan/.pyenv/versions/3.7.0/lib/python3.7/site-packages/nuitka/build/static_src hello.build/module.__main__.c
scons: building `hello.build/__constants.o' because it doesn't exist
clang -o hello.build/__constants.o -c -fvisibility=hidden -std=c11 -w -fvisibility=hidden -fvisibility-inlines-hidden -O3 -pipe -D_XOPEN_SOURCE -D_NUITKA_SYSFLAG_BYTES_WARNING=0 -D_NUITKA_SYSFLAG_NO_SITE=0 -D_NUITKA_SYSFLAG_VERBOSE=0 -D_NUITKA_SYSFLAG_UTF8=0 -D__NUITKA_NO_ASSERT__ -D_NUITKA_FROZEN=0 -D_NUITKA_MODULE_COUNT=2 -D_NUITKA_EXE -I/Users/stefan/.pyenv/versions/3.7.0/include/python3.7m -I/Users/stefan/.pyenv/versions/3.7.0/PC -Ihello.build -I/Users/stefan/.pyenv/versions/3.7.0/lib/python3.7/site-packages/nuitka/build/include -I/Users/stefan/.pyenv/versions/3.7.0/lib/python3.7/site-packages/nuitka/build/static_src hello.build/__constants.c
scons: building `hello.build/__helpers.o' because it doesn't exist
clang -o hello.build/__helpers.o -c -fvisibility=hidden -std=c11 -w -fvisibility=hidden -fvisibility-inlines-hidden -O3 -pipe -D_XOPEN_SOURCE -D_NUITKA_SYSFLAG_BYTES_WARNING=0 -D_NUITKA_SYSFLAG_NO_SITE=0 -D_NUITKA_SYSFLAG_VERBOSE=0 -D_NUITKA_SYSFLAG_UTF8=0 -D__NUITKA_NO_ASSERT__ -D_NUITKA_FROZEN=0 -D_NUITKA_MODULE_COUNT=2 -D_NUITKA_EXE -I/Users/stefan/.pyenv/versions/3.7.0/include/python3.7m -I/Users/stefan/.pyenv/versions/3.7.0/PC -Ihello.build -I/Users/stefan/.pyenv/versions/3.7.0/lib/python3.7/site-packages/nuitka/build/include -I/Users/stefan/.pyenv/versions/3.7.0/lib/python3.7/site-packages/nuitka/build/static_src hello.build/__helpers.c
scons: building `hello.build/__frozen.o' because it doesn't exist
clang -o hello.build/__frozen.o -c -fvisibility=hidden -std=c11 -w -fvisibility=hidden -fvisibility-inlines-hidden -O3 -pipe -D_XOPEN_SOURCE -D_NUITKA_SYSFLAG_BYTES_WARNING=0 -D_NUITKA_SYSFLAG_NO_SITE=0 -D_NUITKA_SYSFLAG_VERBOSE=0 -D_NUITKA_SYSFLAG_UTF8=0 -D__NUITKA_NO_ASSERT__ -D_NUITKA_FROZEN=0 -D_NUITKA_MODULE_COUNT=2 -D_NUITKA_EXE -I/Users/stefan/.pyenv/versions/3.7.0/include/python3.7m -I/Users/stefan/.pyenv/versions/3.7.0/PC -Ihello.build -I/Users/stefan/.pyenv/versions/3.7.0/lib/python3.7/site-packages/nuitka/build/include -I/Users/stefan/.pyenv/versions/3.7.0/lib/python3.7/site-packages/nuitka/build/static_src hello.build/__frozen.c
scons: building `hello.build/MainProgram.o' because it doesn't exist
clang -o hello.build/MainProgram.o -c -fvisibility=hidden -std=c11 -w -fvisibility=hidden -fvisibility-inlines-hidden -O3 -pipe -D_XOPEN_SOURCE -D_NUITKA_SYSFLAG_BYTES_WARNING=0 -D_NUITKA_SYSFLAG_NO_SITE=0 -D_NUITKA_SYSFLAG_VERBOSE=0 -D_NUITKA_SYSFLAG_UTF8=0 -D__NUITKA_NO_ASSERT__ -D_NUITKA_FROZEN=0 -D_NUITKA_MODULE_COUNT=2 -D_NUITKA_EXE -I/Users/stefan/.pyenv/versions/3.7.0/include/python3.7m -I/Users/stefan/.pyenv/versions/3.7.0/PC -Ihello.build -I/Users/stefan/.pyenv/versions/3.7.0/lib/python3.7/site-packages/nuitka/build/include -I/Users/stefan/.pyenv/versions/3.7.0/lib/python3.7/site-packages/nuitka/build/static_src hello.build/MainProgram.c
scons: building `hello.build/CompiledCellType.o' because it doesn't exist
clang -o hello.build/CompiledCellType.o -c -fvisibility=hidden -std=c11 -w -fvisibility=hidden -fvisibility-inlines-hidden -O3 -pipe -D_XOPEN_SOURCE -D_NUITKA_SYSFLAG_BYTES_WARNING=0 -D_NUITKA_SYSFLAG_NO_SITE=0 -D_NUITKA_SYSFLAG_VERBOSE=0 -D_NUITKA_SYSFLAG_UTF8=0 -D__NUITKA_NO_ASSERT__ -D_NUITKA_FROZEN=0 -D_NUITKA_MODULE_COUNT=2 -D_NUITKA_EXE -I/Users/stefan/.pyenv/versions/3.7.0/include/python3.7m -I/Users/stefan/.pyenv/versions/3.7.0/PC -Ihello.build -I/Users/stefan/.pyenv/versions/3.7.0/lib/python3.7/site-packages/nuitka/build/include -I/Users/stefan/.pyenv/versions/3.7.0/lib/python3.7/site-packages/nuitka/build/static_src hello.build/CompiledCellType.c
scons: building `hello.build/CompiledFunctionType.o' because it doesn't exist
clang -o hello.build/CompiledFunctionType.o -c -fvisibility=hidden -std=c11 -w -fvisibility=hidden -fvisibility-inlines-hidden -O3 -pipe -D_XOPEN_SOURCE -D_NUITKA_SYSFLAG_BYTES_WARNING=0 -D_NUITKA_SYSFLAG_NO_SITE=0 -D_NUITKA_SYSFLAG_VERBOSE=0 -D_NUITKA_SYSFLAG_UTF8=0 -D__NUITKA_NO_ASSERT__ -D_NUITKA_FROZEN=0 -D_NUITKA_MODULE_COUNT=2 -D_NUITKA_EXE -I/Users/stefan/.pyenv/versions/3.7.0/include/python3.7m -I/Users/stefan/.pyenv/versions/3.7.0/PC -Ihello.build -I/Users/stefan/.pyenv/versions/3.7.0/lib/python3.7/site-packages/nuitka/build/include -I/Users/stefan/.pyenv/versions/3.7.0/lib/python3.7/site-packages/nuitka/build/static_src hello.build/CompiledFunctionType.c
scons: building `hello.build/CompiledMethodType.o' because it doesn't exist
clang -o hello.build/CompiledMethodType.o -c -fvisibility=hidden -std=c11 -w -fvisibility=hidden -fvisibility-inlines-hidden -O3 -pipe -D_XOPEN_SOURCE -D_NUITKA_SYSFLAG_BYTES_WARNING=0 -D_NUITKA_SYSFLAG_NO_SITE=0 -D_NUITKA_SYSFLAG_VERBOSE=0 -D_NUITKA_SYSFLAG_UTF8=0 -D__NUITKA_NO_ASSERT__ -D_NUITKA_FROZEN=0 -D_NUITKA_MODULE_COUNT=2 -D_NUITKA_EXE -I/Users/stefan/.pyenv/versions/3.7.0/include/python3.7m -I/Users/stefan/.pyenv/versions/3.7.0/PC -Ihello.build -I/Users/stefan/.pyenv/versions/3.7.0/lib/python3.7/site-packages/nuitka/build/include -I/Users/stefan/.pyenv/versions/3.7.0/lib/python3.7/site-packages/nuitka/build/static_src hello.build/CompiledMethodType.c
scons: building `hello.build/CompiledGeneratorType.o' because it doesn't exist
clang -o hello.build/CompiledGeneratorType.o -c -fvisibility=hidden -std=c11 -w -fvisibility=hidden -fvisibility-inlines-hidden -O3 -pipe -D_XOPEN_SOURCE -D_NUITKA_SYSFLAG_BYTES_WARNING=0 -D_NUITKA_SYSFLAG_NO_SITE=0 -D_NUITKA_SYSFLAG_VERBOSE=0 -D_NUITKA_SYSFLAG_UTF8=0 -D__NUITKA_NO_ASSERT__ -D_NUITKA_FROZEN=0 -D_NUITKA_MODULE_COUNT=2 -D_NUITKA_EXE -I/Users/stefan/.pyenv/versions/3.7.0/include/python3.7m -I/Users/stefan/.pyenv/versions/3.7.0/PC -Ihello.build -I/Users/stefan/.pyenv/versions/3.7.0/lib/python3.7/site-packages/nuitka/build/include -I/Users/stefan/.pyenv/versions/3.7.0/lib/python3.7/site-packages/nuitka/build/static_src hello.build/CompiledGeneratorType.c
scons: building `hello.build/CompiledCoroutineType.o' because it doesn't exist
clang -o hello.build/CompiledCoroutineType.o -c -fvisibility=hidden -std=c11 -w -fvisibility=hidden -fvisibility-inlines-hidden -O3 -pipe -D_XOPEN_SOURCE -D_NUITKA_SYSFLAG_BYTES_WARNING=0 -D_NUITKA_SYSFLAG_NO_SITE=0 -D_NUITKA_SYSFLAG_VERBOSE=0 -D_NUITKA_SYSFLAG_UTF8=0 -D__NUITKA_NO_ASSERT__ -D_NUITKA_FROZEN=0 -D_NUITKA_MODULE_COUNT=2 -D_NUITKA_EXE -I/Users/stefan/.pyenv/versions/3.7.0/include/python3.7m -I/Users/stefan/.pyenv/versions/3.7.0/PC -Ihello.build -I/Users/stefan/.pyenv/versions/3.7.0/lib/python3.7/site-packages/nuitka/build/include -I/Users/stefan/.pyenv/versions/3.7.0/lib/python3.7/site-packages/nuitka/build/static_src hello.build/CompiledCoroutineType.c
scons: building `hello.build/CompiledAsyncgenType.o' because it doesn't exist
clang -o hello.build/CompiledAsyncgenType.o -c -fvisibility=hidden -std=c11 -w -fvisibility=hidden -fvisibility-inlines-hidden -O3 -pipe -D_XOPEN_SOURCE -D_NUITKA_SYSFLAG_BYTES_WARNING=0 -D_NUITKA_SYSFLAG_NO_SITE=0 -D_NUITKA_SYSFLAG_VERBOSE=0 -D_NUITKA_SYSFLAG_UTF8=0 -D__NUITKA_NO_ASSERT__ -D_NUITKA_FROZEN=0 -D_NUITKA_MODULE_COUNT=2 -D_NUITKA_EXE -I/Users/stefan/.pyenv/versions/3.7.0/include/python3.7m -I/Users/stefan/.pyenv/versions/3.7.0/PC -Ihello.build -I/Users/stefan/.pyenv/versions/3.7.0/lib/python3.7/site-packages/nuitka/build/include -I/Users/stefan/.pyenv/versions/3.7.0/lib/python3.7/site-packages/nuitka/build/static_src hello.build/CompiledAsyncgenType.c
scons: building `hello.build/CompiledFrameType.o' because it doesn't exist
clang -o hello.build/CompiledFrameType.o -c -fvisibility=hidden -std=c11 -w -fvisibility=hidden -fvisibility-inlines-hidden -O3 -pipe -D_XOPEN_SOURCE -D_NUITKA_SYSFLAG_BYTES_WARNING=0 -D_NUITKA_SYSFLAG_NO_SITE=0 -D_NUITKA_SYSFLAG_VERBOSE=0 -D_NUITKA_SYSFLAG_UTF8=0 -D__NUITKA_NO_ASSERT__ -D_NUITKA_FROZEN=0 -D_NUITKA_MODULE_COUNT=2 -D_NUITKA_EXE -I/Users/stefan/.pyenv/versions/3.7.0/include/python3.7m -I/Users/stefan/.pyenv/versions/3.7.0/PC -Ihello.build -I/Users/stefan/.pyenv/versions/3.7.0/lib/python3.7/site-packages/nuitka/build/include -I/Users/stefan/.pyenv/versions/3.7.0/lib/python3.7/site-packages/nuitka/build/static_src hello.build/CompiledFrameType.c
scons: building `hello.build/CompiledCodeHelpers.o' because it doesn't exist
clang -o hello.build/CompiledCodeHelpers.o -c -fvisibility=hidden -std=c11 -w -fvisibility=hidden -fvisibility-inlines-hidden -O3 -pipe -D_XOPEN_SOURCE -D_NUITKA_SYSFLAG_BYTES_WARNING=0 -D_NUITKA_SYSFLAG_NO_SITE=0 -D_NUITKA_SYSFLAG_VERBOSE=0 -D_NUITKA_SYSFLAG_UTF8=0 -D__NUITKA_NO_ASSERT__ -D_NUITKA_FROZEN=0 -D_NUITKA_MODULE_COUNT=2 -D_NUITKA_EXE -I/Users/stefan/.pyenv/versions/3.7.0/include/python3.7m -I/Users/stefan/.pyenv/versions/3.7.0/PC -Ihello.build -I/Users/stefan/.pyenv/versions/3.7.0/lib/python3.7/site-packages/nuitka/build/include -I/Users/stefan/.pyenv/versions/3.7.0/lib/python3.7/site-packages/nuitka/build/static_src hello.build/CompiledCodeHelpers.c
scons: building `hello.build/InspectPatcher.o' because it doesn't exist
clang -o hello.build/InspectPatcher.o -c -fvisibility=hidden -std=c11 -w -fvisibility=hidden -fvisibility-inlines-hidden -O3 -pipe -D_XOPEN_SOURCE -D_NUITKA_SYSFLAG_BYTES_WARNING=0 -D_NUITKA_SYSFLAG_NO_SITE=0 -D_NUITKA_SYSFLAG_VERBOSE=0 -D_NUITKA_SYSFLAG_UTF8=0 -D__NUITKA_NO_ASSERT__ -D_NUITKA_FROZEN=0 -D_NUITKA_MODULE_COUNT=2 -D_NUITKA_EXE -I/Users/stefan/.pyenv/versions/3.7.0/include/python3.7m -I/Users/stefan/.pyenv/versions/3.7.0/PC -Ihello.build -I/Users/stefan/.pyenv/versions/3.7.0/lib/python3.7/site-packages/nuitka/build/include -I/Users/stefan/.pyenv/versions/3.7.0/lib/python3.7/site-packages/nuitka/build/static_src hello.build/InspectPatcher.c
scons: building `hello.build/MetaPathBasedLoader.o' because it doesn't exist
clang -o hello.build/MetaPathBasedLoader.o -c -fvisibility=hidden -std=c11 -w -fvisibility=hidden -fvisibility-inlines-hidden -O3 -pipe -D_XOPEN_SOURCE -D_NUITKA_SYSFLAG_BYTES_WARNING=0 -D_NUITKA_SYSFLAG_NO_SITE=0 -D_NUITKA_SYSFLAG_VERBOSE=0 -D_NUITKA_SYSFLAG_UTF8=0 -D__NUITKA_NO_ASSERT__ -D_NUITKA_FROZEN=0 -D_NUITKA_MODULE_COUNT=2 -D_NUITKA_EXE -I/Users/stefan/.pyenv/versions/3.7.0/include/python3.7m -I/Users/stefan/.pyenv/versions/3.7.0/PC -Ihello.build -I/Users/stefan/.pyenv/versions/3.7.0/lib/python3.7/site-packages/nuitka/build/include -I/Users/stefan/.pyenv/versions/3.7.0/lib/python3.7/site-packages/nuitka/build/static_src hello.build/MetaPathBasedLoader.c
scons: building `hello.build/fibers_gen.o' because it doesn't exist
clang -o hello.build/fibers_gen.o -c -fvisibility=hidden -std=c11 -w -fvisibility=hidden -fvisibility-inlines-hidden -O3 -pipe -D_XOPEN_SOURCE -D_NUITKA_SYSFLAG_BYTES_WARNING=0 -D_NUITKA_SYSFLAG_NO_SITE=0 -D_NUITKA_SYSFLAG_VERBOSE=0 -D_NUITKA_SYSFLAG_UTF8=0 -D__NUITKA_NO_ASSERT__ -D_NUITKA_FROZEN=0 -D_NUITKA_MODULE_COUNT=2 -D_NUITKA_EXE -I/Users/stefan/.pyenv/versions/3.7.0/include/python3.7m -I/Users/stefan/.pyenv/versions/3.7.0/PC -Ihello.build -I/Users/stefan/.pyenv/versions/3.7.0/lib/python3.7/site-packages/nuitka/build/include -I/Users/stefan/.pyenv/versions/3.7.0/lib/python3.7/site-packages/nuitka/build/static_src hello.build/fibers_gen.c
scons: building `hello.exe' because it doesn't exist
clang -o hello.exe -lstdc++ -Wno-deprecated-declarations hello.build/__constants_data.o hello.build/module.__main__.o hello.build/__constants.o hello.build/__helpers.o hello.build/__frozen.o hello.build/MainProgram.o hello.build/CompiledCellType.o hello.build/CompiledFunctionType.o hello.build/CompiledMethodType.o hello.build/CompiledGeneratorType.o hello.build/CompiledCoroutineType.o hello.build/CompiledAsyncgenType.o hello.build/CompiledFrameType.o hello.build/CompiledCodeHelpers.o hello.build/InspectPatcher.o hello.build/MetaPathBasedLoader.o hello.build/fibers_gen.o -L/Users/stefan/.pyenv/versions/3.7.0/lib -lpython3.7m
duplicate symbol _Py_GetArgcArgv in:
    hello.build/MainProgram.o
    /Users/stefan/.pyenv/versions/3.7.0/lib/libpython3.7m.a(main.o)
ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
scons: *** [hello.exe] Error 1
scons: building terminated because of errors.

There is a python-config instead of python3.7-config.

If I do change the python3.7-config filename for python-config, I get this error (the same as @stlehmann ):

duplicate symbol _Py_GetArgcArgv in:
prueba.build/MainProgram.o
/Users/pposca/.pyenv/versions/3.7.0/lib/libpython3.7m.a(main.o)
ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
scons: * [prueba.exe] Error 1

@pposca Can you provide a "ls -l" of that directory where python-config lives, so I can get an idea of how to find out, which one to call.

Of course:

ll /Users/pposca/.virtualenvs/prueba_003/bin
total 6568
-rw-r--r-- 1 pposca staff 2,0K 7 ago 16:50 activate
-rw-r--r-- 1 pposca staff 1,0K 7 ago 16:50 activate.csh
-rw-r--r-- 1 pposca staff 2,1K 7 ago 16:50 activate.fish
-rw-r--r-- 1 pposca staff 1,1K 7 ago 16:50 activate_this.py
-rwxr-xr-x 1 pposca staff 269B 7 ago 16:50 easy_install
-rwxr-xr-x 1 pposca staff 269B 7 ago 16:50 easy_install-3.7
-rwxr-xr-x 1 pposca staff 149B 7 ago 16:50 get_env_details
-rwxr-xr-x 1 pposca staff 253B 7 ago 16:50 nuitka3
-rwxr-xr-x 1 pposca staff 253B 7 ago 16:50 nuitka3-run
-rwxr-xr-x 1 pposca staff 251B 7 ago 16:50 pip
-rwxr-xr-x 1 pposca staff 251B 7 ago 16:50 pip3
-rwxr-xr-x 1 pposca staff 251B 7 ago 16:50 pip3.7
-rw-r--r-- 1 pposca staff 71B 7 ago 16:50 postactivate
-rw-r--r-- 1 pposca staff 73B 7 ago 16:50 postdeactivate
-rwxr-xr-x 1 pposca staff 68B 7 ago 16:50 preactivate
-rw-r--r-- 1 pposca staff 74B 7 ago 16:50 predeactivate
lrwxr-xr-x 1 pposca staff 9B 7 ago 16:50 python -> python3.7
-rwxr-xr-x 1 pposca staff 2,3K 7 ago 16:50 python-config
lrwxr-xr-x 1 pposca staff 9B 7 ago 16:50 python3 -> python3.7
-rwxr-xr-x 1 pposca staff 3,1M 7 ago 16:50 python3.7
-rwxr-xr-x 1 pposca staff 248B 7 ago 16:50 wheel

So @pposca I think I am giving up on the check for static Python. As it turned out, I do not need to know static Python or not in scons. Previously I was for module mode, avoiding to specify "libpython" for linkage, as manylinux doesn't have one. However, actually NO python installation needs that for extension modules, so as a criterion it goes away.

What remains true, is that programs cannot be created with a Python that has no such shared library, but manylinux is the only one, and it's not used like that anyway. And it is making detection impossible, currently its python-config is lying about -lpython anyway, so what good is it. So that issue will now be gone if you update from factory.

On the other part @stlehmann and @pposca ought to now be able to link. I googled a bit, and found out, how to force dynamic linking. it feels a bit fragile as I have to provide a filename, but it seems to work with what I got here. I will see how opensuse build service likes it for the RPM platforms, but that is probably only so much tuning needed, likely none.

That then avoids using any "libpython.a" you have which theoretically would be nice to use, but is causing issues. That function to query the arguments e.g. would not use the proper values, and some Python modules, even semi popular ones, really like checking program command line arguments that way.

Let me know if it's good now. I will do a bit of consolidating work and release then. Obviously we are not talking of a hotfix. But I will consider a full release after some consolidation phase even if it fails to meet other release goals.

Well, getting this error now:

scons: * [prueba.exe] Implicit dependency /Users/pposca/.pyenv/versions/3.7.0/lib/libpython3.7m.dylib' not found, needed by targetprueba.exe'.

And the contents of '/Users/pposca/.pyenv/versions/3.7.0/lib/' are:

total 22056
-r-xr-xr-x 1 pposca staff 11M 22 jul 15:39 libpython3.7m.a
drwxr-xr-x 5 pposca staff 160B 22 jul 15:40 pkgconfig
drwxr-xr-x 208 pposca staff 6,5K 22 jul 15:40 python3.7

@pposca What is in that python3.7 folder right there, hopefully the shared library lives there?

Yours,
Kay

I have searched through the whole .pyenv directory with subdirectories. There is no libpython3.7m.dylib there.

ll /Users/pposca/.pyenv/versions/3.7.0/lib/python3.7
total 9168
-rw-r--r-- 1 pposca staff 12K 22 jul 15:39 LICENSE.txt
-rw-r--r-- 1 pposca staff 5,0K 22 jul 15:39 __future__.py
-rw-r--r-- 1 pposca staff 64B 22 jul 15:39 __phello__.foo.py
drwxr-xr-x 518 pposca staff 16K 22 jul 15:40 __pycache__
-rw-r--r-- 1 pposca staff 1,8K 22 jul 15:39 _bootlocale.py
-rw-r--r-- 1 pposca staff 26K 22 jul 15:39 _collections_abc.py
-rw-r--r-- 1 pposca staff 8,5K 22 jul 15:39 _compat_pickle.py
-rw-r--r-- 1 pposca staff 5,2K 22 jul 15:39 _compression.py
-rw-r--r-- 1 pposca staff 5,0K 22 jul 15:39 _dummy_thread.py
-rw-r--r-- 1 pposca staff 14K 22 jul 15:39 _markupbase.py
-rw-r--r-- 1 pposca staff 19K 22 jul 15:39 _osx_support.py
-rw-r--r-- 1 pposca staff 6,0K 22 jul 15:39 _py_abc.py
-rw-r--r-- 1 pposca staff 223K 22 jul 15:39 _pydecimal.py
-rw-r--r-- 1 pposca staff 89K 22 jul 15:39 _pyio.py
-rw-r--r-- 1 pposca staff 3,0K 22 jul 15:39 _sitebuiltins.py
-rw-r--r-- 1 pposca staff 25K 22 jul 15:39 _strptime.py
-rw-r--r-- 1 pposca staff 25K 22 jul 15:39 _sysconfigdata_m_darwin_darwin.py
-rw-r--r-- 1 pposca staff 7,0K 22 jul 15:39 _threading_local.py
-rw-r--r-- 1 pposca staff 5,5K 22 jul 15:39 _weakrefset.py
-rw-r--r-- 1 pposca staff 5,4K 22 jul 15:39 abc.py
-rw-r--r-- 1 pposca staff 32K 22 jul 15:39 aifc.py
-rw-r--r-- 1 pposca staff 476B 22 jul 15:39 antigravity.py
-rw-r--r-- 1 pposca staff 93K 22 jul 15:39 argparse.py
-rw-r--r-- 1 pposca staff 12K 22 jul 15:39 ast.py
-rw-r--r-- 1 pposca staff 11K 22 jul 15:39 asynchat.py
drwxr-xr-x 28 pposca staff 896B 22 jul 15:39 asyncio
-rw-r--r-- 1 pposca staff 20K 22 jul 15:39 asyncore.py
-rwxr-xr-x 1 pposca staff 20K 22 jul 15:39 base64.py
-rw-r--r-- 1 pposca staff 31K 22 jul 15:39 bdb.py
-rw-r--r-- 1 pposca staff 14K 22 jul 15:39 binhex.py
-rw-r--r-- 1 pposca staff 2,5K 22 jul 15:39 bisect.py
-rw-r--r-- 1 pposca staff 12K 22 jul 15:39 bz2.py
-rwxr-xr-x 1 pposca staff 5,6K 22 jul 15:39 cProfile.py
-rw-r--r-- 1 pposca staff 24K 22 jul 15:39 calendar.py
-rwxr-xr-x 1 pposca staff 33K 22 jul 15:39 cgi.py
-rw-r--r-- 1 pposca staff 12K 22 jul 15:39 cgitb.py
-rw-r--r-- 1 pposca staff 5,3K 22 jul 15:39 chunk.py
-rw-r--r-- 1 pposca staff 15K 22 jul 15:39 cmd.py
-rw-r--r-- 1 pposca staff 10K 22 jul 15:39 code.py
-rw-r--r-- 1 pposca staff 35K 22 jul 15:39 codecs.py
-rw-r--r-- 1 pposca staff 5,9K 22 jul 15:39 codeop.py
drwxr-xr-x 5 pposca staff 160B 22 jul 15:39 collections
-rw-r--r-- 1 pposca staff 4,0K 22 jul 15:39 colorsys.py
-rw-r--r-- 1 pposca staff 13K 22 jul 15:39 compileall.py
drwxr-xr-x 5 pposca staff 160B 22 jul 15:39 concurrent
drwxr-xr-x 12 pposca staff 384B 22 jul 15:40 config-3.7m-darwin
-rw-r--r-- 1 pposca staff 53K 22 jul 15:39 configparser.py
-rw-r--r-- 1 pposca staff 23K 22 jul 15:39 contextlib.py
-rw-r--r-- 1 pposca staff 129B 22 jul 15:39 contextvars.py
-rw-r--r-- 1 pposca staff 8,6K 22 jul 15:39 copy.py
-rw-r--r-- 1 pposca staff 6,9K 22 jul 15:39 copyreg.py
-rw-r--r-- 1 pposca staff 3,3K 22 jul 15:39 crypt.py
-rw-r--r-- 1 pposca staff 16K 22 jul 15:39 csv.py
drwxr-xr-x 10 pposca staff 320B 22 jul 15:39 ctypes
drwxr-xr-x 8 pposca staff 256B 22 jul 15:39 curses
-rw-r--r-- 1 pposca staff 44K 22 jul 15:39 dataclasses.py
-rw-r--r-- 1 pposca staff 83K 22 jul 15:39 datetime.py
drwxr-xr-x 7 pposca staff 224B 22 jul 15:39 dbm
-rw-r--r-- 1 pposca staff 320B 22 jul 15:39 decimal.py
-rw-r--r-- 1 pposca staff 82K 22 jul 15:39 difflib.py
-rw-r--r-- 1 pposca staff 19K 22 jul 15:39 dis.py
drwxr-xr-x 34 pposca staff 1,1K 22 jul 15:39 distutils
-rw-r--r-- 1 pposca staff 102K 22 jul 15:39 doctest.py
-rw-r--r-- 1 pposca staff 2,7K 22 jul 15:39 dummy_threading.py
drwxr-xr-x 25 pposca staff 800B 22 jul 15:39 email
drwxr-xr-x 128 pposca staff 4,0K 22 jul 15:39 encodings
drwxr-xr-x 7 pposca staff 224B 22 jul 15:39 ensurepip
-rw-r--r-- 1 pposca staff 34K 22 jul 15:39 enum.py
-rw-r--r-- 1 pposca staff 9,6K 22 jul 15:39 filecmp.py
-rw-r--r-- 1 pposca staff 14K 22 jul 15:39 fileinput.py
-rw-r--r-- 1 pposca staff 4,0K 22 jul 15:39 fnmatch.py
-rw-r--r-- 1 pposca staff 15K 22 jul 15:39 formatter.py
-rw-r--r-- 1 pposca staff 23K 22 jul 15:39 fractions.py
-rw-r--r-- 1 pposca staff 34K 22 jul 15:39 ftplib.py
-rw-r--r-- 1 pposca staff 31K 22 jul 15:39 functools.py
-rw-r--r-- 1 pposca staff 4,6K 22 jul 15:39 genericpath.py
-rw-r--r-- 1 pposca staff 7,3K 22 jul 15:39 getopt.py
-rw-r--r-- 1 pposca staff 5,9K 22 jul 15:39 getpass.py
-rw-r--r-- 1 pposca staff 21K 22 jul 15:39 gettext.py
-rw-r--r-- 1 pposca staff 5,5K 22 jul 15:39 glob.py
-rw-r--r-- 1 pposca staff 20K 22 jul 15:39 gzip.py
-rw-r--r-- 1 pposca staff 9,3K 22 jul 15:39 hashlib.py
-rw-r--r-- 1 pposca staff 22K 22 jul 15:39 heapq.py
-rw-r--r-- 1 pposca staff 6,4K 22 jul 15:39 hmac.py
drwxr-xr-x 6 pposca staff 192B 22 jul 15:39 html
drwxr-xr-x 8 pposca staff 256B 22 jul 15:39 http
drwxr-xr-x 78 pposca staff 2,4K 22 jul 15:39 idlelib
-rw-r--r-- 1 pposca staff 52K 22 jul 15:39 imaplib.py
-rw-r--r-- 1 pposca staff 3,7K 22 jul 15:39 imghdr.py
-rw-r--r-- 1 pposca staff 10K 22 jul 15:39 imp.py
drwxr-xr-x 10 pposca staff 320B 22 jul 15:39 importlib
-rw-r--r-- 1 pposca staff 114K 22 jul 15:39 inspect.py
-rw-r--r-- 1 pposca staff 3,4K 22 jul 15:39 io.py
-rw-r--r-- 1 pposca staff 73K 22 jul 15:39 ipaddress.py
drwxr-xr-x 8 pposca staff 256B 22 jul 15:39 json
-rwxr-xr-x 1 pposca staff 2,2K 22 jul 15:39 keyword.py
drwxr-xr-x 72 pposca staff 2,3K 22 jul 15:40 lib-dynload <--- HERE ?
drwxr-xr-x 21 pposca staff 672B 22 jul 15:40 lib2to3
-rw-r--r-- 1 pposca staff 5,2K 22 jul 15:39 linecache.py
-rw-r--r-- 1 pposca staff 76K 22 jul 15:39 locale.py
drwxr-xr-x 6 pposca staff 192B 22 jul 15:39 logging
-rw-r--r-- 1 pposca staff 13K 22 jul 15:39 lzma.py
-rw-r--r-- 1 pposca staff 6,0K 22 jul 15:39 macpath.py
-rw-r--r-- 1 pposca staff 77K 22 jul 15:39 mailbox.py
-rw-r--r-- 1 pposca staff 7,9K 22 jul 15:39 mailcap.py
-rw-r--r-- 1 pposca staff 20K 22 jul 15:39 mimetypes.py
-rw-r--r-- 1 pposca staff 22K 22 jul 15:39 modulefinder.py
drwxr-xr-x 24 pposca staff 768B 22 jul 15:39 multiprocessing
-rw-r--r-- 1 pposca staff 5,4K 22 jul 15:39 netrc.py
-rw-r--r-- 1 pposca staff 42K 22 jul 15:39 nntplib.py
-rw-r--r-- 1 pposca staff 22K 22 jul 15:39 ntpath.py
-rw-r--r-- 1 pposca staff 2,5K 22 jul 15:39 nturl2path.py
-rw-r--r-- 1 pposca staff 10K 22 jul 15:39 numbers.py
-rw-r--r-- 1 pposca staff 5,7K 22 jul 15:39 opcode.py
-rw-r--r-- 1 pposca staff 11K 22 jul 15:39 operator.py
-rw-r--r-- 1 pposca staff 59K 22 jul 15:39 optparse.py
-rw-r--r-- 1 pposca staff 37K 22 jul 15:39 os.py
-rw-r--r-- 1 pposca staff 48K 22 jul 15:39 pathlib.py
-rwxr-xr-x 1 pposca staff 61K 22 jul 15:39 pdb.py
-rw-r--r-- 1 pposca staff 56K 22 jul 15:39 pickle.py
-rw-r--r-- 1 pposca staff 89K 22 jul 15:39 pickletools.py
-rw-r--r-- 1 pposca staff 8,7K 22 jul 15:39 pipes.py
-rw-r--r-- 1 pposca staff 21K 22 jul 15:39 pkgutil.py
-rwxr-xr-x 1 pposca staff 45K 22 jul 15:39 platform.py
-rw-r--r-- 1 pposca staff 29K 22 jul 15:39 plistlib.py
-rw-r--r-- 1 pposca staff 15K 22 jul 15:39 poplib.py
-rw-r--r-- 1 pposca staff 15K 22 jul 15:39 posixpath.py
-rw-r--r-- 1 pposca staff 20K 22 jul 15:39 pprint.py
-rwxr-xr-x 1 pposca staff 22K 22 jul 15:39 profile.py
-rw-r--r-- 1 pposca staff 27K 22 jul 15:39 pstats.py
-rw-r--r-- 1 pposca staff 4,7K 22 jul 15:39 pty.py
-rw-r--r-- 1 pposca staff 7,7K 22 jul 15:39 py_compile.py
-rw-r--r-- 1 pposca staff 15K 22 jul 15:39 pyclbr.py
-rw-r--r-- 1 pposca staff 104K 22 jul 15:39 pydoc.py
drwxr-xr-x 6 pposca staff 192B 22 jul 15:39 pydoc_data
-rw-r--r-- 1 pposca staff 11K 22 jul 15:39 queue.py
-rwxr-xr-x 1 pposca staff 7,1K 22 jul 15:39 quopri.py
-rw-r--r-- 1 pposca staff 27K 22 jul 15:39 random.py
-rw-r--r-- 1 pposca staff 15K 22 jul 15:39 re.py
-rw-r--r-- 1 pposca staff 5,1K 22 jul 15:39 reprlib.py
-rw-r--r-- 1 pposca staff 6,9K 22 jul 15:39 rlcompleter.py
-rw-r--r-- 1 pposca staff 12K 22 jul 15:39 runpy.py
-rw-r--r-- 1 pposca staff 6,3K 22 jul 15:39 sched.py
-rw-r--r-- 1 pposca staff 2,0K 22 jul 15:39 secrets.py
-rw-r--r-- 1 pposca staff 18K 22 jul 15:39 selectors.py
-rw-r--r-- 1 pposca staff 8,3K 22 jul 15:39 shelve.py
-rw-r--r-- 1 pposca staff 13K 22 jul 15:39 shlex.py
-rw-r--r-- 1 pposca staff 40K 22 jul 15:39 shutil.py
-rw-r--r-- 1 pposca staff 2,1K 22 jul 15:39 signal.py
drwxr-xr-x 24 pposca staff 768B 2 ago 13:42 site-packages
-rw-r--r-- 1 pposca staff 20K 22 jul 15:39 site.py
-rwxr-xr-x 1 pposca staff 34K 22 jul 15:39 smtpd.py
-rwxr-xr-x 1 pposca staff 43K 22 jul 15:39 smtplib.py
-rw-r--r-- 1 pposca staff 6,9K 22 jul 15:39 sndhdr.py
-rw-r--r-- 1 pposca staff 27K 22 jul 15:39 socket.py
-rw-r--r-- 1 pposca staff 26K 22 jul 15:39 socketserver.py
drwxr-xr-x 7 pposca staff 224B 22 jul 15:39 sqlite3
-rw-r--r-- 1 pposca staff 26K 22 jul 15:39 sre_compile.py
-rw-r--r-- 1 pposca staff 7,0K 22 jul 15:39 sre_constants.py
-rw-r--r-- 1 pposca staff 38K 22 jul 15:39 sre_parse.py
-rw-r--r-- 1 pposca staff 44K 22 jul 15:39 ssl.py
-rw-r--r-- 1 pposca staff 4,9K 22 jul 15:39 stat.py
-rw-r--r-- 1 pposca staff 20K 22 jul 15:39 statistics.py
-rw-r--r-- 1 pposca staff 11K 22 jul 15:39 string.py
-rw-r--r-- 1 pposca staff 13K 22 jul 15:39 stringprep.py
-rw-r--r-- 1 pposca staff 257B 22 jul 15:39 struct.py
-rw-r--r-- 1 pposca staff 67K 22 jul 15:39 subprocess.py
-rw-r--r-- 1 pposca staff 18K 22 jul 15:39 sunau.py
-rwxr-xr-x 1 pposca staff 2,1K 22 jul 15:39 symbol.py
-rw-r--r-- 1 pposca staff 7,1K 22 jul 15:39 symtable.py
-rw-r--r-- 1 pposca staff 24K 22 jul 15:39 sysconfig.py
-rwxr-xr-x 1 pposca staff 11K 22 jul 15:39 tabnanny.py
-rwxr-xr-x 1 pposca staff 90K 22 jul 15:39 tarfile.py
-rw-r--r-- 1 pposca staff 23K 22 jul 15:39 telnetlib.py
-rw-r--r-- 1 pposca staff 26K 22 jul 15:39 tempfile.py
drwxr-xr-x 569 pposca staff 18K 22 jul 15:39 test
-rw-r--r-- 1 pposca staff 19K 22 jul 15:39 textwrap.py
-rw-r--r-- 1 pposca staff 1,0K 22 jul 15:39 this.py
-rw-r--r-- 1 pposca staff 47K 22 jul 15:39 threading.py
-rwxr-xr-x 1 pposca staff 13K 22 jul 15:39 timeit.py
drwxr-xr-x 18 pposca staff 576B 22 jul 15:39 tkinter
-rw-r--r-- 1 pposca staff 3,7K 22 jul 15:39 token.py
-rw-r--r-- 1 pposca staff 26K 22 jul 15:39 tokenize.py
-rwxr-xr-x 1 pposca staff 28K 22 jul 15:39 trace.py
-rw-r--r-- 1 pposca staff 23K 22 jul 15:39 traceback.py
-rw-r--r-- 1 pposca staff 17K 22 jul 15:39 tracemalloc.py
-rw-r--r-- 1 pposca staff 879B 22 jul 15:39 tty.py
-rw-r--r-- 1 pposca staff 140K 22 jul 15:39 turtle.py
drwxr-xr-x 25 pposca staff 800B 22 jul 15:39 turtledemo
-rw-r--r-- 1 pposca staff 9,7K 22 jul 15:39 types.py
-rw-r--r-- 1 pposca staff 53K 22 jul 15:39 typing.py
drwxr-xr-x 15 pposca staff 480B 22 jul 15:39 unittest
drwxr-xr-x 9 pposca staff 288B 22 jul 15:39 urllib
-rwxr-xr-x 1 pposca staff 6,7K 22 jul 15:39 uu.py
-rw-r--r-- 1 pposca staff 28K 22 jul 15:39 uuid.py
drwxr-xr-x 6 pposca staff 192B 22 jul 15:39 venv
-rw-r--r-- 1 pposca staff 19K 22 jul 15:39 warnings.py
-rw-r--r-- 1 pposca staff 18K 22 jul 15:39 wave.py
-rw-r--r-- 1 pposca staff 20K 22 jul 15:39 weakref.py
-rwxr-xr-x 1 pposca staff 23K 22 jul 15:39 webbrowser.py
drwxr-xr-x 9 pposca staff 288B 22 jul 15:39 wsgiref
-rw-r--r-- 1 pposca staff 5,8K 22 jul 15:39 xdrlib.py
drwxr-xr-x 8 pposca staff 256B 22 jul 15:39 xml
drwxr-xr-x 6 pposca staff 192B 22 jul 15:39 xmlrpc
-rw-r--r-- 1 pposca staff 7,4K 22 jul 15:39 zipapp.py
-rw-r--r-- 1 pposca staff 78K 22 jul 15:39 zipfile.py

ll /Users/pposca/.pyenv/versions/3.7.0/lib/python3.7/lib-dynload
total 9824
-rwxr-xr-x 1 pposca staff 68K 22 jul 15:38 _asyncio.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 11K 22 jul 15:38 _bisect.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 39K 22 jul 15:38 _blake2.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 19K 22 jul 15:39 _bz2.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 140K 22 jul 15:39 _codecs_cn.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 148K 22 jul 15:39 _codecs_hk.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 25K 22 jul 15:39 _codecs_iso2022.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 250K 22 jul 15:39 _codecs_jp.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 128K 22 jul 15:39 _codecs_kr.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 107K 22 jul 15:39 _codecs_tw.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 9,7K 22 jul 15:38 _contextvars.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 9,3K 22 jul 15:38 _crypt.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 34K 22 jul 15:38 _csv.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 136K 22 jul 15:39 _ctypes.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 24K 22 jul 15:38 _ctypes_test.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 89K 22 jul 15:39 _curses.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 18K 22 jul 15:39 _curses_panel.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 100K 22 jul 15:38 _datetime.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 17K 22 jul 15:39 _dbm.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 364K 22 jul 15:39 _decimal.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 72K 22 jul 15:39 _elementtree.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 23K 22 jul 15:39 _gdbm.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 25K 22 jul 15:38 _hashlib.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 20K 22 jul 15:38 _heapq.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 41K 22 jul 15:38 _json.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 19K 22 jul 15:38 _lsprof.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 36K 22 jul 15:39 _lzma.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 16K 22 jul 15:38 _md5.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 39K 22 jul 15:39 _multibytecodec.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 18K 22 jul 15:39 _multiprocessing.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 9,7K 22 jul 15:38 _opcode.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 119K 22 jul 15:38 _pickle.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 16K 22 jul 15:38 _posixsubprocess.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 14K 22 jul 15:38 _queue.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 16K 22 jul 15:38 _random.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 12K 22 jul 15:39 _scproxy.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 16K 22 jul 15:38 _sha1.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 21K 22 jul 15:38 _sha256.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 88K 22 jul 15:39 _sha3.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 29K 22 jul 15:38 _sha512.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 87K 22 jul 15:38 _socket.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 89K 22 jul 15:39 _sqlite3.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 118K 22 jul 15:38 _ssl.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 49K 22 jul 15:38 _struct.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 45K 22 jul 15:38 _testbuffer.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 115K 22 jul 15:38 _testcapi.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 9,3K 22 jul 15:38 _testimportmultiple.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 24K 22 jul 15:38 _testmultiphase.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 66K 22 jul 15:39 _tkinter.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 9,4K 22 jul 15:39 _uuid.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 11K 22 jul 15:38 _xxtestfuzz.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 62K 22 jul 15:38 array.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 44K 22 jul 15:38 audioop.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 28K 22 jul 15:39 binascii.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 37K 22 jul 15:38 cmath.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 19K 22 jul 15:38 fcntl.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 12K 22 jul 15:38 grp.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 47K 22 jul 15:38 math.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 24K 22 jul 15:38 mmap.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 16K 22 jul 15:39 nis.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 24K 22 jul 15:38 parser.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 255K 22 jul 15:39 pyexpat.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 35K 22 jul 15:38 readline.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 16K 22 jul 15:39 resource.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 29K 22 jul 15:38 select.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 11K 22 jul 15:38 syslog.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 20K 22 jul 15:39 termios.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 1,0M 22 jul 15:38 unicodedata.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 12K 22 jul 15:39 xxlimited.cpython-37m-darwin.so
-rwxr-xr-x 1 pposca staff 33K 22 jul 15:39 zlib.cpython-37m-darwin.so

Ok, I am getting it.

  • pyenv has no shared library installed
  • Nuitka needs one to link programs (not extension modules anymore though)
  • pyenv cannot create programs with Nuitka therefore.

Unfortunately, it and the Homebrew Python it actually uses, will have to be considered unsupported for creating programs.

I reverted the commit that tries to enforce shared linking for libpython. It gives a nicer error message, but I don't think the effort is worth the hard coding of filenames.

What you can try, is to take libpython3.7m.a and remove the symbol from it. Then I think it ought to work. Already for Windows, Nuitka is building its own link library, and if a couple of commands are needed to create a cached libpython.a that works, I wouldn't mind that. You can make a stab at that, my request for permanent access to a MacOS box has not been heard yet.

I would appreciate "sys.version" text for your Python @pposca so I can have a static python detection that works based on that maybe if it reveals itself.

Unfortunately the issue seems to be different from #94 after all. Use AnaConda or MiniConda Python on MacOS instead. They provide the shared libraries needed it seems.

I am still wondering though, what about this:

-L/Users/stefan/.pyenv/versions/3.7.0/lib/python3.7/config-3.7m-darwin

What is that config-3.7m-darwin folder @pposca @stlehmann ?

Maybe that is where it's hiding.

Also I wonder, why duplicate symbol is giving an error at all. Normally the first symbol should win, and the second just be ignored. Probably some linker option, and it will just work with the static library.

Yours,
Kay

The contents of the config-3.7m-darwin are:

ll /Users/pposca/.pyenv/versions/3.7.0/lib/python3.7/config-3.7m-darwin
total 22304
-rw-r--r-- 1 pposca staff 71K 22 jul 15:40 Makefile
-rw-r--r-- 1 pposca staff 14K 22 jul 15:40 Setup
-rw-r--r-- 1 pposca staff 41B 22 jul 15:40 Setup.local
-rw-r--r-- 1 pposca staff 3,2K 22 jul 15:40 config.c
-rw-r--r-- 1 pposca staff 1,6K 22 jul 15:40 config.c.in
-rwxr-xr-x 1 pposca staff 7,0K 22 jul 15:40 install-sh
-rw-r--r-- 1 pposca staff 11M 22 jul 15:40 libpython3.7m.a
-rwxr-xr-x 1 pposca staff 7,7K 22 jul 15:40 makesetup
-rwxr-xr-x 1 pposca staff 2,0K 22 jul 15:40 python-config.py
-rw-r--r-- 1 pposca staff 2,1K 22 jul 15:40 python.o

For what it's worth, official python is available on OSX so it should probably be used preferentially.

Unfortunately I've had a lot of problems with pyenv in the past and the way it build libraries. It's a great concept but just a bit too hard to get right.

@andrewleech Turns out, it, pyenv, also has no shared library, much like manylinux. But on the upside, I now learned that for linking Python extension modules, providing libpython is not just not needed for manylinux, it is actually not needed for anything but Windows.

So I removed this, and the static Python detection is not needed anymore for building Python libraries, which is good. And it makes MiniConda work, which is both, a static main python, and shared library available is needed.

I wouldn't mind however, getting static libpython.a to work, simply because it can only be more efficient than dynamic one, with no relocations needed at startup. But that appears to be a hard task, with no test at hand. I would have to self compile a CPython without --enable-shared maybe, to get a test case. Who knows, I might to that occasionally.

Ah excellent! Yeah there's times static linking would be nice, but that's definitely a new issue, good to hear you sorted this.

Btw if you want access to a Mac, I could set up a remote access to my mac build machine for you to test things?

I guess I would need a virtual machine, where I could install and uninstall all sorts of things for this to be useful. And ideally I would like to also setup some sort of Buildbot worker to run tests for the factory branch at least. Would that be acceptable? It would burn a fair bit of CPU for sure. But it would make sure I do know about regressions. See e.g. the install_name_tool thing of #94 which is kind of ridiculous to guess things at a distance.

BTW: For static linking, I am almost sure e.g. of "main.o" is removed from that pyenv "libpython.a", it could be working already. There is nothing else of worth expected in that, and I think the way ".a" files work as an archive of ".o" files, all it takes is to remove it with the proper "ar" command. This really ought to be that easy.

But yeah, going to create a separate issue. Closing this as wontfix. But once static Python support is done, I am open to revisiting this.

@kayhayen this basically means that so far it won't work on macos, but it should work ok via Docker and ubuntu 16.04 image.

@loretoparisi Using one of the supported Python versions, it sure does. MiniConda works on the develop version. AnaConda does on stable, however there were signs it needs the same fixes, so may also need develop. And there is always python.org, which is shockingly also what the User Manual says is supported.

I am really confused that people through random Pythons (MacOS) or random C compilers (Windows) at Nuitka and think it will work.

@kayhayen the problem with python and macOS is due to the default python installed and Homebrew install in most of cases...

I have the same issue with a self-compiled python (v3.7)
Removing the "main.o" from the *.a file does not fix the build, there are a lot of missing symbols when I do that.

Is there a supported python version or way to build that I can use?

I got this working with pyenv by following https://github.com/pyenv/pyenv/wiki#how-to-build-cpython-with---enable-shared

Some of 3rd party tool like PyInstaller might require CPython installation built with --enable-shared. You can build CPython with shared library as follows.

$ env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 3.5.0

Since pyenv (precisely, python-build) will build CPython with configuring RPATH, you don't have to set LD_LIBRARY_PATH to specify library path on GNU/Linux.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jamesstidard picture jamesstidard  路  12Comments

itdaniher picture itdaniher  路  10Comments

redstoneleo picture redstoneleo  路  4Comments

dzg picture dzg  路  10Comments

maaaaz picture maaaaz  路  7Comments