Uploaded image for project: 'Swift'
  1. Swift
  2. SR-14

Wrong python version selected when building swift-lldb

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Medium
    • Resolution: Cannot Reproduce
    • Component/s: LLDB for Swift
    • Labels:
      None

      Description

      On my system both python-3.4 and python-2.7 are installed.
      swift-lldb selects the wrong version (3.4):

      ...
      [6/840] Building CXX object scripts/Python/modules/readline/CMakeFiles/readline.dir/readline.cpp.o
      FAILED: /usr/local/bin/clang++   -DHAVE_PROCESS_VM_READV -DHAVE_ROUND -DLIBXML2_DEFINED -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Dreadline_EXPOR
      TS -Iscripts/Python/modules/readline -I/var/tmp/lldb/scripts/Python/modules/readline -I/var/tmp/lldb/include -Iinclude -I/var/tmp/build/Ninja-ReleaseAssert/llvm-linux-x86_64/
      include -I/var/tmp/build/Ninja-ReleaseAssert/llvm-linux-x86_64/tools/clang/include -I/var/tmp/llvm/include -I/var/tmp/llvm/tools/clang/include -I/var/tmp/build/Ninja-ReleaseA
      ssert/swift-linux-x86_64/include -I/var/tmp/swift/include -I/var/tmp/lldb/source -I/usr/include/python3.4 -I/var/tmp/lldb/tools/clang/include -I../clang/include -I/usr/includ
      e/libxml2 -Werror=date-time -std=c++11 -fcolor-diagnostics -ffunction-sections -fdata-sections -Wno-deprecated-declarations -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-dep
      recated-register -Wno-vla-extension  -fno-exceptions -fno-rtti -Wno-macro-redefined -O3 -DNDEBUG -fPIC -MMD -MT scripts/Python/modules/readline/CMakeFiles/readline.dir/readli
      ne.cpp.o -MF scripts/Python/modules/readline/CMakeFiles/readline.dir/readline.cpp.o.d -o scripts/Python/modules/readline/CMakeFiles/readline.dir/readline.cpp.o -c /var/tmp/ll
      db/scripts/Python/modules/readline/readline.cpp
      /var/tmp/lldb/scripts/Python/modules/readline/readline.cpp:68:34: error: assigning to 'char *(*)(FILE *, FILE *, const char *)' (aka 'char *(*)(_IO_FILE *, _IO_FILE *, const 
      char *)') from incompatible type 'char *(FILE *, FILE *, char *)' (aka 'char *(_IO_FILE *, _IO_FILE *, char *)'): type mismatch at 3rd parameter ('const char *' vs 'char *')
          PyOS_ReadlineFunctionPointer = simple_readline;
                                       ^ ~~~~~~~~~~~~~~~
      /var/tmp/lldb/scripts/Python/modules/readline/readline.cpp:70:5: error: use of undeclared identifier 'Py_InitModule4'
          Py_InitModule4(
          ^
      2 errors generated.
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              octoploid Markus Trippelsdorf
              Votes:
              3 Vote for this issue
              Watchers:
              13 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: