python / cpython

The Python programming language
https://www.python.org
Other
62.47k stars 29.99k forks source link

Main branch of CPython does not build anymore on macOS #90151

Closed sobolevn closed 2 years ago

sobolevn commented 2 years ago
BPO 45993
Nosy @ned-deily, @sobolevn, @akulakov
Files
  • Makefile
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields: ```python assignee = None closed_at = created_at = labels = ['build', 'invalid', '3.11'] title = 'Main branch of CPython does not build anymore on macOS' updated_at = user = 'https://github.com/sobolevn' ``` bugs.python.org fields: ```python activity = actor = 'ned.deily' assignee = 'none' closed = True closed_date = closer = 'sobolevn' components = ['Build'] creation = creator = 'sobolevn' dependencies = [] files = ['50479'] hgrepos = [] issue_num = 45993 keywords = [] message_count = 5.0 messages = ['407773', '407774', '407778', '414926', '415018'] nosy_count = 3.0 nosy_names = ['ned.deily', 'sobolevn', 'andrei.avk'] pr_nums = [] priority = 'normal' resolution = 'not a bug' stage = 'resolved' status = 'closed' superseder = None type = 'compile error' url = 'https://bugs.python.org/issue45993' versions = ['Python 3.11'] ```

    sobolevn commented 2 years ago

    New version of main branch does not build for me anymore.

    Command: make -j System information:

    I am also attaching resulting Makefile.

    Output:

    » make -j
    gcc -L/usr/local/opt/openssl/lib -L/usr/local/opt/openssl/lib   -o Programs/_freeze_module Programs/_freeze_module.o Modules/getpath_noop.o Modules/getbuildinfo.o Parser/token.o  Parser/pegen.o Parser/pegen_errors.o Parser/action_helpers.o Parser/parser.o Parser/string_parser.o Parser/peg_api.o Parser/myreadline.o Parser/tokenizer.o Objects/abstract.o Objects/accu.o Objects/boolobject.o Objects/bytes_methods.o Objects/bytearrayobject.o Objects/bytesobject.o Objects/call.o Objects/capsule.o Objects/cellobject.o Objects/classobject.o Objects/codeobject.o Objects/complexobject.o Objects/descrobject.o Objects/enumobject.o Objects/exceptions.o Objects/genericaliasobject.o Objects/genobject.o Objects/fileobject.o Objects/floatobject.o Objects/frameobject.o Objects/funcobject.o Objects/interpreteridobject.o Objects/iterobject.o Objects/listobject.o Objects/longobject.o Objects/dictobject.o Objects/odictobject.o Objects/memoryobject.o Objects/methodobject.o Objects/moduleobject.o Objects/namespaceobject.o Objects/object.o Objects/obmalloc.o Objects/picklebufobject.o Objects/rangeobject.o Objects/setobject.o Objects/sliceobject.o Objects/structseq.o Objects/tupleobject.o Objects/typeobject.o Objects/unicodeobject.o Objects/unicodectype.o Objects/unionobject.o Objects/weakrefobject.o Python/_warnings.o Python/Python-ast.o Python/Python-tokenize.o Python/asdl.o Python/ast.o Python/ast_opt.o Python/ast_unparse.o Python/bltinmodule.o Python/ceval.o Python/codecs.o Python/compile.o Python/context.o Python/dynamic_annotations.o Python/errors.o Python/frame.o Python/frozenmain.o Python/future.o Python/getargs.o Python/getcompiler.o Python/getcopyright.o Python/getplatform.o Python/getversion.o Python/hamt.o Python/hashtable.o Python/import.o Python/importdl.o Python/initconfig.o Python/marshal.o Python/modsupport.o Python/mysnprintf.o Python/mystrtoul.o Python/pathconfig.o Python/preconfig.o Python/pyarena.o Python/pyctype.o Python/pyfpe.o Python/pyhash.o Python/pylifecycle.o Python/pymath.o Python/pystate.o Python/pythonrun.o Python/pytime.o Python/bootstrap_hash.o Python/specialize.o Python/structmember.o Python/symtable.o Python/sysmodule.o Python/thread.o Python/traceback.o Python/getopt.o Python/pystrcmp.o Python/pystrtod.o Python/pystrhex.o Python/dtoa.o Python/formatter_unicode.o Python/fileutils.o Python/suggestions.o Python/dynload_shlib.o    Modules/config.o Modules/main.o Modules/gcmodule.o Modules/xxsubtype.o -lintl -ldl  -framework CoreFoundation    
    Undefined symbols for architecture x86_64:
      "_PyErr_CheckSignals", referenced from:
          _my_fgets in myreadline.o
          _long_to_decimal_string_internal in longobject.o
          _x_mul in longobject.o
          _x_divrem in longobject.o
          _PyObject_Print in object.o
          _PyObject_Str in object.o
          _PyObject_Repr in object.o
          ...
      "_PyOS_FSPath", referenced from:
          _PyUnicode_FSConverter in unicodeobject.o
          _PyUnicode_FSDecoder in unicodeobject.o
      "__PyAtExit_Call", referenced from:
          _Py_FinalizeEx in pylifecycle.o
          _Py_EndInterpreter in pylifecycle.o
      "__PyAtExit_Fini", referenced from:
          _interpreter_clear in pystate.o
      "__PyAtExit_Init", referenced from:
          _pycore_interp_init in pylifecycle.o
      "__PyErr_CheckSignalsTstate", referenced from:
          _handle_signals in ceval.o
      "__PyFaulthandler_Fini", referenced from:
          _Py_FinalizeEx in pylifecycle.o
          _fatal_error in pylifecycle.o
      "__PyFaulthandler_Init", referenced from:
          _init_interp_main in pylifecycle.o
      "__PyMem_DumpTraceback", referenced from:
          __PyObject_AssertFailed in object.o
          __PyObject_DebugDumpAddress in obmalloc.o
      "__PyOS_InterruptOccurred", referenced from:
          _my_fgets in myreadline.o
      "__PySignal_Fini", referenced from:
          _Py_FinalizeEx in pylifecycle.o
      "__PySignal_Init", referenced from:
          _init_interp_main in pylifecycle.o
      "__PyTraceMalloc_Fini", referenced from:
          _Py_FinalizeEx in pylifecycle.o
      "__PyTraceMalloc_Init", referenced from:
          _init_interp_main in pylifecycle.o
      "__PyTraceMalloc_NewReference", referenced from:
          __Py_NewReference in object.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make: *** [Programs/_freeze_module] Error 1
    tiran commented 2 years ago

    Did you run "make distclean" or "git clean -xdf" before ./configure?

    sobolevn commented 2 years ago

    Looks like removing cache worked. Thanks!

    akulakov commented 2 years ago

    I'm getting the same exact error but on arm64, and clearing the cache does not help.

    clang=13.0.0
    MacOS=11.5.2

    Should I open a new issue for this?

    257 warnings generated. 257 warnings generated. Undefined symbols for architecture arm64: "_libintlbindtextdomain", referenced from: \_locale_bindtextdomain_impl in _localemodule.o "_libintldcgettext", referenced from: \_locale_dcgettext_impl in _localemodule.o "_libintldgettext", referenced from: \_locale_dgettext_impl in _localemodule.o "_libintlgettext", referenced from: \_locale_gettext_impl in _localemodule.o "_libintlsetlocale", referenced from: \_locale_setlocale_impl in _localemodule.o _locale_decode_monetary in _localemodule.o "_libintltextdomain", referenced from: \_locale_textdomain_impl in _localemodule.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [Programs/_freeze_module] Error 1

    ned-deily commented 2 years ago

    @Andrei, see bpo-46975.