Conversation
pkgs/by-name/xe/xevd/package.nix
Outdated
There was a problem hiding this comment.
| cmakeFlags = let inherit (lib) cmakeBool cmakeFeature optional; | |
| inherit (stdenv.hostPlatform) isAarch64 isDarwin; | |
| in optional isAarch64 (cmakeBool "ARM" true) | |
| ++ optional isDarwin | |
| (cmakeFeature "CMAKE_SYSTEM_NAME" "Darwin"); | |
| cmakeFlags = lib.optional stdenv.hostPlatform.isAarch64 (lib.cmakeBool "ARM" true) | |
| ++ lib.optional stdenv.hostPlatform.isDarwin (lib.cmakeFeature "CMAKE_SYSTEM_NAME" "Darwin"); |
pkgs/by-name/xe/xeve/package.nix
Outdated
There was a problem hiding this comment.
| cmakeFlags = let inherit (lib) cmakeBool cmakeFeature optional; | |
| inherit (stdenv.hostPlatform) isAarch64 isDarwin; | |
| in optional isAarch64 (cmakeBool "ARM" true) | |
| ++ optional isDarwin | |
| (cmakeFeature "CMAKE_SYSTEM_NAME" "Darwin"); | |
| cmakeFlags = lib.optional stdenv.hostPlatform.isAarch64 (lib.cmakeBool "ARM" true) | |
| ++ lib.optional stdenv.hostPlatform.isDarwin (lib.cmakeFeature "CMAKE_SYSTEM_NAME" "Darwin"); |
less and boring code is always better :)
There was a problem hiding this comment.
It's an existing pattern in Nixpkgs, the systemd stuff in nixos/modules makes heavy use of it.
It's just as explicit as fully qualified names and it makes the code more readable IMO so I'd prefer not to change this.
pkgs/by-name/xe/xevd/0001-xevdm_util-Avoid-skipping-cnt_tmp-values.patch
Outdated
Show resolved
Hide resolved
|
I marked this as draft because upstream moved. Restructuring the patches in this PR tomorrow. |
|
I switched to fetching all the upstream patches I could, except for the Note that this should fix building with Clang on Linux too, as a consequence of fixing the Clang build for Darwin. Similarly it should now be compatible with aarch64-linux. |
emilazy
left a comment
There was a problem hiding this comment.
Looks good to me; a small nit but I won’t hold this up if you don’t agree. Is mpeg5/xevd#67 not required?
emilazy
left a comment
There was a problem hiding this comment.
The build is broken on x86_64-linux. I don’t know why, as I thought unknown warning parameters are meant to be ignored by default. Maybe we also need a -Wno-error=something-something-unknown-warnings, or to conditionalize on Clang.
xeve
-- Check for working C compiler: /nix/store/kp2j7yn0wzwq5piy494r54dafrh83s6s-gcc-wrapper-13.3.0/bin/gcc
-- Check for working C compiler: /nix/store/kp2j7yn0wzwq5piy494r54dafrh83s6s-gcc-wrapper-13.3.0/bin/gcc - broken
�[31mCMake Error at /nix/store/ll2b6cslly4v30im7qk34f9y21ziiz1i-cmake-3.29.6/share/cmake-3.29/Modules/CMakeTestCCompiler.cmake:67 (message):
The C compiler
"/nix/store/kp2j7yn0wzwq5piy494r54dafrh83s6s-gcc-wrapper-13.3.0/bin/gcc"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: '/build/source/build/CMakeFiles/CMakeScratch/TryCompile-E24bnB'
Run Build Command(s): /nix/store/ll2b6cslly4v30im7qk34f9y21ziiz1i-cmake-3.29.6/bin/cmake -E env VERBOSE=1 /nix/store/m9288777y854d5k0xkxgacc8rslrhb8r-gnumake-4.4.1/bin/make -f Makefile cmTC_4b231/fast
/nix/store/m9288777y854d5k0xkxgacc8rslrhb8r-gnumake-4.4.1/bin/make -f CMakeFiles/cmTC_4b231.dir/build.make CMakeFiles/cmTC_4b231.dir/build
make[1]: Entering directory '/build/source/build/CMakeFiles/CMakeScratch/TryCompile-E24bnB'
Building C object CMakeFiles/cmTC_4b231.dir/testCCompiler.c.o
/nix/store/kp2j7yn0wzwq5piy494r54dafrh83s6s-gcc-wrapper-13.3.0/bin/gcc -o CMakeFiles/cmTC_4b231.dir/testCCompiler.c.o -c /build/source/build/CMakeFiles/CMakeScratch/TryCompile-E24bnB/testCCompiler.c
cc1: error: '-Wno-error=for-loop-analysis': no option '-Wfor-loop-analysis'
cc1: error: '-Wno-error=parentheses-equality': no option '-Wparentheses-equality'
cc1: error: '-Wno-error=unknown-warning-option': no option '-Wunknown-warning-option'
make[1]: *** [CMakeFiles/cmTC_4b231.dir/build.make:78: CMakeFiles/cmTC_4b231.dir/testCCompiler.c.o] Error 1
make[1]: Leaving directory '/build/source/build/CMakeFiles/CMakeScratch/TryCompile-E24bnB'
make: *** [Makefile:127: cmTC_4b231/fast] Error 2
xevd
-- Check for working C compiler: /nix/store/kp2j7yn0wzwq5piy494r54dafrh83s6s-gcc-wrapper-13.3.0/bin/gcc
-- Check for working C compiler: /nix/store/kp2j7yn0wzwq5piy494r54dafrh83s6s-gcc-wrapper-13.3.0/bin/gcc - broken
�[31mCMake Error at /nix/store/ll2b6cslly4v30im7qk34f9y21ziiz1i-cmake-3.29.6/share/cmake-3.29/Modules/CMakeTestCCompiler.cmake:67 (message):
The C compiler
"/nix/store/kp2j7yn0wzwq5piy494r54dafrh83s6s-gcc-wrapper-13.3.0/bin/gcc"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: '/build/source/build/CMakeFiles/CMakeScratch/TryCompile-fGA7JO'
Run Build Command(s): /nix/store/ll2b6cslly4v30im7qk34f9y21ziiz1i-cmake-3.29.6/bin/cmake -E env VERBOSE=1 /nix/store/m9288777y854d5k0xkxgacc8rslrhb8r-gnumake-4.4.1/bin/make -f Makefile cmTC_0e187/fast
/nix/store/m9288777y854d5k0xkxgacc8rslrhb8r-gnumake-4.4.1/bin/make -f CMakeFiles/cmTC_0e187.dir/build.make CMakeFiles/cmTC_0e187.dir/build
make[1]: Entering directory '/build/source/build/CMakeFiles/CMakeScratch/TryCompile-fGA7JO'
Building C object CMakeFiles/cmTC_0e187.dir/testCCompiler.c.o
/nix/store/kp2j7yn0wzwq5piy494r54dafrh83s6s-gcc-wrapper-13.3.0/bin/gcc -o CMakeFiles/cmTC_0e187.dir/testCCompiler.c.o -c /build/source/build/CMakeFiles/CMakeScratch/TryCompile-fGA7JO/testCCompiler.c
cc1: error: '-Wno-error=for-loop-analysis': no option '-Wfor-loop-analysis'
cc1: error: '-Wno-error=sometimes-uninitialized': no option '-Wsometimes-uninitialized'; did you mean '-Wmaybe-uninitialized'?
cc1: error: '-Wno-error=unknown-warning-option': no option '-Wunknown-warning-option'
make[1]: *** [CMakeFiles/cmTC_0e187.dir/build.make:78: CMakeFiles/cmTC_0e187.dir/testCCompiler.c.o] Error 1
make[1]: Leaving directory '/build/source/build/CMakeFiles/CMakeScratch/TryCompile-fGA7JO'
make: *** [Makefile:127: cmTC_0e187/fast] Error 2
|
Ah, the reason my upstream PR did conditional appending of compiler options. Should've realized the same problem would crop up again. I'll think a bit about a fix. Might not be for tonight though. |
|
Looks like it’s a known GCC issue and I don’t know if there’s a workaround. I think just making the flags conditional on Clang would be fine, as they can all hopefully be removed on the next upstream version bump. But whatever you decide on is okay with me. |
|
@emilazy, #gcc said |
emilazy
left a comment
There was a problem hiding this comment.
Still weird on Linux, I’m afraid.
Result of nixpkgs-review pr 328422 run on x86_64-linux 1
8 packages failed to build:
- ffmpeg_7-full
- ffmpeg_7-full.bin
- ffmpeg_7-full.data
- ffmpeg_7-full.dev
- ffmpeg_7-full.doc
- ffmpeg_7-full.lib
- ffmpeg_7-full.man
- handbrake
6 packages built:
- xevd
- xevd.dev
- xevd.lib
- xeve
- xeve.dev
- xeve.lib
ERROR: xevd >= 0.4.1 not found using pkg-config
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.libera.chat.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.
That was the error I solved with adding |
|
@emilazy, re mpeg5/xevd#67, since I can't respond to a top-level review comment specifically. That's worked around with the disabling of the warnings, which is simpler and upstream might opt to go for explicit branching on the compiler like they did for Xeve so I don't really care about carrying that patch. Still looking into the pkg-config problem but my builder is wimpy and since ffmpeg_7-full is the package displaying the issue it'll have to be for tomorrow. If desirable I can drop the dropping of the |
|
No rush; feel free to shave those yaks :) FWIW it fails right at the start of |
|
Ok, dropping the dropping of I'll squash everything if this is finally ready for merge. I'm not sure fixup commits are actually at all helpful for GitHub's review UI compared to force pushes? |
|
Hi, |
emilazy
left a comment
There was a problem hiding this comment.
Result of nixpkgs-review pr 328422 run on x86_64-darwin 1
6 packages built:
- xevd
- xevd.dev
- xevd.lib
- xeve
- xeve.dev
- xeve.lib
Result of nixpkgs-review pr 328422 run on x86_64-linux 1
14 packages built:
- ffmpeg_7-full
- ffmpeg_7-full.bin
- ffmpeg_7-full.data
- ffmpeg_7-full.dev
- ffmpeg_7-full.doc
- ffmpeg_7-full.lib
- ffmpeg_7-full.man
- handbrake
- xevd
- xevd.dev
- xevd.lib
- xeve
- xeve.dev
- xeve.lib
Result of nixpkgs-review pr 328422 run on aarch64-linux 1
6 packages failed to build:
- xevd
- xevd.dev
- xevd.lib
- xeve
- xeve.dev
- xeve.lib
The aarch64-linux failure is odd:
-- Check for working C compiler: /nix/store/pxgjyjhzrqyjqgx4b4pqc5xc550agj1w-gcc-wrapper-13.3.0/bin/gcc
-- Check for working C compiler: /nix/store/pxgjyjhzrqyjqgx4b4pqc5xc550agj1w-gcc-wrapper-13.3.0/bin/gcc - broken
CMake Error at /nix/store/hyr25rm1gxiz04bbdvdk7a6291anq685-cmake-3.29.6/share/cmake-3.29/Modules/CMakeTestCCompiler.cmake:67 (message):
The C compiler
"/nix/store/pxgjyjhzrqyjqgx4b4pqc5xc550agj1w-gcc-wrapper-13.3.0/bin/gcc"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: '/build/source/build/CMakeFiles/CMakeScratch/TryCompile-Ny56VP'
Run Build Command(s): /nix/store/hyr25rm1gxiz04bbdvdk7a6291anq685-cmake-3.29.6/bin/cmake -E env VERBOSE=1 /nix/store/70s3bcvm1fjrn9lkxzkihrngxm73y82j-gnumake-4.4.1/bin/make -f Makefile cmTC_15b1f/fast
/nix/store/70s3bcvm1fjrn9lkxzkihrngxm73y82j-gnumake-4.4.1/bin/make -f CMakeFiles/cmTC_15b1f.dir/build.make CMakeFiles/cmTC_15b1f.dir/build
make[1]: Entering directory '/build/source/build/CMakeFiles/CMakeScratch/TryCompile-Ny56VP'
Building C object CMakeFiles/cmTC_15b1f.dir/testCCompiler.c.o
/nix/store/pxgjyjhzrqyjqgx4b4pqc5xc550agj1w-gcc-wrapper-13.3.0/bin/gcc -flax-vector-conversions -std=gnu99 -o CMakeFiles/cmTC_15b1f.dir/testCCompiler.c.o -c /build/source/build/CMakeFiles/CMakeScratch/TryCompile-Ny56VP/testCCompiler.c
Linking C executable cmTC_15b1f
/nix/store/hyr25rm1gxiz04bbdvdk7a6291anq685-cmake-3.29.6/bin/cmake -E cmake_link_script CMakeFiles/cmTC_15b1f.dir/link.txt --verbose=1
/nix/store/pxgjyjhzrqyjqgx4b4pqc5xc550agj1w-gcc-wrapper-13.3.0/bin/gcc -flax-vector-conversions -static CMakeFiles/cmTC_15b1f.dir/testCCompiler.c.o -o cmTC_15b1f
/nix/store/1jbqn7z7rh2q23nda4r66hr601z0w753-binutils-2.42/bin/ld: cannot find -lm: No such file or directory
/nix/store/1jbqn7z7rh2q23nda4r66hr601z0w753-binutils-2.42/bin/ld: cannot find -lc: No such file or directory
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_15b1f.dir/build.make:99: cmTC_15b1f] Error 1
make[1]: Leaving directory '/build/source/build/CMakeFiles/CMakeScratch/TryCompile-Ny56VP'
make: *** [Makefile:127: cmTC_15b1f/fast] Error 2
This is clearly an improvement on the status quo, so I’m happy to merge as‐is. But it seems like we won’t be able to flip it back on for non‐x86 Linux and it might have something to do with the -lm stuff. Have you tested this on aarch64-darwin?
About GitHub reviews: the UI is just bad in general, there’s no good option. I think i prefer rebasing in‐place except when there’s already a lot of changes in the PR and the fixup diff is clearly reviewable by itself.
|
Ah, shucks. I'm currently awaiting upstream's response to another pair of PRs that should solve the I'll move this back to draft until I have more info. |
|
Waiting to see response to #330842 before deciding what to do here. |
emilazy
left a comment
There was a problem hiding this comment.
Result of nixpkgs-review pr 328422 run on aarch64-darwin 1
6 packages built:
- xevd
- xevd.dev
- xevd.lib
- xeve
- xeve.dev
- xeve.lib
Result of nixpkgs-review pr 328422 run on x86_64-linux 1
15 packages built:
- ffmpeg_7-full
- ffmpeg_7-full.bin
- ffmpeg_7-full.data
- ffmpeg_7-full.dev
- ffmpeg_7-full.doc
- ffmpeg_7-full.lib
- ffmpeg_7-full.man
- handbrake
- nixpkgs-manual
- xevd
- xevd.dev
- xevd.lib
- xeve
- xeve.dev
- xeve.lib
|
Thanks for the work. |
Description of changes
I'm bundling the changes for xevd and xeve because they are so similar. If preferable I can split them into two separate PRs.
This is a prerequisite to fixing ffmpeg_7-full on Darwin.
I'm still in the process of upstreaming this work so it's quite a number of patches to vendor, some of which might technically be possible to fetchpatch after upstreaming.
The patches are likely to change before being accepted upstream. So it mostly depends on how quickly we want ffmpeg_7-full working on Darwin (and potentially aarch64-linux, couldn't test).
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.