Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 833100 - =dev-util/cmake-3.23.0_rc1 CMake Warning: Ignoring extra path from command line: /var/tmp/portage/dev-util/cmake-3.23.0_rc1/work/cmake-3.23.0-rc1
Summary: =dev-util/cmake-3.23.0_rc1 CMake Warning: Ignoring extra path from command li...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo KDE team
URL: https://archives.gentoo.org/gentoo-de...
Whiteboard:
Keywords: PATCH
: 833079 833374 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-02-11 05:54 UTC by Vladimir B. Vinogradov
Modified: 2022-02-21 16:48 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,7.06 KB, text/x-log)
2022-02-11 05:56 UTC, Vladimir B. Vinogradov
Details
pcsx2.build.log (build.log,137.26 KB, text/x-log)
2022-02-19 07:31 UTC, nE0sIghT
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir B. Vinogradov 2022-02-11 05:54:08 UTC
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.
Comment 1 Vladimir B. Vinogradov 2022-02-11 05:56:36 UTC
Created attachment 764821 [details]
build.log
Comment 2 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2022-02-11 10:00:19 UTC
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.
Comment 3 Arfrever Frehtes Taifersar Arahesis 2022-02-11 12:35:32 UTC
I reported this regression to upstream:
https://gitlab.kitware.com/cmake/cmake/-/issues/23217
Comment 4 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2022-02-11 13:11:02 UTC
(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.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-02-11 17:30:50 UTC
*** Bug 833079 has been marked as a duplicate of this bug. ***
Comment 6 Arfrever Frehtes Taifersar Arahesis 2022-02-12 08:21:48 UTC
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).
Comment 7 Arfrever Frehtes Taifersar Arahesis 2022-02-12 08:24:24 UTC
And arguments passed to echo should be fixed to be quoted/escaped to be re-usable as shell input.
Comment 8 Vladimir B. Vinogradov 2022-02-12 14:37:07 UTC
(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.
Comment 9 Arfrever Frehtes Taifersar Arahesis 2022-02-12 18:47:49 UTC
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).
Comment 10 Vladimir B. Vinogradov 2022-02-12 21:03:08 UTC
(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.
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-02-15 04:07:40 UTC
*** Bug 833374 has been marked as a duplicate of this bug. ***
Comment 12 Dale Lukas Peterson 2022-02-15 04:41:41 UTC
(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.
Comment 13 Andreas Sturmlechner gentoo-dev 2022-02-15 06:56:23 UTC
games-emulation/pcsx2 is doing it wrong, but that's not really a topic for this bug.
Comment 14 Larry the Git Cow gentoo-dev 2022-02-16 18:03:10 UTC
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(-)
Comment 15 Ionen Wolkens gentoo-dev 2022-02-16 22:08:54 UTC
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.
Comment 16 Larry the Git Cow gentoo-dev 2022-02-16 23:10:37 UTC
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(+)
Comment 17 Arfrever Frehtes Taifersar Arahesis 2022-02-16 23:44:25 UTC
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}"
	)
Comment 18 Ionen Wolkens gentoo-dev 2022-02-16 23:59:00 UTC
(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.
Comment 19 nE0sIghT 2022-02-19 07:31:45 UTC
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
Comment 20 Ionen Wolkens gentoo-dev 2022-02-19 08:17:41 UTC
(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.
Comment 21 Ionen Wolkens gentoo-dev 2022-02-19 08:34:29 UTC
(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).
Comment 22 Larry the Git Cow gentoo-dev 2022-02-19 10:45:31 UTC
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(+)
Comment 23 Larry the Git Cow gentoo-dev 2022-02-21 16:48:29 UTC
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(-)