1

This is the error I am getting while setting up pypy sandbox on ubuntu 14. Please help if you can find any clue

(my-pypy-env)sterilistic@sterilistic:~/Desktop/Coderunner/pypy-4.0.1-src/pypy/goal$ ../../rpython/bin/rpython -O2 --sandbox targetpypystandalone.py
[translation:info] 2.7.10 (5f8302b8bf9f, Nov 18 2015, 10:46:49)
[translation:info] [PyPy 4.0.1 with GCC 4.6.3]
[platform:msg] Set platform with 'host' cc=None, using cc='gcc', version='Unknown'
[translation:info] Translating target as defined by targetpypystandalone
[platform:execute] gcc -c -O3 -pthread -fomit-frame-pointer -Wall -Wno-unused /tmp/usession-release-4.0.1-9/gcctest.c -o /tmp/usession-release-4.0.1-9/gcctest.o
[platform:execute] gcc /tmp/usession-release-4.0.1-9/gcctest.o -pthread -Wl,--export-dynamic -lrt -o /tmp/usession-release-4.0.1-9/gcctest
[platform:execute] gcc -c -O3 -pthread -fomit-frame-pointer -Wall -Wno-unused /tmp/usession-release-4.0.1-9/gcctest.c -o /tmp/usession-release-4.0.1-9/gcctest.o
[platform:execute] gcc /tmp/usession-release-4.0.1-9/gcctest.o -pthread -Wl,--export-dynamic -lrt -o /tmp/usession-release-4.0.1-9/gcctest
Traceback (most recent call last):
  File "../../rpython/bin/rpython", line 20, in <module>
    main()
  File "/home/sterilistic/Desktop/Coderunner/pypy-4.0.1-src/rpython/translator/goal/translate.py", line 217, in main
    targetspec_dic, translateconfig, config, args = parse_options_and_load_target()
  File "/home/sterilistic/Desktop/Coderunner/pypy-4.0.1-src/rpython/translator/goal/translate.py", line 156, in parse_options_and_load_target
    targetspec_dic = load_target(targetspec)
  File "/home/sterilistic/Desktop/Coderunner/pypy-4.0.1-src/rpython/translator/goal/translate.py", line 98, in load_target
    mod = __import__(specname)
  File "targetpypystandalone.py", line 13, in <module>
    from rpython.rlib import rthread
  File "/home/sterilistic/Desktop/Coderunner/pypy-4.0.1-src/rpython/rlib/rthread.py", line 1, in <module>
    from rpython.rtyper.lltypesystem import rffi, lltype, llmemory
  File "/home/sterilistic/Desktop/Coderunner/pypy-4.0.1-src/rpython/rtyper/lltypesystem/rffi.py", line 1077, in <module>
    maxint, sizeof(llmemory.Address)))
AssertionError: Mixed configuration of the word size of the machine:
    the underlying Python was compiled with maxint=2147483647,
    but the C compiler says that 'void *' is 8 bytes
pkt
  • 13
  • 3

2 Answers2

0

The C compiler is what defines how many bytes your sandbox can compute. Due to limit of 8 bytes, this appears to be code designed for a 32-bit machine. From this webpage:

PyPy/RPython makes a lot of platform/architecture decisions based on the version of python that you use to run the build. Since emscripten provides a 32-bit runtime environment, you'll need to run the build using a 32-bit version of python. (I build in a 32-bit Ubuntu VM to achieve this).

Essentially, you need to run a 32-bit version of Python. I am uncertain how to do this on Windows and Linux, but here is a Stack Overflow link on how to do it on a mac, which may give you some starting points. Your best bet is to run a VM with a 32-bit version of Ubuntu--just select 32-bit instead of 64-bit on the download page.

Best of luck!

Community
  • 1
  • 1
Joseph Farah
  • 2,463
  • 2
  • 25
  • 36
  • Thanks man! but had no luck. checked python architecture version, its 32 bit only. – pkt Mar 06 '16 at 06:23
0

You're running PyPy 4.0.1 32-bit, and it is calling the C compiler, which is gcc or clang 64-bit. You need to make these two consistent, for example by downloading and running PyPy 4.0.1 64-bit.

Armin Rigo
  • 12,048
  • 37
  • 48