Hello, I'm building Calligra on my fastest system available to copy to slower systems but Calligra automatically enables -march=bdver2 -msse4.2 -mxop -mavx and several other extensions but I'm only building it on a bdver2 system to speed up the build time for an old sub-2 GHz low-power Intel dual-core laptop that would take days to compile. In my make.conf I have no march option set so it shouldn't be doing this. Specifying -march=nocona -mtune=generic in make.conf gets added to the package's CXXFLAGS along with -march=bdver2 -m<insert 20 extensions that aren't supported on the target system.> The whole reason I like Gentoo is to customize the system to my liking, forcing options like this isn't helpful and ruins the purpose of running Gentoo. I know what CPU I have, if I don't have it set, it's probably for a good reason. Don't think for me please. Thank you. Alec Ari
Please attach emerge --info and the build log. This is definitely a bug.
Created attachment 435368 [details] emerge --info
Created attachment 435370 [details] build.log (trimmed down)
Which version of dev-libs/vc is installed? VcConfig.cmake includes VcMacros.cmake which includes OptimizeForArchitecture.cmake which then uses AddCompilerFlag.cmake to mangle the *FLAGS.
Yes, this is definitely a bug. I filed a bug upstream: https://github.com/VcDevel/Vc/issues/129 I'm afraid all versions of Vc do this, unfortunately. Try commenting the line include("${Vc_CMAKE_MODULES_DIR}/VcMacros.cmake") and all lines after it in VcConfig.cmake as a temporary workaround. I will work on a fix for this in the ebuild for Vc and watch the upstream bug.
I noticed that calligra depends on <dev-libs/vc-1.0.0. It is actually the only package that depends on dev-libs/vc. Unless someone asks for a different solution, I will apply a fix to versions 0.7.4 and 1.2.0, and drop versions 0.7.3 and 1.1.0 from the tree.
I believe Calligra only depends on vc if the vc USE flag is enabled.
After further investigation, the problem is not in dev-libs/vc, but in app-office/calligra. Beginning at line 445 of CMakeLists.txt is this: if (NOT PACKAGERS_BUILD) # Optimize the whole Calligra for current architecture set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Vc_DEFINITIONS}") endif () Can I just fix this, or should I reassign to kde?
Does Vc_DEFINITIONS provide anything that might be wanted otherwise?
(In reply to Michael Palimaka (kensington) from comment #9) > Does Vc_DEFINITIONS provide anything that might be wanted otherwise? No, it contains only optimization and arch flags, as far as I know.
Enabling PACKAGERS_BUILD also causes stuff like this to happen: if(PACKAGERS_BUILD) vc_compile_for_all_implementations(${_objs} ${_src} FLAGS -fPIC ONLY SSE2 SSSE3 SSE4_1 AVX AVX2) else() set(${_objs} ${_src}) endif() so maybe it's better if we just leave it switched off and remove Vc_DEFINITIONS reference instead?
(In reply to Michael Palimaka (kensington) from comment #11) > Enabling PACKAGERS_BUILD also causes stuff like this to happen: > > if(PACKAGERS_BUILD) > vc_compile_for_all_implementations(${_objs} ${_src} FLAGS -fPIC > ONLY SSE2 SSSE3 SSE4_1 AVX AVX2) > else() > set(${_objs} ${_src}) > endif() > > so maybe it's better if we just leave it switched off and remove > Vc_DEFINITIONS reference instead? Yes, that is what I thought, let's just remove Vc_DEFINITIONS. The PACKAGERS_BUILD is probably for them to create generic binary tarballs for distributions, not for us.
Created attachment 455448 [details, diff] calligra-2.9.1-no-arch-detection.patch
Created attachment 455450 [details, diff] calligra-2.9.1-r1.patch New ebuild revision with solution to this bug.
@kde: Please have a look at the changes. If there are no objections, I will apply them.
Thanks. https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3fb992b4a31755f1c289dbf1f1f25dfbd8557303