Closed SoftCreatR closed 11 months ago
Using checkinstall, I guess? Their contents didn't change, so I have no explanation for this behavior. Maybe I can try reproducing this, later this day.
thanks for looking into it. the Dockerfile is here. The basic logic is:
ARG BASE_IMAGE=ubuntu:20.04
FROM ${BASE_IMAGE}
ARG t=/tmp/imei.sh # $(mktemp)
ARG p="--use-checkinstall --build-only --skip-aom --skip-jpeg-xl"
RUN wget 'https://dist.1-2.dev/imei.sh' -qO "$t"
RUN --mount=type=cache,target=/var/cache/apt bash "$t" $p || true && ls -l /usr/local/src/ || true
I wasn't expecting such weird error either, maybe I'll make it multi-stage build
.deb
in on layer.deb
into another layerThe built .deb
files are:
maybe I'll make it multi-stage build
Done, but haven't get a chance to test it yet...
The Dockerfile tested fine by itself 🤦🏻♂️🤦🏻♂️🤦🏻♂️
Yet I installed the built packages to my VPS and it is error with Illegal instruction (core dumped)
again
The newly built package (tested fine within docker) is at https://dl.cloudsmith.io/public/suntong/repo/deb/any-distro/pool/any-version/main/i/im/imei-imagemagick_7.1.1-15-imei6.10.1/imei-imagemagick_7.1.1-15-imei6.10.1_amd64.deb
$ docker run -it ubuntu:20.04
root@870aa41f0c2e:/#
root@870aa41f0c2e:/# uname -a
Linux 870aa41f0c2e 5.15.0-1041-azure #48-Ubuntu SMP Tue Jun 20 20:34:08 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
my VPS: Linux 5.15.0-82-generic #91-Ubuntu SMP Mon Aug 14 14:14:14 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
BTW,
I'll make it multi-stage build
- build the
.deb
in on layer- and copy the built
.deb
into another layer- and do the installation & verification there.
I found from this way that the libxml2
is missing from the imei-imagemagick dependencies.
The Dockerfile tested fine by itself 🤦🏻♂️🤦🏻♂️🤦🏻♂️ Yet I installed the built packages to my VPS and it is error with
Illegal instruction (core dumped)
again
Building using docker image ubuntu:20.04
, I found that the built packages cannot be used in other machines, but only to the built machine itself --
This is so strange, and this is the first time that I ever see such behaviour. And I tried to think hard what I had done differently when building 7.1.1-15-imei6.9.0
, and I really cannot recall any differences now. Yet that package works in both my VPS and my Debian.
Would you be able to identify where the Illegal instruction come please?
It's mentioned in the readme since Checkinstall support was introduced, that this can be problematic. Especially, because it's been kind of abandoned.
OK. I'm on my own. I'll see if I can get to the bottom of it. . .
I tried to ask the question in the Debian package building community, started with:
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.
and ended with a question:
With current cloud-compiling approaches, how should we make sure that the built package works for the older x86_64 CPUs possible
I think it is a legitimate question, and the Debian community would generally benefit from an alternative source for the latest ImageMagick package, but I have just forgotten how unhelpful that mlist had been, and this time it is no exception at all. The most vocal person is also the most narrow-minded person who frowns upon all non-traditional ways of package building, and checkinstall especially, so he completely shut me off, and not even allowing other people to help at all. And indeed, I waited for a week and no one helped.
I was trying to seek a way to build the latest ImageMagick package for the general public, but now I don't care anymore. As long as I can build for myself, I'm happy, who cares the other people.
This issue can be closed now.
I'm having same issue. But I'm not using checkinstall. Issue happens only when running my container in AWS ECS ...
I have no idea how to debug this any further so I'm going back to compiling things myself
Could you please try executing imei.sh with
--build-cflags="-O0" --build-cxxflags="-O0"
Could you please try executing imei.sh with . . .
BRAVO!!!
It works!!!
Building using docker image
ubuntu:20.04
, I found that the built packages cannot be used in other machines, but only to the built machine itself --
- I tried to build with two cloud providers, and none of the the built packages can be used in my VPS.
- I then build in my VPS and the the built packages can be used in my VPS (ubuntu:22.04).
- however, it cannot be used in my Debian.
So I repeated above with the new flags, I.e.,
Building using docker image ubuntu:20.04
in cloud provider, and tried to run the built binary in my VPS, then tried them in my Debian, BOTH case OK!!
$ identify --version && convert -version && magick -version
Version: ImageMagick 7.1.1-20 Q16-HDRI x86_64 2cfa8d113:20231008 https://imagemagick.org
Copyright: (C) 1999 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenMP(4.5)
Delegates (built-in): bzlib cairo djvu fftw fontconfig freetype gslib gvc jbig jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png ps raqm raw rsvg tiff webp wmf x xml zip zlib
Compiler: gcc (9.4)
Version: ImageMagick 7.1.1-20 Q16-HDRI x86_64 2cfa8d113:20231008 https://imagemagick.org
Copyright: (C) 1999 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenMP(4.5)
Delegates (built-in): bzlib cairo djvu fftw fontconfig freetype gslib gvc jbig jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png ps raqm raw rsvg tiff webp wmf x xml zip zlib
Compiler: gcc (9.4)
Version: ImageMagick 7.1.1-20 Q16-HDRI x86_64 2cfa8d113:20231008 https://imagemagick.org
Copyright: (C) 1999 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenMP(4.5)
Delegates (built-in): bzlib cairo djvu fftw fontconfig freetype gslib gvc jbig jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png ps raqm raw rsvg tiff webp wmf x xml zip zlib
Compiler: gcc (9.4)
This issue can be closed. Finally!
Thanks for getting to the bottom of it eventually! Cheers!
My (heavily stripped) pre-built binary that have proven to be working under both ubuntu:22.04 and Debian GNU/Linux 12 (bookworm) is available at imei-imagemagick_7.1.1-20-imei6.10.3_amd64.deb BTW, FTA.
To use it directly from repo, check out here.
Could you eventually test this as well?
--build-cflags="-O3 -mtune=generic" --build-cxxflags="-O3 -mtune=generic"
Fixed via 73b4e3738ab11f4f5623e34e365bb7a8859afd96
OK, so I gave it a try, but there something wrong with the https://dist.1-2.dev/imei.sh script. I've tried several times, and every time I'm getting Signature verification failed!
t=/tmp/imei.sh
wget 'https://dist.1-2.dev/imei.sh' -qO "$t"
$ grep '^# Version *: ' "$t"
# Version : 6.10.4
$ sudo bash "$t"
Signature verification failed! (2)
Please check /var/log/imei-1697582110.log for details.
$ cat /var/log/imei-1697582110.log
Verification Failure
Please double check.
That's strange. I'll check that later. Until then, use --dev
Yeah, downloading directly from https://raw.githubusercontent.com/SoftCreatR/imei/main/imei.sh gives the same error as well.
And yes, --dev
was able to make me going.
Could you eventually test this as well?
--build-cflags="-O3 -mtune=generic" --build-cxxflags="-O3 -mtune=generic"
Since the fix 73b4e37 set them as default, so I directly test calling imei.sh
without any the above build cflags, and my 7.1.1-20-imei6.10.4 tested fine, FYI.
So all good.
Yeah, downloading directly from https://raw.githubusercontent.com/SoftCreatR/imei/main/imei.sh gives the same error as well.
And yes, --dev was able to make me going.
There was a bug in the workflow, that is supposed to automatically create a new release. It used an old signature file, when creating the release. I've (hopefully) fixed that, and rebased everything to 12a1d85d085a5895befa580aed46b797cff20796, so that the new 6.10.4 should be correct.
so that the new 6.10.4 should be correct.
Yes! verified just now.
Tested under Ubuntu 22.04.2 LTS.
If you want, I can post the links to my built packages so that you can take a look / try at your side as well.
Originally posted by @suntong in https://github.com/SoftCreatR/imei/issues/92#issuecomment-1703997596