You are not logged in.
Hi there,
I'm trying to use Pywal (python-pywal) to change i3's colors dynamically.
Unfortunately, I get the following errors:
wal -i ~/Images/Wallpapers/tropics_beach_palm_trees_sink_90647_2560x1080.jpg
[I] image: Using image tropics_beach_palm_trees_sink_90647_2560x1080.jpg.
[I] colors: Generating a colorscheme.
[I] colors: Using wal backend.
Error: 4 unsupported relocations
Error: 4 unsupported relocations
Error: 4 unsupported relocations
Error: 4 unsupported relocations
Error: 4 unsupported relocations
Traceback (most recent call last):
File "/usr/bin/wal", line 11, in <module>
load_entry_point('pywal==3.1.0', 'console_scripts', 'wal')()
File "/usr/lib/python3.7/site-packages/pywal/__main__.py", line 198, in main
parse_args(parser)
File "/usr/lib/python3.7/site-packages/pywal/__main__.py", line 154, in parse_args
sat=args.saturate)
File "/usr/lib/python3.7/site-packages/pywal/colors.py", line 149, in get
colors = getattr(backend, "get")(img, light)
File "/usr/lib/python3.7/site-packages/pywal/backends/wal.py", line 77, in get
colors = gen_colors(img)
File "/usr/lib/python3.7/site-packages/pywal/backends/wal.py", line 38, in gen_colors
raw_colors = imagemagick(20, img, has_im())
File "/usr/lib/python3.7/site-packages/pywal/backends/wal.py", line 19, in imagemagick
return subprocess.check_output([*magick_command, img, *flags]).splitlines()
File "/usr/lib/python3.7/subprocess.py", line 376, in check_output
**kwargs).stdout
File "/usr/lib/python3.7/subprocess.py", line 468, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['magick', 'convert', '~/Images/Wallpapers/tropics_beach_palm_trees_sink_90647_2560x1080.jpg[0]', '-resize', '25%', '-colors', '20', '-unique-colors', 'txt:-']'
Could anyone help me with that?
Many thanks,
Offline
subprocess.CalledProcessError: Command '['magick', 'convert', '~/Images/Wallpapers/tropics_beach_palm_trees_sink_90647_2560x1080.jpg[0]', '-resize', '25%', '-colors', '20', '-unique-colors', 'txt:-']'
Is imagemagick installed? Try running that subprocess command manually to see what magick return as error?
Offline
subprocess.CalledProcessError: Command '['magick', 'convert', '~/Images/Wallpapers/tropics_beach_palm_trees_sink_90647_2560x1080.jpg[0]', '-resize', '25%', '-colors', '20', '-unique-colors', 'txt:-']'
Is imagemagick installed? Try running that subprocess command manually to see what magick return as error?
Hi twelveeighty,
Thanks for your message.
Yes, imagemagick 7.0.8.11-1 is installed on my machine.
I've tried to do what you said and I get:
magick convert ~/Images/Wallpapers/tropics_beach_palm_trees_sink_90647_2560x1080.jpg -resize 25% -colors 20 -unique-colors txt:- :(
Error: 4 unsupported relocations
Error: 4 unsupported relocations
Error: 4 unsupported relocations
Error: 4 unsupported relocations
Error: 4 unsupported relocations
[1] 2698 segmentation fault (core dumped) magick convert -resize 25% -colors 20 -unique-colors txt:-
Any idea?
Offline
Well, at least that narrows down the problem to either the image itself, or imagemagick, and not Pywal. Have you tried opening that image in a viewer? Is the image corrupted somehow? How about trying to run that command on a different image, do you get the same error?
Offline
Well, at least that narrows down the problem to either the image itself, or imagemagick, and not Pywal. Have you tried opening that image in a viewer? Is the image corrupted somehow? How about trying to run that command on a different image, do you get the same error?
Yes, unfortunately I get the same error whatever the image. So, the issue seems to be with imagemagick.
Can it be this issue: https://github.com/Alexpux/MINGW-packages/issues/2995 ?
Offline
I'm also having this issue - any attempt to even just resize an image via ImageMagick fails with
Error: 8 unsupported relocations
Error: 8 unsupported relocations
Error: 8 unsupported relocations
Error: 8 unsupported relocations
Error: 8 unsupported relocations
Segmentation fault (core dumped)
Here's the backtrace from gdb: https://gist.github.com/stuartpb/1f7885 … f383410dd5
Looking at the backtrace, it looks like this could actually be a bug in Mesa: I had another program fail to start earlier with GL issues, so that would make sense.
This issue on the ImageMagick forums traces back to Mesa as well.
Last edited by STUART (2018-09-25 23:33:29)
Offline
https://github.com/mesa3d/mesa/commit/9 … 3d235ad93a is the commit that prevents that shader from being executed as it contains relocations that could hang the GPU.
Offline
Thank you STUART and loqs for your precious help.
I'm behind the post on the ImageMagick forums.
And sorry for this stupid question but, how I can I implement the "commit" you mention? I don't have any such file as "src/gallium/drivers/radeonsi/si_compute.c".
Thanks,
Offline
The commit I linked to is the cause of the message you are seeing. It is already implemented in mesa 18.2.1. It prevents execution of shaders with unhandled relocations when using the radeonsi driver.
ImageMagick appears to not gracefully handling the failure and results in the segmentation fault/core dump. You could refer ImageMagick to the commit I linked from mesa.
Offline
The commit I linked to is the cause of the message you are seeing. It is already implemented in mesa 18.2.1. It prevents execution of shaders with unhandled relocations when using the radeonsi driver.
ImageMagick appears to not gracefully handling the failure and results in the segmentation fault/core dump. You could refer ImageMagick to the commit I linked from mesa.
Understood, thanks again.
Offline
Offline
Is this fixed for anyone? If you say it's fixed", do you mean ImageMagick just no longer segfaults but gives the error and fails to work properly, or do you mean it no longer segfaults gives no error and converts the image properly
I just came to the party today. All packages are up to date. Notably, ImageMagick's "fixing commit" was 41a3cc9, which is in ImageMagick 7.0.8-13-1. (I even downloaded the source from the PKGBUILD and verified, out of confusion.) I'm still getting this error:
$ convert any.image -resize '100x100' test.jpg
Error: 8 unsupported relocations
Error: 8 unsupported relocations
I reported this to ImageMagick in issue 1366, and got the response:
It looks like this error message is created by the mesa driver. I have no idea what causes this message and if there is anything what we could do to prevent this from happening.
Further testing is confusing and makes no sense to me. I have these OpenCL packages installed: intel-opencl-runtime (AUR, for Intel Core and Xeon CPUs); opencl-mesa 18.2.3-1; and opencl-amd (AUR, 18.30.641594-1 which is extracted from the amdgpu-pro driver, but leaves everything else behind, and runs on the open source amdgpu stack.) You can have multiple OpenCL packages installed and select which to use, by setting the "OCL_ICD_VENDORS" environment variable to the base name of the file in "/etc/OpenCL/vendors", so no path, and no ".icd" extension. (For some reason, opencl-amd installs both amdocl64.icd and amdocl-orca64.icd, but I don't know what the difference is between the 2 .so files they point to that come from amdgpu-pro.)
In my ImageMagick bug report, I just tried:
$ OCL_ICD_VENDORS=intel convert any.image -resize '100x100' test.jpg
$ OCL_ICD_VENDORS=amdocl64 convert any.image -resize '100x100' test.jpg
$ OCL_ICD_VENDORS=amdocl-orca64 convert any.image -resize '100x100' test.jpg
All of these ran without error, and created a correctly converted output file. I thought this just meant mesa was the problem. But, for the heck of it, just now, I tried:
$ OCL_ICD_VENDORS=mesa convert any.image -resize '100x100' test.jpg
And, what do you know, that works properly too?!?! But, leaving out the "OCL_ICD_VENDORS" variable, and it fails again. This makes me start to question if mesa is really the problem. I seem to ONLY have this failure if ImageMagick and/or ocl-icd are left to decide for themselves which OpenCL to use.
But, if I uninstall "opencl-mesa", and run without "OCL_ICD_VENDORS", it works properly. That makes me think it is definitely mesa.
Last edited by jamespharvey20 (2018-10-24 08:38:06)
Offline
STUART, also, when you said that upstream's patch fixed it, how did you run that build, and what context did you run it and the in-tree "tests/validate-convert.tap" in?
If it's built and ran only in a chroot (devtools makechrootpkg or extra-x86_64-build, or anything that uses these internally) although "opencl-headers" and "ocl-icd" will be installed, no OpenCL .icd package will be installed, so its tests would .. well, I don't know what they do if there's no usable OpenCL, but it would be testing without mesa for sure.
Offline
Hi guys,
Just to let you know: I've replaced opencl-mesa with opencl-amd and everything works fine.
Offline