Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Python Emerge Error, after emerge -c @world per eselec news
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
txykumat
Tux's lil' helper
Tux's lil' helper


Joined: 24 Nov 2014
Posts: 104

PostPosted: Mon Dec 18, 2017 5:27 pm    Post subject: Python Emerge Error, after emerge -c @world per eselec news Reply with quote

Code:
>>> Failed to emerge dev-python/pbr-3.1.1, Log file:

>>>  '/tmp/portage/dev-python/pbr-3.1.1/temp/build.log'

 * Messages for package dev-python/pbr-3.1.1:

 * ERROR: dev-python/pbr-3.1.1::gentoo failed (compile phase):
 *   (no error message)
 *
 * Call stack:
 *     ebuild.sh, line  124:  Called src_compile
 *   environment, line 2681:  Called distutils-r1_src_compile
 *   environment, line  801:  Called _distutils-r1_run_foreach_impl 'distutils-r1_python_compile'
 *   environment, line  316:  Called python_foreach_impl 'distutils-r1_run_phase' 'distutils-r1_python_compile'
 *   environment, line 2209:  Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_compile'
 *   environment, line 1515:  Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_compile'
 *   environment, line 1513:  Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'distutils-r1_python_compile'
 *   environment, line  531:  Called distutils-r1_run_phase 'distutils-r1_python_compile'
 *   environment, line  792:  Called distutils-r1_python_compile
 *   environment, line  667:  Called esetup.py 'build'
 *   environment, line 1060:  Called die
 * The specific snippet of code:
 *       "${@}" || die "${die_args[@]}";


Code:
emerge --info '=dev-python/pbr-3.1.1::gentoo'
--> https://pastebin.com/bTAThp9Q

Code:
southern ~ # emerge -pqv '=dev-python/pbr-3.1.1::gentoo'
[ebuild   R   ] dev-python/pbr-3.1.1  USE="{-test}" PYTHON_TARGETS="python2_7 python3_4 python3_5* (-pypy) (-pypy3) -python3_6"


Code:
nano /tmp/portage/dev-python/pbr-3.1.1/work/pbr-3.1.1
--> https://pastebin.com/3gCsDtbG

Then it says,

Code:
"* Working directory: '/tmp/portage/dev-python/pbr-3.1.1/work/pbr-3.1.1'
 * S: '/tmp/portage/dev-python/pbr-3.1.1/work/pbr-3.1.1"
Back to top
View user's profile Send private message
ct85711
Veteran
Veteran


Joined: 27 Sep 2005
Posts: 1791

PostPosted: Mon Dec 18, 2017 5:56 pm    Post subject: Reply with quote

Code:
 File "/usr/lib64/python2.7/site-packages/sphinx/util/tags.py", line 11, in <module>
    from jinja2 import nodes
ImportError: No module named jinja2


Well, this is indicating it is needing dev-python/jinja installed... Considering it is trying to use it for python2.7, you need to make sure it has 2.7 support for python_targets (probably will need the same python_targets as pbr has).
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30915
Location: here

PostPosted: Mon Dec 18, 2017 6:07 pm    Post subject: Reply with quote

But pbr not require dev-python/jinja.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
ct85711
Veteran
Veteran


Joined: 27 Sep 2005
Posts: 1791

PostPosted: Mon Dec 18, 2017 7:03 pm    Post subject: Reply with quote

While pbr doesn't directly require jinja, pbr does require sphinx that does require jinja. So in a fashion, pbr does require jinja as a indirect dependency.
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30915
Location: here

PostPosted: Mon Dec 18, 2017 7:14 pm    Post subject: Reply with quote

ct85711 wrote:
While pbr doesn't directly require jinja, pbr does require sphinx that does require jinja. So in a fashion, pbr does require jinja as a indirect dependency.

I get more confused:
Code:
# qlist -Iv dev-python/sphinx
# emerge -pvq pbr
[ebuild  N    ] dev-python/pbr-3.1.1  USE="{-test}" PYTHON_TARGETS="python2_7 python3_5 (-pypy) (-pypy3) -python3_4 -python3_6"

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
ct85711
Veteran
Veteran


Joined: 27 Sep 2005
Posts: 1791

PostPosted: Tue Dec 19, 2017 1:28 am    Post subject: Reply with quote

Looking at pbr's ebuild closer, I am slightly wrong. While pbr does have a dependency on sphinx, it is gated through the test USE flag. I apologize on my mistake. Either way, you look at the error message from python that was posted in the build.log...

Code:
>>> Compiling source in /tmp/portage/dev-python/pbr-3.1.1/work/pbr-3.1.1 ...
 ^[[32;01m*^[[0m python2_7: running distutils-r1_run_phase distutils-r1_python_compile
/usr/bin/python2.7 setup.py build
Traceback (most recent call last):
  File "setup.py", line 22, in <module>
    **util.cfg_to_args())
  File "/tmp/portage/dev-python/pbr-3.1.1/work/pbr-3.1.1/pbr/util.py", line 267, in cfg_to_args
    wrap_commands(kwargs)
  File "/tmp/portage/dev-python/pbr-3.1.1/work/pbr-3.1.1/pbr/util.py", line 569, in wrap_commands
    cmdclass = ep.resolve()
  File "/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 2428, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/lib64/python2.7/site-packages/sphinx/setup_command.py", line 23, in <module>
    from sphinx.application import Sphinx
  File "/usr/lib64/python2.7/site-packages/sphinx/application.py", line 43, in <module>
    from sphinx.util.tags import Tags
  File "/usr/lib64/python2.7/site-packages/sphinx/util/tags.py", line 11, in <module>
    from jinja2 import nodes
ImportError: No module named jinja2


You can see it imported Sphinx to use, and then tries to load jinja2 at the bottom. Now, it can very well be an issue where the ebuild's dependency is wrong, and/or that package is pulling in extra packages that it sees on the system.
As it is, on my system I do have sphinx and jinja installed as a dependency for another package while pbr is not installed. So I am not able to test right now, without intentionally breaking my system, putting it in a inconsitant situation.

As it is, this is strange that sphinx loaded fine without a problem where jinja did not. The is specially important in that sphinx has a direct dependency on jinja.
sphinx-1.2.2-r1 ebuild (oldest version available in the tree)
Code:
# Split the jinja dep to allow different slots to satisfy it
RDEPEND="
   <dev-python/docutils-0.13[${PYTHON_USEDEP}]
   >=dev-python/jinja-2.3[${PYTHON_USEDEP}]
   >=dev-python/pygments-1.2[${PYTHON_USEDEP}]
   dev-python/setuptools[${PYTHON_USEDEP}]
   latex? (
      dev-texlive/texlive-latexextra
      app-text/dvipng
   )"
DEPEND="${DEPEND}
   test? ( dev-python/nose[${PYTHON_USEDEP}] )"
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum