• Q16 compile for the general CPU, and Illegal instruction

    From Tong Sun@21:1/5 to All on Mon Sep 4 16:40:01 2023
    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

    <div dir="ltr">Hi, <div><br></div><div>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 &quot;Illegal instruction&quot; when I tried to
    install the built package elsewhere. </div><div><br></div><div>At first it is almost like <i>&quot;the built packages cannot be used in other machines, but only to the built machine itself&quot;</i>,  and it took me quite a while to get to the bottom
    of it. <br></div><div><br></div><div>In summary,</div><div><br></div><ul><li>I tried to build with two cloud providers, and none of the built packages can be used in my VPS.</li><li>I then build in my VPS and the built packages can be used in my VPS (
    ubuntu:22.04).</li><li>however, it cannot be used in my Debian.</li></ul><div><br></div><div>I now believe the &quot;Illegal instruction&quot; is because of not the distro but the CPU instruction set the compiler decided to use, based on the CPU of the
    machine. </div><div><br></div><div>It turns out that my Debian has the oldest CPU and least CPU flags, and the package built there can be used anywhere else.<br></div><div><br></div><div>So here comes my question, </div><div><br></div><div>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? </div><div><br></div><div>PS, the compilation is done via <a href="
    https://github.com/SoftCreatR/imei/">https://github.com/SoftCreatR/imei/</a>.<br></div><div><br></div><div>thanks</div><div><br></div></div>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andrey Rakhmatullin@21:1/5 to Tong Sun on Mon Sep 4 17:20:01 2023
    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@.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)