Uploaded image for project: 'Kudu'
  1. Kudu
  2. KUDU-1706

Unable to build from source using Python 3

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.0.1
    • 1.2.0
    • build
    • None
    • uname -a: Linux desktop 4.4.0-43-generic #63-Ubuntu SMP Wed Oct 12 13:48:03 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
      python 3 installed by default

    Description

      Building from source using results in Python print Syntax error.

      Running this script:

      Unable to find source-code formatter for language: shell. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      #!/bin/bash
      
      sudo apt-get -y install git autoconf automake \
        curl gcc g++ libsasl2-dev libsasl2-modules \
        libtool ntp patch pkg-config make rsync unzip vim-common gdb python lsb-release
      git clone https://github.com/apache/kudu
      cd kudu
      thirdparty/build-if-necessary.sh
      mkdir -p build/release
      cd build/release
      ../../thirdparty/installed/bin/cmake \
        -DCMAKE_BUILD_TYPE=release \
        ../..
      make -j4
      

      Results in:

      Unable to find source-code formatter for language: shell. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      ++ BOOST_VERSION=1_61_0
      ++ BOOST_NAME=boost_1_61_0
      ++ BOOST_SOURCE=/home/greg/kudu/thirdparty/src/boost_1_61_0
      + source /home/greg/kudu/thirdparty/build-definitions.sh
      + /home/greg/kudu/thirdparty/preflight.py
        File "/home/greg/kudu/thirdparty/preflight.py", line 60
          print "***", error_msg
                    ^
      SyntaxError: Missing parentheses in call to 'print'
      kudu.sh: line 12: ../../thirdparty/installed/bin/cmake: No such file or directory
      make: *** No targets specified and no makefile found.  Stop.
      

      Adding brackets to the print statements in /home/greg/kudu/thirdparty/preflight.py and running the build script again results in:

      Unable to find source-code formatter for language: shell. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      ++ BOOST_VERSION=1_61_0
      ++ BOOST_NAME=boost_1_61_0
      ++ BOOST_SOURCE=/home/greg/kudu/thirdparty/src/boost_1_61_0
      + source /home/greg/kudu/thirdparty/build-definitions.sh
      + /home/greg/kudu/thirdparty/preflight.py
        File "/home/greg/kudu/thirdparty/preflight.py", line 84
          print(>>p.stdin, script)
                 ^
      SyntaxError: invalid syntax
      kudu.sh: line 12: ../../thirdparty/installed/bin/cmake: No such file or directory
      make: *** No targets specified and no makefile found.  Stop.
      

      Then removing the ">>" from line 84 and running the build script again results in:

      Unable to find source-code formatter for language: shell. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      ++ BOOST_VERSION=1_61_0
      ++ BOOST_NAME=boost_1_61_0
      ++ BOOST_SOURCE=/home/greg/kudu/thirdparty/src/boost_1_61_0
      + source /home/greg/kudu/thirdparty/build-definitions.sh
      + /home/greg/kudu/thirdparty/preflight.py
      Traceback (most recent call last):
        File "/home/greg/kudu/thirdparty/preflight.py", line 35, in <module>
          DEV_NULL = file("/dev/null", "wb")
      NameError: name 'file' is not defined
      kudu.sh: line 12: ../../thirdparty/installed/bin/cmake: No such file or directory
      make: *** No targets specified and no makefile found.  Stop.
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            gregsifr Greg
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment