<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 3 July 2017 at 11:16, Meide Zhao <span dir="ltr"><<a href="mailto:zhao.meide@gmail.com" target="_blank">zhao.meide@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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></blockquote><div><br><div style="font-family:courier new,monospace" class="gmail_default">Hi! 12.04 reached End Of Life at the end of April. It has GCC 4.6.3 so I'm not surprised pypy isn't building on it.<br><br></div><div style="font-family:courier new,monospace" class="gmail_default">At a minimum you'll need a more recent GCC, but it would probably be best to update to an LTS version that still has support.<br></div><br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><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="m_4131416949978921494gmail-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="m_4131416949978921494gmail-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="m_4131416949978921494gmail-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="m_4131416949978921494gmail-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="m_4131416949978921494gmail-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="m_4131416949978921494gmail-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="m_4131416949978921494gmail-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="m_4131416949978921494gmail-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="m_4131416949978921494gmail-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="m_4131416949978921494gmail-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="m_4131416949978921494gmail-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="m_4131416949978921494gmail-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="m_4131416949978921494gmail-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="m_4131416949978921494gmail-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="m_4131416949978921494gmail-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="m_4131416949978921494gmail-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="m_4131416949978921494gmail-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/<wbr>rpython/rlib/rvmprof/src -I/home/meide/pypy/pypy/<wbr>rpython/rlib/rvmprof/src/<wbr>shared -I/home/meide/pypy/pypy/<wbr>rpython/rlib/rvmprof/src/<wbr>shared/libbacktrace /home/meide/pypy/pypy/rpython/<wbr>rlib/rvmprof/src/shared/<wbr>libbacktrace/elf.c -o /tmp/usession-default-0/<wbr>rpython/rlib/rvmprof/src/<wbr>shared/libbacktrace/elf.o
[translation:info] Error:
File "/home/meide/pypy/pypy/<wbr>rpython/translator/goal/<wbr>translate.py", line 284, in main
default_goal='compile')
File "/home/meide/pypy/pypy/<wbr>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/<wbr>tool/option.py", line 35, in make_objspace
return Space(config)
File "/home/meide/pypy/pypy/pypy/<wbr>interpreter/baseobjspace.py", line 441, in __init__
self.initialize()
File "/home/meide/pypy/pypy/pypy/<wbr>objspace/std/objspace.py", line 105, in initialize
self.make_builtins()
File "/home/meide/pypy/pypy/pypy/<wbr>interpreter/baseobjspace.py", line 637, in make_builtins
self.install_mixedmodule(<wbr>mixedname, installed_builtin_modules)
File "/home/meide/pypy/pypy/pypy/<wbr>interpreter/baseobjspace.py", line 668, in install_mixedmodule
modname = self.setbuiltinmodule(<wbr>mixedname)
File "/home/meide/pypy/pypy/pypy/<wbr>interpreter/baseobjspace.py", line 507, in setbuiltinmodule
None, None, ["Module"]).Module
File "/home/meide/pypy/pypy/pypy/<wbr>module/_vmprof/__init__.py", line 30, in <module>
import pypy.module._vmprof.interp_<wbr>vmprof
File "/home/meide/pypy/pypy/pypy/<wbr>module/_vmprof/interp_vmprof.<wbr>py", line 14, in <module>
my_execute_frame = _decorator(PyFrame.execute_<wbr>frame)
File "/home/meide/pypy/pypy/<wbr>rpython/rlib/rvmprof/rvmprof.<wbr>py", line 196, in decorate
_get_vmprof()
File "/home/meide/pypy/pypy/<wbr>rpython/rlib/rvmprof/rvmprof.<wbr>py", line 243, in _get_vmprof
_vmprof_instance = VMProf()
File "/home/meide/pypy/pypy/<wbr>rpython/rlib/rvmprof/rvmprof.<wbr>py", line 49, in __init__
self.cintf = cintf.setup()
File "/home/meide/pypy/pypy/<wbr>rpython/rlib/rvmprof/cintf.py"<wbr>, line 82, in setup
**eci_kwds))
File "/home/meide/pypy/pypy/<wbr>rpython/rtyper/tool/rffi_<wbr>platform.py", line 94, in verify_eci
configure(CConfig)
File "/home/meide/pypy/pypy/<wbr>rpython/rtyper/tool/rffi_<wbr>platform.py", line 223, in configure
res[key] = value.question(writer.ask_gcc)
File "/home/meide/pypy/pypy/<wbr>rpython/rtyper/tool/rffi_<wbr>platform.py", line 555, in question
ask_gcc("")
File "/home/meide/pypy/pypy/<wbr>rpython/rtyper/tool/rffi_<wbr>platform.py", line 191, in ask_gcc
try_compile_cache([self.path], self.eci)
File "/home/meide/pypy/pypy/<wbr>rpython/tool/gcc_cache.py", line 71, in try_compile_cache
platform.compile(c_files, eci)
File "/home/meide/pypy/pypy/<wbr>rpython/translator/platform/__<wbr>init__.py", line 54, in compile
ofiles = self._compile_o_files(cfiles, eci, standalone)
File "/home/meide/pypy/pypy/<wbr>rpython/translator/platform/__<wbr>init__.py", line 76, in _compile_o_files
ofiles.append(self._compile_c_<wbr>file(self.cc, cfile, compile_args))
File "/home/meide/pypy/pypy/<wbr>rpython/translator/platform/<wbr>posix.py", line 41, in _compile_c_file
cwd=str(cfile.dirpath()))
File "/home/meide/pypy/pypy/<wbr>rpython/translator/platform/__<wbr>init__.py", line 140, in _execute_c_compiler
self._handle_error(returncode, stdout, stderr, outname)
File "/home/meide/pypy/pypy/<wbr>rpython/translator/platform/__<wbr>init__.py", line 152, in _handle_error
raise CompilationError(stdout, stderr)
[translation:ERROR] CompilationError: CompilationError(err="""
/home/meide/pypy/pypy/rpython/<wbr>rlib/rvmprof/src/shared/<wbr>libbacktrace/elf.c: In function ‘elf_add_syminfo_data’:
/home/meide/pypy/pypy/rpython/<wbr>rlib/rvmprof/src/shared/<wbr>libbacktrace/elf.c:448:8: warning: implicit declaration of function ‘__atomic_load_n’ [-Wimplicit-function-<wbr>declaration]
/home/meide/pypy/pypy/rpython/<wbr>rlib/rvmprof/src/shared/<wbr>libbacktrace/elf.c:448:12: error: ‘__ATOMIC_ACQUIRE’ undeclared (first use in this function)
/home/meide/pypy/pypy/rpython/<wbr>rlib/rvmprof/src/shared/<wbr>libbacktrace/elf.c:448:12: note: each undeclared identifier is reported only once for each function it appears in
/home/meide/pypy/pypy/rpython/<wbr>rlib/rvmprof/src/shared/<wbr>libbacktrace/elf.c: In function ‘elf_syminfo’:
/home/meide/pypy/pypy/rpython/<wbr>rlib/rvmprof/src/shared/<wbr>libbacktrace/elf.c:493:12: error: ‘__ATOMIC_ACQUIRE’ undeclared (first use in this function)
/home/meide/pypy/pypy/rpython/<wbr>rlib/rvmprof/src/shared/<wbr>libbacktrace/elf.c: In function ‘backtrace_initialize’:
/home/meide/pypy/pypy/rpython/<wbr>rlib/rvmprof/src/shared/<wbr>libbacktrace/elf.c:958:2: warning: implicit declaration of function ‘__atomic_store_n’ [-Wimplicit-function-<wbr>declaration]
/home/meide/pypy/pypy/rpython/<wbr>rlib/rvmprof/src/shared/<wbr>libbacktrace/elf.c:958:2: error: ‘__ATOMIC_RELEASE’ undeclared (first use in this function)
/home/meide/pypy/pypy/rpython/<wbr>rlib/rvmprof/src/shared/<wbr>libbacktrace/elf.c:973:20: error: ‘__ATOMIC_ACQUIRE’ undeclared (first use in this function)
""")
[translation] start debugger...
> /home/meide/pypy/pypy/rpython/<wbr>translator/platform/__init__.<wbr>py(152)_handle_error()
-> raise CompilationError(stdout, stderr)
(Pdb+)
</font></span></pre></div><div><span class="m_4131416949978921494gmail-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="m_4131416949978921494gmail-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>
<br>______________________________<wbr>_________________<br>
pypy-dev mailing list<br>
<a href="mailto:pypy-dev@python.org">pypy-dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/pypy-dev" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/pypy-dev</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">William Leslie<br><br>Notice:<br>Likely much of this email is, by the nature of copyright, covered under copyright law. You absolutely MAY reproduce any part of it in accordance with the copyright law of the nation you are reading this in. Any attempt to DENY YOU THOSE RIGHTS would be illegal without prior contractual agreement.</div>
</div></div>