Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 636172

Summary: dev-db/mongodb-3.4 fails with to build dev-util/scons-3: SyntaxError: invalid syntax
Product: Gentoo Linux Reporter: Helmut Jarausch <jarausch>
Component: Current packagesAssignee: Matthew Thode ( prometheanfire ) <prometheanfire>
Status: RESOLVED FIXED    
Severity: normal CC: hydrapolic, johannes.hirte, proxy-maint, ultrabug
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://github.com/gentoo/gentoo/pull/6141
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 635934    
Attachments: build log
emerge.info.xz

Description Helmut Jarausch 2017-11-01 16:38:59 UTC
Created attachment 501556 [details]
build log

My system uses python3.
dev-db/mongodb-3.4.9 fails to build since its scons files are all Python2.
Applying 2to3 doesn't suffice since it uses modules (like md5) which are not available under Python3

How can I force that Python2 is used (only) while dev-db/mongodb-3.4.9 is built?

emerge --info is attached (it's too long to paste here)
Comment 1 Helmut Jarausch 2017-11-01 16:39:51 UTC
Created attachment 501558 [details]
emerge.info.xz
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2017-11-01 21:08:06 UTC
Comment on attachment 501558 [details]
emerge.info.xz

Why would you compress a couple of kilobytes like that?
Comment 3 Tomáš Mózes 2017-11-02 05:35:43 UTC
This means you only have Python 3 on your system? Because even when I set the active Python slot to 3, scons uses Python 2 on my system:

# python -V
Python 3.4.6

# scons -j4 CC=x86_64-pc-linux-gnu-gcc CXX=x86_64-pc-linux-gnu-g++ --disable-warnings-as-errors --use-system-boost --use-system-pcre --use-system-snappy --use-system-stemmer --use-system-yaml --use-system-zlib --ssl core tools
scons: Reading SConscript files ...
scons version: 2.5.1
python version: 2 7 14 'final' 0
Comment 4 Tomáš Mózes 2017-11-02 10:31:35 UTC
https://github.com/gentoo/gentoo/pull/6108
Comment 5 Helmut Jarausch 2017-11-02 11:26:04 UTC
(In reply to Tomáš Mózes from comment #3)
> This means you only have Python 3 on your system? Because even when I set
> the active Python slot to 3, scons uses Python 2 on my system:
> 
> # python -V
> Python 3.4.6
> 
> # scons -j4 CC=x86_64-pc-linux-gnu-gcc CXX=x86_64-pc-linux-gnu-g++
> --disable-warnings-as-errors --use-system-boost --use-system-pcre
> --use-system-snappy --use-system-stemmer --use-system-yaml --use-system-zlib
> --ssl core tools
> scons: Reading SConscript files ...
> scons version: 2.5.1
> python version: 2 7 14 'final' 0

No, I do have Python 2.7.14 here, but Python 3.6 is my default Python version.
Comment 6 Tomáš Mózes 2017-11-02 11:40:53 UTC
(In reply to Helmut Jarausch from comment #5)
> I do have Python 2.7.14 here, but Python 3.6 is my default Python
> version.

# eselect python list
Available Python interpreters, in order of preference:
  [1]   python3.6
  [2]   python3.5
  [3]   python3.4
  [4]   python2.7

# python -V
Python 3.6.3

# emerge mongodb (same for version 3.4.9)

[ebuild   R    ] dev-db/mongodb-3.4.10::local  USE="ssl {test*} tools -debug -kerberos -libressl -mms-agent" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB

>>> Verifying ebuild manifests

>>> Running pre-merge checks for dev-db/mongodb-3.4.10

>>> Emerging (1 of 1) dev-db/mongodb-3.4.10::local
 * mongodb-src-r3.4.10.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ...       [ ok ]
>>> Unpacking source...
>>> Unpacking mongodb-src-r3.4.10.tar.gz to /var/tmp/portage/dev-db/mongodb-3.4.10/work
>>> Source unpacked in /var/tmp/portage/dev-db/mongodb-3.4.10/work
>>> Preparing source in /var/tmp/portage/dev-db/mongodb-3.4.10/work/mongodb-src-r3.4.10 ...
 * Applying mongodb-3.2.10-boost-1.62.patch ...
 [ ok ]
 * Applying mongodb-3.4.0-fix-scons.patch ...
 [ ok ]
 * Applying mongodb-3.4.6-sysmacros-include.patch ...
 [ ok ]
 * Applying mongodb-3.4.7-no-boost-check.patch ...
 [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-db/mongodb-3.4.10/work/mongodb-src-r3.4.10 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-db/mongodb-3.4.10/work/mongodb-src-r3.4.10 ...
scons -j4 CC=x86_64-pc-linux-gnu-gcc CXX=x86_64-pc-linux-gnu-g++ --disable-warnings-as-errors --use-system-boost --use-system-pcre --use-system-snappy --use-system-stemmer --use-system-yaml --use-system-zlib --ssl core tools
scons: Reading SConscript files ...
Mkdir("build/scons")
scons version: 2.5.1
python version: 2 7 14 'final' 0
...
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-11-04 13:13:52 UTC
Non-maintainer major version bump = you get to keep the pieces.
Comment 8 Johannes Hirte 2017-11-05 16:40:49 UTC
I have the same failure here. Even setting python-2.7 as system default doesn't work. It's still the same error.
Comment 9 Johannes Hirte 2017-11-05 21:18:57 UTC
The problem is scons-3.0.0, downgrading to 2.5.1 solved it.
Comment 10 Tomáš Mózes 2017-11-06 06:12:45 UTC
Ok, that seems a bit more probable. Helmut, do you also have scons-3?
Comment 11 Larry the Git Cow gentoo-dev 2017-11-21 21:16:01 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2a08929a5e1ec5c0e5f978df077c59d78dd4a22a

commit 2a08929a5e1ec5c0e5f978df077c59d78dd4a22a
Author:     Tomáš Mózes <hydrapolic@gmail.com>
AuthorDate: 2017-11-06 19:59:08 +0000
Commit:     Ultrabug <ultrabug@gentoo.org>
CommitDate: 2017-11-21 21:15:46 +0000

    dev-db/mongodb: require <dev-util/scons-3
    
    Closes: https://bugs.gentoo.org/636172

 dev-db/mongodb/mongodb-3.4.10.ebuild | 1 +
 1 file changed, 1 insertion(+)