<div dir="ltr"><div>Hi all,</div><div><br></div><div>I'm trying to build pypy from source on ubuntu 12.04 LTS but can't get it to work (see error messages below). Can someone help me and let me know the correct steps since I'm new to pypy?</div><div><br></div><div>Thanks,</div><div>Meide</div><div><br></div><div>(1) The details for the ubuntu in virtualbox are as follows</div><div>    cat /etc/*-release</div><div><div>       DISTRIB_ID=Ubuntu</div><div>       DISTRIB_RELEASE=12.04</div><div>       DISTRIB_CODENAME=precise</div><div>       DISTRIB_DESCRIPTION="Ubuntu 12.04.3 LTS"</div><div>       NAME="Ubuntu"</div><div>       VERSION="12.04.3 LTS, Precise Pangolin"</div><div>       ID=ubuntu</div><div>       ID_LIKE=debian</div><div>       PRETTY_NAME="Ubuntu precise (12.04.3 LTS)"</div><div>       VERSION_ID="12.04"</div><div>    uname -a</div><div>       Linux ubuntu 3.8.0-29-generic #42~precise1-Ubuntu SMP Wed Aug 14 16:19:23 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux</div></div><div><div>    python -V</div><div>        Python 2.7.13</div></div><div><br></div>(2) install pypy dependencies via command: <br><div>     sudo apt-get install gcc make libffi-dev pkg-config zlib1g-dev libbz2-dev libsqlite3-dev libncurses5-dev libexpat1-dev libssl-dev libgdbm-dev tk-dev libgc-dev liblzma-dev mercurial<br></div><div><br></div><div>(3) check out pypy source code:</div><div><span style="color:rgb(51,51,51);font-family:Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace">    cd ~/pypy</span><br></div><div><span class="gmail-n" style="font-family:Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace;font-size:12px;box-sizing:border-box;color:rgb(51,51,51)">    hg</span><span style="color:rgb(64,64,64);font-family:Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace;font-size:12px"> </span><span class="gmail-n" style="font-family:Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace;font-size:12px;box-sizing:border-box;color:rgb(51,51,51)">clone</span><span style="color:rgb(64,64,64);font-family:Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace;font-size:12px"> </span><span class="gmail-n" style="font-family:Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace;font-size:12px;box-sizing:border-box;color:rgb(51,51,51)">http</span><span class="gmail-p" style="color:rgb(64,64,64);font-family:Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace;font-size:12px;box-sizing:border-box">:</span><span class="gmail-o" style="color:rgb(64,64,64);font-family:Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace;font-size:12px;box-sizing:border-box;font-weight:bold">//</span><span class="gmail-n" style="font-family:Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace;font-size:12px;box-sizing:border-box;color:rgb(51,51,51)">bitbucket</span><span class="gmail-o" style="color:rgb(64,64,64);font-family:Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace;font-size:12px;box-sizing:border-box;font-weight:bold">.</span><span class="gmail-n" style="font-family:Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace;font-size:12px;box-sizing:border-box;color:rgb(51,51,51)">org</span><span class="gmail-o" style="color:rgb(64,64,64);font-family:Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace;font-size:12px;box-sizing:border-box;font-weight:bold">/</span><span class="gmail-n" style="font-family:Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace;font-size:12px;box-sizing:border-box;color:rgb(51,51,51)">pypy</span><span class="gmail-o" style="color:rgb(64,64,64);font-family:Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace;font-size:12px;box-sizing:border-box;font-weight:bold">/</span><span class="gmail-n" style="font-family:Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace;font-size:12px;box-sizing:border-box;color:rgb(51,51,51)">pypy</span><span style="color:rgb(64,64,64);font-family:Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace;font-size:12px"> </span><span class="gmail-n" style="font-family:Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace;font-size:12px;box-sizing:border-box;color:rgb(51,51,51)">pypy</span></div><div><span class="gmail-n" style="font-family:Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace;font-size:12px;box-sizing:border-box;color:rgb(51,51,51)"><br></span></div><div><span class="gmail-n" style="font-family:Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace;font-size:12px;box-sizing:border-box;color:rgb(51,51,51)">(4)build pypy</span></div><div><font color="#333333" face="Consolas, Andale Mono WT, Andale Mono, Lucida Console, Lucida Sans Typewriter, DejaVu Sans Mono, Bitstream Vera Sans Mono, Liberation Mono, Nimbus Mono L, Monaco, Courier New, Courier, monospace">    cd ~/pypy/pypy/pypy/goal/</font><br></div><div><span style="color:rgb(51,51,51);font-family:Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace">    sudo ../../rpython/bin/rpython --opt=jit targetpypystandalone.py</span></div><div><pre style="box-sizing:border-box;margin-top:0px;margin-bottom:0px;padding:12px;line-height:normal;overflow:auto"><span class="gmail-n" style="box-sizing:border-box"><font color="#333333" face="Consolas, Andale Mono WT, Andale Mono, Lucida Console, Lucida Sans Typewriter, DejaVu Sans Mono, Bitstream Vera Sans Mono, Liberation Mono, Nimbus Mono L, Monaco, Courier New, Courier, monospace"><br></font></span></pre><pre style="box-sizing:border-box;margin-top:0px;margin-bottom:0px;padding:12px;line-height:normal;overflow:auto"><span class="gmail-n" style="box-sizing:border-box"><font color="#333333" face="Consolas, Andale Mono WT, Andale Mono, Lucida Console, Lucida Sans Typewriter, DejaVu Sans Mono, Bitstream Vera Sans Mono, Liberation Mono, Nimbus Mono L, Monaco, Courier New, Courier, monospace">[platform:execute] gcc -c -O3 -pthread -fomit-frame-pointer -Wall -Wno-unused -Wno-address -DRPYTHON_VMPROF -O3 -DVMPROF_UNIX -DVMPROF_LINUX -DRPYTHON_LL2CTYPES -I/home/meide/pypy/pypy/rpython/rlib/rvmprof/src -I/home/meide/pypy/pypy/rpython/rlib/rvmprof/src/shared -I/home/meide/pypy/pypy/rpython/rlib/rvmprof/src/shared/libbacktrace /home/meide/pypy/pypy/rpython/rlib/rvmprof/src/shared/libbacktrace/elf.c -o /tmp/usession-default-0/rpython/rlib/rvmprof/src/shared/libbacktrace/elf.o
[translation:info] Error:
   File "/home/meide/pypy/pypy/rpython/translator/goal/translate.py", line 284, in main
    default_goal='compile')
   File "/home/meide/pypy/pypy/rpython/translator/driver.py", line 566, in from_targetspec
    spec = target(driver, args)
   File "targetpypystandalone.py", line 337, in target
    return self.get_entry_point(config)
   File "targetpypystandalone.py", line 368, in get_entry_point
    space = make_objspace(config)
   File "/home/meide/pypy/pypy/pypy/tool/option.py", line 35, in make_objspace
    return Space(config)
   File "/home/meide/pypy/pypy/pypy/interpreter/baseobjspace.py", line 441, in __init__
    self.initialize()
   File "/home/meide/pypy/pypy/pypy/objspace/std/objspace.py", line 105, in initialize
    self.make_builtins()
   File "/home/meide/pypy/pypy/pypy/interpreter/baseobjspace.py", line 637, in make_builtins
    self.install_mixedmodule(mixedname, installed_builtin_modules)
   File "/home/meide/pypy/pypy/pypy/interpreter/baseobjspace.py", line 668, in install_mixedmodule
    modname = self.setbuiltinmodule(mixedname)
   File "/home/meide/pypy/pypy/pypy/interpreter/baseobjspace.py", line 507, in setbuiltinmodule
    None, None, ["Module"]).Module
   File "/home/meide/pypy/pypy/pypy/module/_vmprof/__init__.py", line 30, in <module>
    import pypy.module._vmprof.interp_vmprof
   File "/home/meide/pypy/pypy/pypy/module/_vmprof/interp_vmprof.py", line 14, in <module>
    my_execute_frame = _decorator(PyFrame.execute_frame)
   File "/home/meide/pypy/pypy/rpython/rlib/rvmprof/rvmprof.py", line 196, in decorate
    _get_vmprof()
   File "/home/meide/pypy/pypy/rpython/rlib/rvmprof/rvmprof.py", line 243, in _get_vmprof
    _vmprof_instance = VMProf()
   File "/home/meide/pypy/pypy/rpython/rlib/rvmprof/rvmprof.py", line 49, in __init__
    self.cintf = cintf.setup()
   File "/home/meide/pypy/pypy/rpython/rlib/rvmprof/cintf.py", line 82, in setup
    **eci_kwds))
   File "/home/meide/pypy/pypy/rpython/rtyper/tool/rffi_platform.py", line 94, in verify_eci
    configure(CConfig)
   File "/home/meide/pypy/pypy/rpython/rtyper/tool/rffi_platform.py", line 223, in configure
    res[key] = value.question(writer.ask_gcc)
   File "/home/meide/pypy/pypy/rpython/rtyper/tool/rffi_platform.py", line 555, in question
    ask_gcc("")
   File "/home/meide/pypy/pypy/rpython/rtyper/tool/rffi_platform.py", line 191, in ask_gcc
    try_compile_cache([self.path], self.eci)
   File "/home/meide/pypy/pypy/rpython/tool/gcc_cache.py", line 71, in try_compile_cache
    platform.compile(c_files, eci)
   File "/home/meide/pypy/pypy/rpython/translator/platform/__init__.py", line 54, in compile
    ofiles = self._compile_o_files(cfiles, eci, standalone)
   File "/home/meide/pypy/pypy/rpython/translator/platform/__init__.py", line 76, in _compile_o_files
    ofiles.append(self._compile_c_file(self.cc, cfile, compile_args))
   File "/home/meide/pypy/pypy/rpython/translator/platform/posix.py", line 41, in _compile_c_file
    cwd=str(cfile.dirpath()))
   File "/home/meide/pypy/pypy/rpython/translator/platform/__init__.py", line 140, in _execute_c_compiler
    self._handle_error(returncode, stdout, stderr, outname)
   File "/home/meide/pypy/pypy/rpython/translator/platform/__init__.py", line 152, in _handle_error
    raise CompilationError(stdout, stderr)
