Unix Build Fails

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
Post Reply
SwimDude0614
Posts: 32
Joined: Mon Mar 10, 2014 1:32 am

Unix Build Fails

Post by SwimDude0614 » Mon Mar 10, 2014 2:50 am

I have a fresh repository with no changes. When I try to build the unix version, I get:

Code: Select all

david@balrogJr-Saucy:~/reusable/micropython/unix$ make clean
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
rm -f micropython
rm -rf build
david@balrogJr-Saucy:~/reusable/micropython/unix$ make V=1
mkdir -p build/py
makeqstrdata ../py/qstrdefs.h qstrdefsport.h
python ../py/makeqstrdata.py ../py/qstrdefs.h qstrdefsport.h > build/py/qstrdefs.generated.h
  File "../py/makeqstrdata.py", line 41
    print('({}:{}) bad qstr format, got {}'.format(infile, line_number, line), file=sys.stderr)
                                                                                   ^
SyntaxError: invalid syntax
make: *** [build/py/qstrdefs.generated.h] Error 1
I'm running Ubuntu 13.10 64-bit with gcc 4.8.1 and python 2.7.5 and 3.3.2.

SwimDude0614
Posts: 32
Joined: Mon Mar 10, 2014 1:32 am

Re: Unix Build Fails

Post by SwimDude0614 » Mon Mar 10, 2014 2:46 pm

I logged into my webserver this morning to try the build again. It is running Ubuntu 12.04.4 64-bit, gcc 4.6.3-1ubuntu5, python 2.7.3

When I do a "find", it appears that there really isn't any file called "readline.h".

Code: Select all

...
...
...
CC main.c
main.c:23:31: fatal error: readline/readline.h: No such file or directory
compilation terminated.
make: *** [build/main.o] Error 1
dzweb@zemon1204:~/micropython/unix$ find .. -name readline.h
dzweb@zemon1204:~/micropython/unix$
I'm getting the impression that there's something weird about my environment on my home desktop, so the errors in this post are probably worth focusing on more than my first post.

User avatar
dhylands
Posts: 3063
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Unix Build Fails

Post by dhylands » Mon Mar 10, 2014 2:53 pm

I just posted a pull request for the problem in your first post a few hours ago:
https://github.com/micropython/micropython/pull/335

To fix the second problem, I think that if you do:

Code: Select all

sudo apt-get install libreadline-dev
then you should get further.

SwimDude0614
Posts: 32
Joined: Mon Mar 10, 2014 1:32 am

Re: Unix Build Fails

Post by SwimDude0614 » Mon Mar 10, 2014 5:48 pm

Great! Working on my remote server now. I'll update tonight regarding my first post.

Update
That worked! Thanks for the push.

Post Reply