Pyenv: pyen install 3.5.3: ld: symbol(s) not found for architecture x86_64, clang: error: linker command failed with exit code 1 (use -v to see invocation)

Created on 28 Mar 2019  路  1Comment  路  Source: pyenv/pyenv

Description

  • [x] macOS 10.14.3
  • [x] amd64
  • [x] pyenv 1.2.9
  • [x] 3.5.3
  • [x] version 10.0.1 (clang-1001.0.46.3)
  • [ ]
    ld: warning: ignoring file libpython3.6m.a, file was built for archive which is not the architecture being linked (x86_64): libpython3.6m.a
    ld: warning: ignoring file libpython3.6m.a, file was built for archive which is not the architecture being linked (x86_64): libpython3.6m.a
    Undefined symbols for architecture x86_64:
    "_PyMem_RawFree", referenced from:
    _main in python.o
    "_PyMem_RawMalloc", referenced from:
    _main in python.o
    "_Py_DecodeLocale", referenced from:
    _main in python.o
    "_Py_Main", referenced from:
    _main in python.o
    "__PyMem_RawStrdup", referenced from:
    _main in python.o
    "__PyMem_SetupAllocators", referenced from:
    _main in python.o
    Undefined symbols for architecture x86_64:
    ld: symbol(s) not found for architecture x86_64
    "_PyEval_InitThreads", referenced from:
    _test_repeated_init_and_subinterpreters in _testembed.o
    "_PyEval_ReleaseThread", referenced from:
    _test_repeated_init_and_subinterpreters in _testembed.o
    "_PyEval_RestoreThread", referenced from:
    _test_repeated_init_and_subinterpreters in _testembed.o
    _test_bpo20891 in _testembed.o
    "_PyEval_SaveThread", referenced from:
    _test_bpo20891 in _testembed.o
    "_PyGILState_Check", referenced from:
    _bpo20891_thread in _testembed.o
    "_PyGILState_Ensure", referenced from:
    _test_repeated_init_and_subinterpreters in _testembed.o
    _bpo20891_thread in _testembed.o
    "_PyGILState_Release", referenced from:
    _test_repeated_init_and_subinterpreters in _testembed.o
    _bpo20891_thread in _testembed.o
    "_PyMem_RawFree", referenced from:
    _test_pre_initialization_api in _testembed.o
    "_PyRun_SimpleStringFlags", referenced from:
    _test_forced_io_encoding in _testembed.o
    _test_repeated_init_and_subinterpreters in _testembed.o
    "_PyThreadState_Get", referenced from:
    _test_repeated_init_and_subinterpreters in _testembed.o
    "_PyThreadState_Swap", referenced from:
    _test_repeated_init_and_subinterpreters in _testembed.o
    "_PyThread_acquire_lock", referenced from:
    _test_bpo20891 in _testembed.o
    "_PyThread_allocate_lock", referenced from:
    _test_bpo20891 in _testembed.o
    "_PyThread_exit_thread", referenced from:
    _bpo20891_thread in _testembed.o
    "_PyThread_free_lock", referenced from:
    _test_bpo20891 in _testembed.o
    "_PyThread_release_lock", referenced from:
    _bpo20891_thread in _testembed.o
    "_PyThread_start_new_thread", referenced from:
    _test_bpo20891 in _testembed.o
    "_Py_DecodeLocale", referenced from:
    _test_pre_initialization_api in _testembed.o
    "_Py_EndInterpreter", referenced from:
    _test_repeated_init_and_subinterpreters in _testembed.o
    "_Py_Finalize", referenced from:
    _test_forced_io_encoding in _testembed.o
    _test_repeated_init_and_subinterpreters in _testembed.o
    _test_pre_initialization_api in _testembed.o
    "_Py_Initialize", referenced from:
    _test_forced_io_encoding in _testembed.o
    _test_repeated_init_and_subinterpreters in _testembed.o
    _test_pre_initialization_api in _testembed.o
    _test_bpo20891 in _testembed.o
    "_Py_NewInterpreter", referenced from:
    _test_repeated_init_and_subinterpreters in _testembed.o
    "_Py_SetProgramName", referenced from:
    _test_forced_io_encoding in _testembed.o
    _test_repeated_init_and_subinterpreters in _testembed.o
    _test_pre_initialization_api in _testembed.o
    _test_bpo20891 in _testembed.o
    "_Py_SetStandardStreamEncoding", referenced from:
    _test_forced_io_encoding in _testembed.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make: * [python.exe] Error 1
    make:
    Waiting for unfinished jobs....
    make: *
    * [Programs/_testembed] Error 1
build cpython macOS

Most helpful comment

Maybe #1245 has your solution? Was having similar issues and that sorted it for me.

My steps:

  • brew uninstall binutils
  • download and install Mac OS 10.14 command line tools for Xcode 10.2 manually (for some reason xcode-select --install didn't do the magic for me)
  • sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target / after installing command line tools, per Common Build Problems

Worked a treat.

>All comments

Maybe #1245 has your solution? Was having similar issues and that sorted it for me.

My steps:

  • brew uninstall binutils
  • download and install Mac OS 10.14 command line tools for Xcode 10.2 manually (for some reason xcode-select --install didn't do the magic for me)
  • sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target / after installing command line tools, per Common Build Problems

Worked a treat.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zeroxenator picture zeroxenator  路  3Comments

ydaniju picture ydaniju  路  3Comments

tasugi picture tasugi  路  3Comments

bryant1410 picture bryant1410  路  3Comments

tommyjcarpenter picture tommyjcarpenter  路  3Comments