[translation:ERROR] CompilationError: CompilationError(err="""
        /home/meide/pypy/pypy/rpython/rlib/rvmprof/src/shared/libbacktrace/elf.c: In function ‘elf_add_syminfo_data’:
        /home/meide/pypy/pypy/rpython/rlib/rvmprof/src/shared/libbacktrace/elf.c:448:8: warning: implicit declaration of function ‘__atomic_load_n’ [-Wimplicit-function-declaration]
        /home/meide/pypy/pypy/rpython/rlib/rvmprof/src/shared/libbacktrace/elf.c:448:12: error: ‘__ATOMIC_ACQUIRE’ undeclared (first use in this function)
        /home/meide/pypy/pypy/rpython/rlib/rvmprof/src/shared/libbacktrace/elf.c:448:12: note: each undeclared identifier is reported only once for each function it appears in
        /home/meide/pypy/pypy/rpython/rlib/rvmprof/src/shared/libbacktrace/elf.c: In function ‘elf_syminfo’:
        /home/meide/pypy/pypy/rpython/rlib/rvmprof/src/shared/libbacktrace/elf.c:493:12: error: ‘__ATOMIC_ACQUIRE’ undeclared (first use in this function)
        /home/meide/pypy/pypy/rpython/rlib/rvmprof/src/shared/libbacktrace/elf.c: In function ‘backtrace_initialize’:
        /home/meide/pypy/pypy/rpython/rlib/rvmprof/src/shared/libbacktrace/elf.c:958:2: warning: implicit declaration of function ‘__atomic_store_n’ [-Wimplicit-function-declaration]
        /home/meide/pypy/pypy/rpython/rlib/rvmprof/src/shared/libbacktrace/elf.c:958:2: error: ‘__ATOMIC_RELEASE’ undeclared (first use in this function)
        /home/meide/pypy/pypy/rpython/rlib/rvmprof/src/shared/libbacktrace/elf.c:973:20: error: ‘__ATOMIC_ACQUIRE’ undeclared (first use in this function)
        """)
[translation] start debugger...
> /home/meide/pypy/pypy/rpython/translator/platform/__init__.py(152)_handle_error()
-> raise CompilationError(stdout, stderr)
(Pdb+) 
</font></span></pre></div><div><span class="gmail-n" style="box-sizing:border-box"><font color="#333333" face="Consolas, Andale Mono WT, Andale Mono, Lucida Console, Lucida Sans Typewriter, DejaVu Sans Mono, Bitstream Vera Sans Mono, Liberation Mono, Nimbus Mono L, Monaco, Courier New, Courier, monospace"><br></font></span></div><div><span class="gmail-n" style="box-sizing:border-box"><font color="#333333" face="Consolas, Andale Mono WT, Andale Mono, Lucida Console, Lucida Sans Typewriter, DejaVu Sans Mono, Bitstream Vera Sans Mono, Liberation Mono, Nimbus Mono L, Monaco, Courier New, Courier, monospace"><br></font></span></div></div>