Re: Q16 compile for the general CPU, and Illegal instruction

2023-09-04 Thread Andrey Rakhmatullin
On Mon, Sep 04, 2023 at 10:33:12AM -0400, Tong Sun wrote:
> With current cloud-compiling approaches, how should we make sure that
> the built package works for the older x86_64 CPUs possible, and especially
> about this Q16 compilation for ImageMagick?
> 
> PS, the compilation is done via https://github.com/SoftCreatR/imei/.
If it's not related to Debian packaging it shouldn't be on d-mentors@.



Q16 compile for the general CPU, and Illegal instruction

2023-09-04 Thread Tong Sun
Hi,

The ImageMagick has stayed in V6 for too long and I tried to compile its V7
myself to see what the problem might be, and indeed I found a big problem
-- I got "Illegal instruction" when I tried to install the built package
elsewhere.

At first it is almost like *"the built packages cannot be used in other
machines, but only to the built machine itself"*,  and it took me quite a
while to get to the bottom of it.

In summary,


   - I tried to build with two cloud providers, and none of the built
   packages can be used in my VPS.
   - I then build in my VPS and the built packages can be used in my VPS
   (ubuntu:22.04).
   - however, it cannot be used in my Debian.


I now believe the "Illegal instruction" is because of not the distro but
the CPU instruction set the compiler decided to use, based on the CPU of
the machine.

It turns out that my Debian has the oldest CPU and least CPU flags, and
the package built there can be used anywhere else.

So here comes my question,

With current cloud-compiling approaches, how should we make sure that
the built package works for the older x86_64 CPUs possible, and especially
about this Q16 compilation for ImageMagick?

PS, the compilation is done via https://github.com/SoftCreatR/imei/.

thanks