Summary: | media-gfx/imagemagick - cc1: error: bad value (‘no-automagic’) for ‘-mtune=’ switch | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Red <redblade7> |
Component: | Current packages | Assignee: | Codec Project <codec> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | dilfridge, email200202, redblade7, vereecke.jan, vityokster |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | ebuild without --with-gcc-arch=no-automagic |
Description
Red
2019-02-21 01:51:47 UTC
Just a note that the westmere laptop mentioned in my original report finally bit the dust last month, and so I cannot try anything regarding this bug there. In its place is a broadwell architecture laptop, which also has the same issue with -mtune=broadwell when building media-gfx/imagemagick. I hit the same bug. Removing "-mtune" from make.conf worked as you described. > @Red
> Only changing the CFLAGS for media-gfx/imagemagick via package.env and
> /etc/portage/env has no effect. You have to remove it from the make.conf CFLAGS.
I think the problem was you didn't set the other FLAGS.
This setup worked for me.
# cat /etc/portage/package.env/package.env
media-gfx/imagemagick no-mtune
# cat /etc/portage/env/no-mtune
CFLAGS="-O2 -pipe -march=native"
CXXFLAGS="${CFLAGS}"
CPPFLAGS="${CFLAGS}"
(In reply to email200202 from comment #3) > > @Red > > Only changing the CFLAGS for media-gfx/imagemagick via package.env and > > /etc/portage/env has no effect. You have to remove it from the make.conf CFLAGS. > > I think the problem was you didn't set the other FLAGS. > > This setup worked for me. > > # cat /etc/portage/package.env/package.env > media-gfx/imagemagick no-mtune > > # cat /etc/portage/env/no-mtune > CFLAGS="-O2 -pipe -march=native" > CXXFLAGS="${CFLAGS}" > CPPFLAGS="${CFLAGS}" Yes adding CXXFLAGS and CPPFLAGS to the file worked, thank you! I can confirm the same bug on an AMD64 machine. I confirm the same bug for imagemagick-7.0.8.50 with an Atom processor and CFLAGS="-O2 -pipe -march=bonnell -mmmx -msse -msse2 -msse3 -mssse3 -mcx16 -msahf -mmovbe -mfxsr --param l1-cache-size=24 --param l1-cache-line-size=64 --param l2-cache-size=512 -mtune=bonnell" CXXFLAGS="${CFLAGS}" CPPFLAGS="${CFLAGS}" These cflags were generated with the following command: $(gcc -march=native -v -E - < /dev/null 2>&1 | grep cc1 | perl -pe 's/ -mno-\S+//g; s/^.* - //g;') removing -mtune=bonnell worked however. lscpu Architecture: i686 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian Address sizes: 32 bits physical, 48 bits virtual CPU(s): 1 On-line CPU(s) list: 0 Thread(s) per core: 1 Core(s) per socket: 1 Socket(s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 28 Model name: Intel(R) Atom(TM) CPU 230 @ 1.60GHz Stepping: 2 CPU MHz: 1599.524 BogoMIPS: 3199.08 L1d cache: 24K L1i cache: 32K L2 cache: 512K Flags: fpu vme de tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts cpuid aperfmperf pni dtes64 monitor ds_cpl tm2 ssse3 cx16 xtpr pdcm movbe lahf_lm dtherm As additional information: I have another Atom PC that does NOT show the bug: CFLAGS="-O2 -pipe -march=bonnell -mmmx -msse -msse2 -msse3 -mssse3 -msahf -mmovbe -mfxsr --param l1-cache-size=24 --param l1-cache-line-size=64 --param l2-cache-size=512 -mtune=bonnell" CXXFLAGS="${CFLAGS}" CPPFLAGS="${CFLAGS}" lscpu Architecture: i686 CPU op-mode(s): 32-bit Byte Order: Little Endian Address sizes: 32 bits physical, 32 bits virtual CPU(s): 2 On-line CPU(s) list: 0,1 Thread(s) per core: 2 Core(s) per socket: 1 Socket(s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 28 Model name: Intel(R) Atom(TM) CPU N280 @ 1.66GHz Stepping: 2 CPU MHz: 1662.503 BogoMIPS: 3325.01 L1d cache: 24K L1i cache: 32K L2 cache: 512K Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc arch_perfmon pebs bts cpuid aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 xtpr pdcm movbe lahf_lm dtherm Created attachment 587380 [details]
ebuild without --with-gcc-arch=no-automagic
The error is related to the line --with-gcc-arch=no-automagic
in the imagemagick ebuild. Attached ebuild removes the line and builds without error. (Only tested with GCC_FLAGS containing mtune=bonnell).
Comment on attachment 587380 [details]
ebuild without --with-gcc-arch=no-automagic
Unfortunately just dropping the line is not helpful. Yes it makes the error go away, but it also makes IM ignore your CFLAGS and guess a best setting for your PC. Which is not necessarily what you want (think binary packages).
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3d49930d33bbd53473777618cf33d1d36682e5ed commit 3d49930d33bbd53473777618cf33d1d36682e5ed Author: Andreas K. Hüttel <dilfridge@gentoo.org> AuthorDate: 2022-03-04 00:24:36 +0000 Commit: Andreas K. Hüttel <dilfridge@gentoo.org> CommitDate: 2022-03-04 00:24:56 +0000 media-gfx/imagemagick: Patch out cpu-tuning magic Closes: https://bugs.gentoo.org/678454 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org> .../files/imagemagick-9999-nocputuning.patch | 14 ++ .../imagemagick/imagemagick-6.9.12.35-r1.ebuild | 266 ++++++++++++++++++++ .../imagemagick/imagemagick-7.1.0.20-r1.ebuild | 273 +++++++++++++++++++++ media-gfx/imagemagick/imagemagick-9999.ebuild | 12 +- 4 files changed, 561 insertions(+), 4 deletions(-) |