After installing of =dev-util/cmake-3.23.0_rc1 I can't build any package using cmake for compile. Cmake ignoring build path from command line. ... CMake Warning: Ignoring extra path from command line: /var/tmp/portage/dev-util/cmake-3.23.0_rc1/work/cmake-3.23.0-rc1 ... I can't downgrade cmake also.
Created attachment 764821 [details] build.log
Yes, that's something I need to investigate. Official changelogs don't indicate any deliberate change regarding this behavior so I assume this is a regression.
I reported this regression to upstream: https://gitlab.kitware.com/cmake/cmake/-/issues/23217
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #3) > I reported this regression to upstream: > https://gitlab.kitware.com/cmake/cmake/-/issues/23217 Thank you very much.
*** Bug 833079 has been marked as a duplicate of this bug. ***
This is actually long-existent bug in both cmake eclasses (cmake-utils.eclass, cmake.eclass) and recent change in CMake only exposed this bug. cmake.eclass currently contains: > local cmakeargs=( > ${warn_unused_cli} > -C "${common_config}" > -G "${generator_name}" > -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr" > "${mycmakeargs_local[@]}" > -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" > -DCMAKE_TOOLCHAIN_FILE="${toolchain_file}" > "${MYCMAKEARGS}" > ) > > if [[ -n "${CMAKE_EXTRA_CACHE_FILE}" ]] ; then > cmakeargs+=( -C "${CMAKE_EXTRA_CACHE_FILE}" ) > fi > > pushd "${BUILD_DIR}" > /dev/null || die > debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: mycmakeargs is ${mycmakeargs_local[*]}" > echo "${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}" > "${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}" || die "cmake failed" > popd > /dev/null || die CMAKE_USE_DIR is path-to-source-directory. MYCMAKEARGS is undocumented and normally not set, but adding "${MYCMAKEARGS}" (with double quotes) to list of arguments then results in adding "" (explicit empty argument). CMake mistreats this "" as current working directory and uses it as source directory (but it is actually build directory and is normally empty), and path passed by "${CMAKE_USE_DIR}" gets ignored. MYCMAKEARGS should be either fully deleted, or used only when non-empty (and support for array could be added).
And arguments passed to echo should be fixed to be quoted/escaped to be re-usable as shell input.
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #7) > And arguments passed to echo should be fixed to be quoted/escaped to be > re-usable as shell input. Hi. Yours diif reported in https://gitlab.kitware.com/cmake/cmake/-/issues/23217 to Source/cmake.cxx solves my error. .. On another lxc gentoo container I build cmake-3.22.2, install it from build directory to my current machine - as a result I downgrade cmake. install cmake-3.23.0_rc1 with patch (prepared from yours diff) and successfully rebuild mariadb. Thanks for yours effort.
Only 1 package (games-emulation/pcsx2) in gentoo.git sets that undocumented MYCMAKEARGS variable. There is probably a way to achieve desired effects differently (maybe by extending configurability of some things set by cmake.eclass).
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #9) > Only 1 package (games-emulation/pcsx2) in gentoo.git sets that undocumented > MYCMAKEARGS variable. > There is probably a way to achieve desired effects differently (maybe by > extending configurability of some things set by cmake.eclass). this is not my opinion(In reply to Arfrever Frehtes Taifersar Arahesis from comment #9) > Only 1 package (games-emulation/pcsx2) in gentoo.git sets that undocumented > MYCMAKEARGS variable. > There is probably a way to achieve desired effects differently (maybe by > extending configurability of some things set by cmake.eclass). This is out of my competence. I'm not a Gentoo Linux maintainer.
*** Bug 833374 has been marked as a duplicate of this bug. ***
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #9) > Only 1 package (games-emulation/pcsx2) in gentoo.git sets that undocumented > MYCMAKEARGS variable. > There is probably a way to achieve desired effects differently (maybe by > extending configurability of some things set by cmake.eclass). True, but it appears that many (2151) use the lowercase spelling. Not sure whether they are interchangeable, that might be a bug in the pcsx2 package.
games-emulation/pcsx2 is doing it wrong, but that's not really a topic for this bug.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/kde.git/commit/?id=04185da129d212b2e92ce5975abfae03b006d7d4 commit 04185da129d212b2e92ce5975abfae03b006d7d4 Author: Andreas Sturmlechner <asturm@gentoo.org> AuthorDate: 2022-02-16 17:40:28 +0000 Commit: Andreas Sturmlechner <asturm@gentoo.org> CommitDate: 2022-02-16 17:40:28 +0000 cmake.eclass: Fix MYCMAKEARGS support with >=dev-util/cmake-3.23 Bug: https://bugs.gentoo.org/833100 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> eclass/cmake.eclass | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
Hadn't noticed the pcsx2 ebuild used this (never looked at the non-live one and just waiting for a release to replace it), it is indeed wrong. I'll have a look to at least clean that up. This is a variable (normally) used by users to add their own options like EXTRA_ECONF, and I find it curious that it's quoted (resulting in passing an empty "" rather than nothing). Usually these are just given as-is so they are split by the shell to allow giving multiple arguments.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f781826a1c70818ec1168862af737ef81c67bfd commit 1f781826a1c70818ec1168862af737ef81c67bfd Author: Ionen Wolkens <ionen@gentoo.org> AuthorDate: 2022-02-16 22:47:21 +0000 Commit: Ionen Wolkens <ionen@gentoo.org> CommitDate: 2022-02-16 23:09:49 +0000 games-emulation/pcsx2: drop passing unnecessary toolchain file Undocumented not-for-ebuilds MYCMAKEARGS was used as a way to replace the toolchain file, however Gentoo's is perfectly fine here thanks to `multilib_toolchain_setup x86` setting this up. Still revbump to ~arch as a precaution, but should be fine. Could use some other fixups but ideal would be for a new release (or maybe start looking into snapshots after upstream stops doing major changes) to get rid of all this 32bit stuff. Bug: https://bugs.gentoo.org/833100 Signed-off-by: Ionen Wolkens <ionen@gentoo.org> games-emulation/pcsx2/pcsx2-1.6.0-r3.ebuild | 103 ++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+)
MYCMAKEARGS is still undocumented. If it is really intended for users, then it should be documented. It is worth looking at e.g. meson.eclass which contains slightly better code for MYMESONARGS: # @VARIABLE: MYMESONARGS # @DEFAULT_UNSET # @DESCRIPTION: # User-controlled environment variable containing arguments to be passed to # meson in meson_src_configure. ... # Handle quoted whitespace eval "local -a MYMESONARGS=( ${MYMESONARGS} )" mesonargs+=( # Arguments from ebuild "${emesonargs[@]}" # Arguments passed to this function "$@" # Arguments from user "${MYMESONARGS[@]}" # Source directory "${EMESON_SOURCE:-${S}}" # Build directory "${BUILD_DIR}" )
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #17) > # Handle quoted whitespace > eval "local -a MYMESONARGS=( ${MYMESONARGS} )" > [...] > "${MYMESONARGS[@]}" I guess that may be a better approach than just unquoted with shell splitting. Although does change the meaning of MYCMAKEARGS="-DARG=\"quotesincluded\"" needing to be MYCMAKEARGS="-DARG='\"quotesincluded\"'" or so if wanted to pass quotes. Ultimately neither passing quotes nor having spaces is needed often in these.
Created attachment 765439 [details] pcsx2.build.log (In reply to Larry the Git Cow from comment #16) > The bug has been referenced in the following commit(s): > > https://gitweb.gentoo.org/repo/gentoo.git/commit/ > ?id=1f781826a1c70818ec1168862af737ef81c67bfd > > commit 1f781826a1c70818ec1168862af737ef81c67bfd > Author: Ionen Wolkens <ionen@gentoo.org> > AuthorDate: 2022-02-16 22:47:21 +0000 > Commit: Ionen Wolkens <ionen@gentoo.org> > CommitDate: 2022-02-16 23:09:49 +0000 > > games-emulation/pcsx2: drop passing unnecessary toolchain file games-emulation/pcsx2-1.6.0-r3 is broken now
(In reply to nE0sIghT from comment #19) > games-emulation/pcsx2-1.6.0-r3 is broken now Oh didn't notice you cross posted here, would have been nicer to just open a new bug. This is probably specific to the system, the toolchain file had IGNORE_PATH for /usr/lib64 and I think detecting certain things without a abi_x86_32 counterpart may break things (e.g. already noticed some libGLU automagic). -r3 still builds for me, but I'll see if I can find a way to get the same error.
(In reply to Ionen Wolkens from comment #20) > -r3 still builds for me, but I'll see if I can find a way to get the same > error. Reproduced, seems it tries to use the /old/ wxGTK-3.0.4 slot if it's around without the toolchain file (I didn't have it installed so had no issues).
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67703b687d646403482c2b87d61626874097b2ba commit 67703b687d646403482c2b87d61626874097b2ba Author: Ionen Wolkens <ionen@gentoo.org> AuthorDate: 2022-02-19 10:08:27 +0000 Commit: Ionen Wolkens <ionen@gentoo.org> CommitDate: 2022-02-19 10:45:13 +0000 games-emulation/pcsx2: fix wxwidgets detection, ignore /usr/lib64 PCSX2 tries to force a wx-config path while FindwxWidgets.cmake would otherwise use the eclass' WX_CONFIG. Results in a build failure if the wx-config-3.0 symlink points to the gtk2 version. This previously worked by accident when cmake is in cross-compilation mode given wx-config32-3.0 doesn't exist and fell back to WX_CONFIG. Dirty fix but also force-ignore /usr/lib64 like the toolchain file used to for now, many checks are fragile (e.g. GLU). Ultimately these workarounds shouldn't be needed next release (64bit). Thanks-to: Yuri Konotopov <ykonotopov@gnome.org> Bug: https://bugs.gentoo.org/833100 Signed-off-by: Ionen Wolkens <ionen@gentoo.org> .../pcsx2/files/pcsx2-1.6.0-wx-config.patch | 20 ++++++++++++++++++++ games-emulation/pcsx2/pcsx2-1.6.0-r3.ebuild | 4 ++++ 2 files changed, 24 insertions(+)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9bac38649bac48278e4e4af90e3f89f78d861ed2 commit 9bac38649bac48278e4e4af90e3f89f78d861ed2 Author: Andreas Sturmlechner <asturm@gentoo.org> AuthorDate: 2022-02-16 17:40:28 +0000 Commit: Andreas Sturmlechner <asturm@gentoo.org> CommitDate: 2022-02-21 16:39:28 +0000 cmake.eclass: Fix MYCMAKEARGS support with >=dev-util/cmake-3.23 Closes: https://bugs.gentoo.org/833100 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> eclass/cmake.eclass | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)