Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 597606 - www-client/phantomjs-2.0.0-r1 with python3 - .../work/phantomjs-2.0.0/src/qt/qtwebkit/Source/JavaScriptCore/disassembler/udis86/ud_opcode.py: TypeError: %x format: an integer is required, not float
Summary: www-client/phantomjs-2.0.0-r1 with python3 - .../work/phantomjs-2.0.0/src/qt/...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Tony Vroon (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-20 10:00 UTC by Alexander Sergeyev
Modified: 2017-09-22 13:39 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log.lzma (build.log.lzma,50.71 KB, application/x-lzma)
2016-10-20 10:00 UTC, Alexander Sergeyev
Details
emerge --info (emerge-info,4.00 KB, text/plain)
2016-10-20 10:02 UTC, Alexander Sergeyev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Sergeyev 2016-10-20 10:00:47 UTC
Created attachment 450796 [details]
build.log.lzma

In the build log:
<...>
Traceback (most recent call last):
  File "/var/tmp/portage/www-client/phantomjs-2.0.0-r1/work/phantomjs-2.0.0/src/qt/qtwebkit/Source/JavaScriptCore/disassembler/udis86/itab.py", line 359, in <module>
    main()
  File "/var/tmp/portage/www-client/phantomjs-2.0.0-r1/work/phantomjs-2.0.0/src/qt/qtwebkit/Source/JavaScriptCore/disassembler/udis86/itab.py", line 354, in main
    optableXmlParser.parse( args[ 0 ], generator.addInsnDef )
  File "/var/tmp/portage/www-client/phantomjs-2.0.0-r1/work/phantomjs-2.0.0/src/qt/qtwebkit/Source/JavaScriptCore/disassembler/udis86/ud_optable.py", line 83, in parse
    fn( prefixes, mnemonic, opcodes, operands, vendor )
  File "/var/tmp/portage/www-client/phantomjs-2.0.0-r1/work/phantomjs-2.0.0/src/qt/qtwebkit/Source/JavaScriptCore/disassembler/udis86/ud_opcode.py", line 217, in addInsnDef
    vendor=vendor)
  File "/var/tmp/portage/www-client/phantomjs-2.0.0-r1/work/phantomjs-2.0.0/src/qt/qtwebkit/Source/JavaScriptCore/disassembler/udis86/ud_opcode.py", line 157, in __init__
    self.opcext[arg] = self.OpcExtMap[arg](val)
  File "/var/tmp/portage/www-client/phantomjs-2.0.0-r1/work/phantomjs-2.0.0/src/qt/qtwebkit/Source/JavaScriptCore/disassembler/udis86/ud_opcode.py", line 120, in <lambda>
    '/m'     : lambda v: "%02x" % (int(v) / 32),
TypeError: %x format: an integer is required, not float
make[2]: *** [Makefile.JavaScriptCore.DerivedSources:2344: generated/udis86_itab.c] Error 1
make[2]: *** Waiting for unfinished jobs....

The problem is related to a python2 code (ud_opcode.py:120) is being interpreted by python3 (this is my default): "/" does integer division in python2, but python3 has the dedicated "//" operator to do this.
Comment 1 Alexander Sergeyev 2016-10-20 10:02:02 UTC
Created attachment 450798 [details]
emerge --info
Comment 2 Alexander Sergeyev 2016-10-20 10:19:26 UTC
Direct dependencies versions and USE-flags:

app-arch/unzip-6.0_p20 unicode -bzip2 -natspec
dev-lang/ruby-2.2.5 readline ssl -berkdb -debug -doc -examples -gdbm -ipv6 -jemalloc -libressl -ncurses -rdoc -rubytests -socks5 -tk -xemacs
dev-libs/icu-57.1 -debug -doc -examples -static-libs ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="64 -32 -x32"
dev-libs/openssl-1.0.2j asm zlib -bindist -gmp -kerberos -rfc3779 -sctp -sslv2 -sslv3 -static-libs -test -tls-heartbeat -vanilla ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="64 -32 -x32" CPU_FLAGS_X86="sse2"
media-libs/fontconfig-2.12.1 -doc -static-libs ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="64 -32 -x32"
media-libs/freetype-2.7-r2 X adobe-cff bzip2 cleartype_hinting harfbuzz infinality png -bindist -debug -doc -fontforge -static-libs -utils ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="64 -32 -x32"
media-libs/gst-plugins-base-1.8.3 alsa ogg opus theora vorbis -X -introspection -ivorbis -nls -orc -pango ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="64 -32 -x32"
media-libs/gstreamer-1.8.3 caps -introspection -nls -orc -test ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="64 -32 -x32"
media-libs/libpng-1.6.25 apng -neon -static-libs ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="64 -32 -x32"
net-misc/openssh-7.3_p1-r7 hpn pam pie ssl -X -X509 -bindist -debug -kerberos -ldap -ldns -libedit -libressl -livecd -sctp -selinux -skey -ssh1 -static -test KERNEL="linux"
virtual/jpeg-0-r2 -static-libs ABI_MIPS="-n32 -n64 -o32" ABI_X86="64 -32 -x32"
virtual/jpeg-62 ABI_MIPS="-n32 -n64 -o32" ABI_X86="64 -32 -x32"
virtual/pkgconfig-0-r1 ABI_MIPS="-n32 -n64 -o32" ABI_X86="64 -32 -x32"
virtual/rubygems-11 ELIBC="-FreeBSD" RUBY_TARGETS="ruby22 -rbx -ruby19 -ruby20 -ruby21 -ruby23"
Comment 3 neumond 2017-05-24 23:14:13 UTC
Affects me too. Ebuilds 1.9.8 and 2.0.0-r1 fail similarly. Default system python is 3.5.
Comment 4 Pacho Ramos gentoo-dev 2017-09-19 15:47:17 UTC
Please test again with 2.1.1 version
Comment 5 Alexander Sergeyev 2017-09-22 13:39:03 UTC
> Please test again with 2.1.1 version

Works for me. Thank you!