cschwan / sage-on-gentoo

(Unofficial) Gentoo Overlay for Sage- and Sage-related ebuilds
84 stars 26 forks source link

=sci-mathematics/sage-7.1 fails to build -- Internal compiler error: 'cysignals/signals.pxi' not found #414

Closed houseofsuns closed 8 years ago

houseofsuns commented 8 years ago

On my hardened ~amd64 machine I see the following build error. I checked, that cysignals is installed with python2.7 enabled. Any ideas, what's wrong?

 * 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 604, in 
    run_cythonize()
  File "setup.py", line 596, in run_cythonize
    'profile': profile,
  File "/usr/lib64/python2.7/site-packages/Cython/Build/Dependencies.py", line 758, in cythonize
    aliases=aliases)
  File "/usr/lib64/python2.7/site-packages/Cython/Build/Dependencies.py", line 664, in create_extension_list
    kwds = deps.distutils_info(file, aliases, base).values
  File "/usr/lib64/python2.7/site-packages/Cython/Build/Dependencies.py", line 564, in distutils_info
    return (self.transitive_merge(filename, self.distutils_info0, DistutilsInfo.merge)
  File "/usr/lib64/python2.7/site-packages/Cython/Build/Dependencies.py", line 574, in transitive_merge
    node, extract, merge, seen, {}, self.cimported_files)[0]
  File "/usr/lib64/python2.7/site-packages/Cython/Build/Dependencies.py", line 579, in transitive_merge_helper
    deps = extract(node)
  File "/usr/lib64/python2.7/site-packages/Cython/Build/Dependencies.py", line 555, in distutils_info0
    externs = self.cimports_and_externs(filename)[1]
  File "/usr/lib64/python2.7/site-packages/Cython/Utils.py", line 43, in wrapper
    res = cache[args] = f(self, *args)
  File "/usr/lib64/python2.7/site-packages/Cython/Build/Dependencies.py", line 465, in cimports_and_externs
    for include in self.included_files(filename):
  File "/usr/lib64/python2.7/site-packages/Cython/Utils.py", line 43, in wrapper
    res = cache[args] = f(self, *args)
  File "/usr/lib64/python2.7/site-packages/Cython/Build/Dependencies.py", line 453, in included_files
    all.update(self.included_files(include_path))
  File "/usr/lib64/python2.7/site-packages/Cython/Utils.py", line 43, in wrapper
    res = cache[args] = f(self, *args)
  File "/usr/lib64/python2.7/site-packages/Cython/Build/Dependencies.py", line 448, in included_files
    include_path = self.context.find_include_file(include, None)
  File "/usr/lib64/python2.7/site-packages/Cython/Compiler/Main.py", line 274, in find_include_file
    error(pos, "'%s' not found" % filename)
  File "/usr/lib64/python2.7/site-packages/Cython/Compiler/Errors.py", line 177, in error
    raise InternalError(message)
InternalError: Internal compiler error: 'cysignals/signals.pxi' not found
************************************************************************
kiwifb commented 8 years ago

Version of cython?

houseofsuns commented 8 years ago

cython-0.23.5 from the main tree.

kiwifb commented 8 years ago

You need to switch to the version in overlay.

houseofsuns commented 8 years ago

Switching to the overlay version of cython solved the issue.

WPettersson commented 8 years ago

Is there a reason this isn't handled by the overlay, either through forced dependency on a specific cython version or USE flag, or simply masking dev-python::gentoo? I've manually done the latter for now, but it seems like something the overlay should handle.

kiwifb commented 8 years ago

In theory cython from the overlay should mask the version from the main tree. I am guessing the issue is that you are ~arch to start with and you already had this particular version installed from the main tree.

Yes I probably should get a package.mask, on the other hand I am expecting the people on ~arch to be a bit more pro-active when they break stuff in their install - it ain't arch.

WPettersson commented 8 years ago

I'm not ~arch in general, although there are a few specific packages I do keyword so I did look into my own setup first. However, until tonight, I had cython-0.23.4-r2 from sage-on-gentoo installed. cython-0.23.5 was introduced to the gentoo tree, keyworded ~arch, on 31st of March.

sage-on-gentoo, in packages.keyword/sage, lists

>=dev-python/cython-0.23.2-r1

and I'm pretty sure that's what caused my install to pull in cython-0.23.5 tonight. Wouldn't this unmask cython from any repo? Maybe this should be >=dev-python/cython-0.23.2-r1::gentoo ?

From my /etc/portage/

# pwd
/etc/portage
 # grep -R cython .
./package.keywords/sage:>=dev-python/cython-0.23.2-r1
./package.use/sage:dev-python/cython           -numpy
./package.mask/sage-temp:dev-python/cython::gentoo

Both package.keywords/sage and package.use/sage are symlinks to the sage-on-gentoo repo and package.mask/sage-temp is my fix to mask cython from the gentoo tree (so the sage-on-gentoo version is pulled in). I can't see anything else which would keyword ~arch on cython in here.

kiwifb commented 8 years ago

OK. But why the main tree was installed instead of the overlay version is a bit of a mystery to me.

WPettersson commented 8 years ago

Main tree has a higher version number? 0.23.5 over 0.23.4-r2. I don't see anything that would make portage prefer the overlay version of cython if it has a lower version number.

kiwifb commented 8 years ago

That's because you should synchronize your overlay at the same time as the tree before running emerge -u I had a matching 0.23.5 a few hours after the main tree - 18 days ago.

WPettersson commented 8 years ago

Oh, right, yeah, I'm an idiot, sorry. I assumed that my eix-sync had also pulled in overlay updates, but apparently it hadn't. Sorry for the confusion. Now to work out why eix-sync wasn't doing layman updates.

kiwifb commented 8 years ago

Not an idiot, that's a fair problem but out of my realm.

houseofsuns commented 8 years ago

Maybe the overlay could simply stay one revision ahead of the main tree? That is bump to cython-0.23.5-r1 in the overlay. This will cause some rebuilds, but guarantee that at least my case would have been resolved automatically.

kiwifb commented 8 years ago

I try to avoid that. Also it would not have solved the problem of WPettersson since his sage-on-gentoo overlay was not up to date.