diggershort / pyv8

Automatically exported from code.google.com/p/pyv8
0 stars 0 forks source link

Fails to build on ubuntu 12.04 #171

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. pip install pyv8

What is the expected output? What do you see instead?
g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions 
-Wl,-z,relro build/temp.linux-i686-2.7/src/Utils.o 
build/temp.linux-i686-2.7/src/Exception.o 
build/temp.linux-i686-2.7/src/Context.o build/temp.linux-i686-2.7/src/Engine.o 
build/temp.linux-i686-2.7/src/Wrapper.o build/temp.linux-i686-2.7/src/Debug.o 
build/temp.linux-i686-2.7/src/Locker.o build/temp.linux-i686-2.7/src/AST.o 
build/temp.linux-i686-2.7/src/PrettyPrinter.o 
build/temp.linux-i686-2.7/src/PyV8.o -L/usr/local/lib 
-L/home/dupa/lukasz/build/pyv8/build/v8/out/ia32.release/obj.target/tools/gyp/ 
-lrt -lboost_python -lboost_thread -lboost_system -lv8_base -lv8_snapshot -o 
build/lib.linux-i686-2.7/_PyV8.so

/usr/bin/ld: cannot find -lv8_base

collect2: ld returned 1 exit status

error: command 'g++' failed with exit status 1

----------------------------------------
Command /usr/bin/python -c "import 
setuptools;__file__='/home/dupa/lukasz/build/pyv8/setup.py';exec(compile(open(__
file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install 
--single-version-externally-managed --record 
/tmp/pip-sLjo_2-record/install-record.txt failed with error code 1

Original issue reported on code.google.com by theobe...@gmail.com on 22 Apr 2013 at 9:13

GoogleCodeExporter commented 8 years ago
I had this problem too, it looks like it applies only for 32-bit systems. I 
fixed this by editing setup.py line 277 and replacing 'v8_base' with 
'v8_base.ia32'. See patch in attachment.

Original comment by nsa...@gmail.com on 23 Apr 2013 at 11:54

Attachments:

GoogleCodeExporter commented 8 years ago
please verify the fix with SVN trunk code after r518, thanks

Original comment by flier...@gmail.com on 25 Apr 2013 at 2:30

GoogleCodeExporter commented 8 years ago
Since I've spent the whole day on this, here's how I can successfully build 
pyv8 on Ubuntu 12.10 LTS. The key is to build v8 first, using 'make native' 
*before* letting setup.py touch it. I'm actually integrating this into a docker 
image in case you're interested. I had these build problems on x64 and also on 
master branch - tried recompiling the whole day with different settings. At the 
end I settled for this old revision again since the 'thug' project (honeypot) 
is using them. 

export LIB=~
apt-get install -y libboost-thread-dev libboost-all-dev python-dev git-core 
autoconf libtool
svn checkout -r14110 http://v8.googlecode.com/svn/trunk/ $LIB/v8
git clone https://github.com/buffer/thug.git $LIB/thug
cd $LIB/v8 && cp ../thug/patches/V8-patch* .
cd $LIB/v8 && make dependencies
cd $LIB/v8 && make native
export V8_HOME=$LIB/v8
svn checkout -r478 http://pyv8.googlecode.com/svn/trunk/ $LIB/pyv8
cd $LIB/pyv8 && python setup.py build
cd $LIB/pyv8 && python setup.py install

Original comment by mmueller...@gmail.com on 31 Oct 2013 at 5:13