Mailing List Archive

No-multilib media-libs/opencv-4.5.0 fails to install
At some point in the install stage emerge tries to remove some python modules
and fails:

==============
rm: cannot remove 'modules/python3': No such file or directory
=======================================


Half way it complains about CPU optimisations:
==============================================
RuntimeError: NumPy was built with baseline optimizations:
(SSE SSE2 SSE3 SSSE3 SSE41 POPCNT SSE42) but your machine doesn't support:
(POPCNT).
=========

I've rebuilt numpy, but it made no difference.

In any case it continues beyond that point, only to fail at the tail end. Log
attached.

Any idea what's wrong and how to move beyond this blocker?
Re: No-multilib media-libs/opencv-4.5.0 fails to install [ In reply to ]
Michael,

On Thursday, 2021-05-06 19:25:11 +0100, you wrote:

> ...
> Half way it complains about CPU optimisations:
> ==============================================
> RuntimeError: NumPy was built with baseline optimizations:
> (SSE SSE2 SSE3 SSSE3 SSE41 POPCNT SSE42) but your machine doesn't support:
> (POPCNT).
> =========

To avoid this in the future you could once run

# cd /etc/portage
# cpuid2cpuflags | sed -Ee 's/_[^_]+: /="/' -e 's/$/"/' >> make.conf

Sincerely,
Rainer
Re: No-multilib media-libs/opencv-4.5.0 fails to install [ In reply to ]
Thanks Rainer,

On Friday, 7 May 2021 15:19:45 BST Dr Rainer Woitok wrote:
> Michael,
>
> On Thursday, 2021-05-06 19:25:11 +0100, you wrote:
> > ...
> > Half way it complains about CPU optimisations:
> > ==============================================
> > RuntimeError: NumPy was built with baseline optimizations:
> > (SSE SSE2 SSE3 SSSE3 SSE41 POPCNT SSE42) but your machine doesn't support:
> > (POPCNT).
> > =========
>
> To avoid this in the future you could once run
>
> # cd /etc/portage
> # cpuid2cpuflags | sed -Ee 's/_[^_]+: /="/' -e 's/$/"/' >> make.conf
>
> Sincerely,
> Rainer

The CPU_FLAGS_X86 on this system were already set to the output of the
cpuid2cpuflags command. I'm not sure the baseline optimisations emerge warns
about are causing the error at the end of the install stage.
Re: No-multilib media-libs/opencv-4.5.0 fails to install [ In reply to ]
On Thursday, 6 May 2021 19:25:11 BST you wrote:
> At some point in the install stage emerge tries to remove some python
> modules and fails:
>
> ==============
> rm: cannot remove 'modules/python3': No such file or directory
> =======================================
>
>
> Half way it complains about CPU optimisations:
> ==============================================
> RuntimeError: NumPy was built with baseline optimizations:
> (SSE SSE2 SSE3 SSSE3 SSE41 POPCNT SSE42) but your machine doesn't support:
> (POPCNT).
> =========
>
> I've rebuilt numpy, but it made no difference.
>
> In any case it continues beyond that point, only to fail at the tail end.
> Log attached.
>
> Any idea what's wrong and how to move beyond this blocker?

I decided to apply an ugly hack as a workaround, to allow me to install
opencv. Bug report here:

https://bugs.gentoo.org/788712