hi, here a weird bug, here in the files are a ebuild i use, is a mess but works, well the problem is un this app how you can see this part: mycmakeargs="${mycmakeargs} -DWITH_FULL_RELEASE=ON -DWITH_SYSTEM_FFMPEG=ON" cmake-utils_src_configure This set the app will be use ffmpeg as shared library, so it doesn't be compiled, when i run this normally out of emerge in a folder works fine, but for some reason the cmakeargs don't works, so checking, first the command emerge run with this is: >>> Configuring source in /var/tmp/portage/games-arcade/stepmania-5.9999/work/stepmania-5.9999 ... >>> Working in BUILD_DIR: "/var/tmp/portage/games-arcade/stepmania-5.9999/work/stepmania-5.9999_build" cmake --no-warn-unused-cli -C /var/tmp/portage/games-arcade/stepmania-5.9999/work/stepmania-5.9999_build/gentoo_common_config.cmake -G Unix Makefiles -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DWITH_FULL_RELEASE=ON -DWITH_SYSTEM_FFMPEG=ON -DCMAKE_BUILD_TYPE=Gentoo -DCMAKE_INSTALL_DO_STRIP=OFF -DCMAKE_USER_MAKE_RULES_OVERRIDE=/var/tmp/portage/games-arcade/stepmania-5.9999/work/stepmania-5.9999_build/gentoo_rules.cmake -DCMAKE_TOOLCHAIN_FILE=/var/tmp/portage/games-arcade/stepmania-5.9999/work/stepmania-5.9999_build/gentoo_toolchain.cmake /var/tmp/portage/games-arcade/stepmania-5.9999/work/stepmania-5.9999 Not searching for unused variables given on the command line. loading initial cache file /var/tmp/portage/games-arcade/stepmania-5.9999/work/stepmania-5.9999_build/gentoo_common_config.cmake We can see the args are passed correctly, but now i check the state of the vars in the build directory: CMAKE_ASM_COMPILE_OBJECT:STRING=<CMAKE_C_COMPILER> <DEFINES> -march=native -O2 -pipe -g <FLAGS> -o <OBJECT> -c <SOURCE> CMAKE_BUILD_TYPE:STRING=Gentoo CMAKE_CXX_COMPILE_OBJECT:STRING=<CMAKE_CXX_COMPILER> <DEFINES> -DNDEBUG <FLAGS> -o <OBJECT> -c <SOURCE> CMAKE_C_COMPILE_OBJECT:STRING=<CMAKE_C_COMPILER> <DEFINES> -DNDEBUG <FLAGS> -o <OBJECT> -c <SOURCE> CMAKE_Fortran_COMPILE_OBJECT:STRING=<CMAKE_Fortran_COMPILER> <DEFINES> -O2 -pipe <FLAGS> -o <OBJECT> -c <SOURCE> CMAKE_INSTALL_LIBDIR:PATH=lib64 CMAKE_INSTALL_PREFIX:PATH=/usr CMAKE_TOOLCHAIN_FILE:FILEPATH=/var/tmp/portage/games-arcade/stepmania-5.9999/work/stepmania-5.9999_build/gentoo_toolchain.cmake JACK_INCLUDE_DIR:PATH=/usr/include JACK_LIBRARY:FILEPATH=/usr/lib64/libjack.so LIB_SUFFIX:STRING=64 WITH_CRASH_HANDLER:BOOL=ON WITH_CRYSTALHD_DISABLED:BOOL=OFF WITH_EXTERNAL_WARNINGS:BOOL=OFF WITH_FFMPEG:BOOL=ON WITH_FULL_RELEASE:BOOL=OFF WITH_GLES2:BOOL=ON WITH_GPL_LIBS:BOOL=ON WITH_GTK2:BOOL=ON WITH_JPEG:BOOL=ON WITH_LTO:BOOL=OFF WITH_MP3:BOOL=ON WITH_NETWORKING:BOOL=ON WITH_NO_ROLC_TOMCRYPT:BOOL=OFF WITH_OGG:BOOL=ON WITH_PARALLEL_PORT:BOOL=OFF WITH_PORTABLE_TOMCRYPT:BOOL=ON WITH_PROFILING:BOOL=OFF WITH_SSE2:BOOL=ON WITH_SYSTEM_FFMPEG:BOOL=OFF WITH_TTY:BOOL=OFF WITH_WAV:BOOL=ON the args are disabled u.u its a mistery. well i try setting the BUILD_DIR to the same as the work dir (${WORKDIR}/${P}) but no lucky.
Created attachment 415216 [details] ebuild
Hello Lagu, where did you take the stepmania ebuild from? I failed to find it in the main tree. Is it from some overlay? Then probably contact the overlay maintainer...
well, i get the base of the ebuild from gentoo-zh but i change some parts to can build with cmake, i follow the https://devmanual.gentoo.org/eclass-reference/cmake-utils.eclass/ and references from the main tree of gentoo to use it, well the aplications works correctly in a normal folder to compile, but this problem its only running with emerge, this use two folders to works: /var/tmp/portage/games-arcade/${PV}/work/${PV} /var/tmp/portage/games-arcade/${PV}/work/${PV}_build actually portage set the second folder to work and first as reference to configure cmake, i try running the same command of portage manually in the second folder (same works as portage), and it works to configure it, so i only can see the probability of a problem with portage, the ebuild its only an example.
/var/tmp/portage/games-arcade/${PV}/work/${P} /var/tmp/portage/games-arcade/${PV}/work/${P}_build that..
hww, without V its {P}
mm, i try config with sudo ebuild stepmania-5.9999.ebuild configure with CMAKE_IN_SOURCE_BUILD to do more simple, but don't works, for some reazon runnung via portage the params are ommited.
Created attachment 415280 [details] eclass-debug
Created attachment 415282 [details] build.log
What file are you checking, that the arguments are missing from?
in the ebuild we can check the arguments, then we can see the eclass-debug and the arguments are passed to configure cmake, there no problems, the when it is configured, we can see in the build log the command to configure cmake, and the arguments are correctly passed, but next at all of this the configuration don't is correctly. mycmakeargs="${mycmakeargs} -DWITH_FULL_RELEASE=ON -DWITH_SYSTEM_FFMPEG=ON" cmake-utils_src_configure there is right then: 1502 enable_cmake-utils_src_configure: mycmakeargs is -DCMAKE_BUILD_TYPE=Release -DWITH_FULL_RELEASE=ON -DWITH_SYSTEM_FFMPEG=ON this the params are passed correctly to portage, then: cmake --no-warn-unused-cli -C /var/tmp/portage/games-arcade/stepmania-5.9999/work/stepmania-5.9999/gentoo_common_config.cmake -G Unix Makefiles -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DWITH_FULL_RELEASE=ON -DWITH_SYSTEM_FFMPEG=ON -DCMAKE_BUILD_TYPE=Gentoo -DCMAKE_INSTALL_DO_STRIP=OFF -DCMAKE_USER_MAKE_RULES_OVERRIDE=/var/tmp/portage/games-arcade/stepmania-5.9999/work/stepmania-5.9999/gentoo_rules.cmake -DCMAKE_TOOLCHAIN_FILE=/var/tmp/portage/games-arcade/stepmania-5.9999/work/stepmania-5.9999/gentoo_toolchain.cmake /var/tmp/portage/games-arcade/stepmania-5.9999/work/stepmania-5.9999 portage configure with the options and the params are right, but when i go to /var/tmp/portage/games-arcade/stepmania-5.9999/work/stepmania-5.9999/ and checking the configured options in cmake say this: WITH_FULL_RELEASE:BOOL=OFF WITH_SYSTEM_FFMPEG:BOOL=OFF the arguments don't are missed exactly, for some reason configuring from portage the configuration of cmake don't match with the executed command.
This is a really interesting bug. if use debug ; then local mycmakeargs=(-DCMAKE_BUILD_TYPE=Debug) else local mycmakeargs=(-DCMAKE_BUILD_TYPE=Release) fi mycmakeargs="${mycmakeargs} -DWITH_FULL_RELEASE=ON -DWITH_SYSTEM_FFMPEG=ON" Although they print correctly, it looks like the arguments get eaten due to converting between string and array multiple times (conversions happen in the eclass too). mycmakeargs should always be an array.