NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.46k stars 13.66k forks source link

Build failure: cmus #263994

Closed laMudri closed 10 months ago

laMudri commented 10 months ago

Steps To Reproduce

Steps to reproduce the behavior:

  1. Build cmus on current nixos-unstable (63678e9f3d3afecfeafa0acead6239cdb447574c).

Build log

$ nix-build -A cmus
this derivation will be built:
  /nix/store/4g91l3nf3d6w9x2db59pdlwklgmvlwja-cmus-2.10.0.drv
building '/nix/store/4g91l3nf3d6w9x2db59pdlwklgmvlwja-cmus-2.10.0.drv'...
unpacking sources
unpacking source archive /nix/store/hdnf4ni9hshxnkkr2h593dm81x0x3fmq-source
source root is source
patching sources
applying patch /nix/store/kkapj4ja2jjmy96nv6jqh301588zx84c-option-debugging.patch
patching file scripts/checks.sh
updateAutotoolsGnuConfigScriptsPhase
configuring
configure flags: prefix=/nix/store/j88bbhjzj91liai7f8ph5vl3sxgzkf2g-cmus-2.10.0 CONFIG_WAV=y HOSTCC=cc CONFIG_ALSA=y CONFIG_MPRIS=y CONFIG_CDDB=y CONFIG_CDIO=y CONFIG_CUE=y CONFIG_FFMPEG=y CONFIG_FLAC=y CONFIG_MAD=y CONFIG_MIKMOD=y CONFIG_MODPLUG=y CONFIG_MPC=y CONFIG_VORBIS=y CONFIG_WAVPACK=y CONFIG_OPUS=y
checking for program gcc... /nix/store/zlzz2z48s7ry0hkl55xiqp5a73b4mzrg-gcc-wrapper-12.3.0/bin/gcc
checking for program cc... /nix/store/zlzz2z48s7ry0hkl55xiqp5a73b4mzrg-gcc-wrapper-12.3.0/bin/cc
checking for C11 (with atomics support)... yes
checking for CFLAGS -pipe -Wall -Wshadow -Wcast-align -Wpointer-arith -Wwrite-strings -Wundef -Wmissing-prototypes -Wredundant-decls -Wextra -Wno-sign-compare -Wformat-security... yes
checking for CFLAGS -Wold-style-definition... yes
checking for CFLAGS -Wno-pointer-sign... yes
checking for CFLAGS -Werror-implicit-function-declaration... yes
checking for CFLAGS -Wno-unused-parameter... yes
checking for CFLAGS -Wno-missing-field-initializers... yes
checking if CC can generate dependency information... yes
checking byte order... .tmp-2-prog.c: In function 'main':
.tmp-2-prog.c:6:9: error: unknown type name 'not'; did you mean 'ino_t'?
    6 |         not big endian
      |         ^~~
      |         ino_t
.tmp-2-prog.c:6:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'endian'
    6 |         not big endian
      |                 ^~~~~~
little-endian
checking for DL_LIBS (-ldl -Wl,--export-dynamic)... yes
checking for PTHREAD_LIBS (-lpthread)... yes
checking for realtime scheduling... yes
checking for NCURSES_LIBS (pkg-config)... -L/nix/store/qzrp68dizk4fsiab5cfscv1ja00h5frn-ncurses-6.4/lib -lncursesw
checking for NCURSES_CFLAGS (pkg-config)... -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -I/nix/store/2kridj093jlhc9x1y5nvn4j35lgigzid-ncurses-6.4-dev/include
checking for working ncurses setup... yes
checking for function resizeterm... .tmp-7-prog.c: In function 'main':
.tmp-7-prog.c:1:62: warning: returning 'char (*)()' from a function with return type 'int' makes integer from pointer without a cast [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wint-conversion-Wint-conversion8;;]
    1 | char resizeterm(); int main(int argc, char *argv[]) { return resizeterm; }
      |                                                              ^~~~~~~~~~
yes
checking for function use_default_colors... .tmp-8-prog.c: In function 'main':
.tmp-8-prog.c:1:70: warning: returning 'char (*)()' from a function with return type 'int' makes integer from pointer without a cast [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wint-conversion-Wint-conversion8;;]
    1 | char use_default_colors(); int main(int argc, char *argv[]) { return use_default_colors; }
      |                                                                      ^~~~~~~~~~~~~~~~~~
yes
checking for ICONV_LIBS (-liconv)... /nix/store/p58l5qmzifl20qmjs3xfpl01f0mqlza2-binutils-2.40/bin/ld: cannot find -liconv: No such file or directory
collect2: error: ld returned 1 exit status
no
assuming libc contains iconv
checking for working iconv... yes
checking for header <byteswap.h>... yes
checking for function strdup... .tmp-12-prog.c: In function 'main':
.tmp-12-prog.c:4:16: warning: returning 'char * (*)(const char *)' from a function with return type 'int' makes integer from pointer without a cast [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wint-conversion-Wint-conversion8;;]
    4 |         return strdup;
      |                ^~~~~~
yes
checking for function strndup... .tmp-13-prog.c: In function 'main':
.tmp-13-prog.c:4:16: warning: returning 'char * (*)(const char *, size_t)' {aka 'char * (*)(const char *, long unsigned int)'} from a function with return type 'int' makes integer from pointer without a cast [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wint-conversion-Wint-conversion8;;]
    4 |         return strndup;
      |                ^~~~~~~
yes
checking for CDDB_LIBS (pkg-config)... -L/nix/store/7s1viffbndyh4w9rhhq8gahlh8vrwfcy-libcddb-1.3.2/lib -lcddb
checking for CDDB_CFLAGS (pkg-config)... -I/nix/store/7s1viffbndyh4w9rhhq8gahlh8vrwfcy-libcddb-1.3.2/include
checking for CDIO_LIBS (pkg-config)... -L/nix/store/h1342h5c26cnylxh29mk50dax477yjr7-libcdio-2.1.0/lib -L/nix/store/khl5rvkyi4cr0rr22sqbvp4yxxk4qn96-libcdio-paranoia-0.94+2/lib -lcdio_cdda -lcdio -lm -lcdio -lm
checking for CDIO_CFLAGS (pkg-config)... -I/nix/store/h1342h5c26cnylxh29mk50dax477yjr7-libcdio-2.1.0/include -I/nix/store/khl5rvkyi4cr0rr22sqbvp4yxxk4qn96-libcdio-paranoia-0.94+2/include
checking for FLAC_LIBS (pkg-config)... -L/nix/store/97x91lsyrar1apcnjgjp45g5gqcgggll-flac-1.4.3/lib -lFLAC
checking for FLAC_CFLAGS (pkg-config)... -I/nix/store/g15xb64sxmi4m3sgiv26465zgwv3qfhw-flac-1.4.3-dev/include
checking for MAD_LIBS (pkg-config)... -L/nix/store/213im18cm5dzmhw0gic0nqw6ag727n3l-libmad-0.15.1b/lib -lmad
checking for MAD_CFLAGS (pkg-config)... 
checking for program libmikmod-config... /nix/store/63d7f4cy7qm03kf9gmy7q0bm5isb4zfx-libmikmod-3.3.11.1-dev/bin/libmikmod-config
checking for MIKMOD_CFLAGS... -I/nix/store/63d7f4cy7qm03kf9gmy7q0bm5isb4zfx-libmikmod-3.3.11.1-dev/include -pthread -D_REENTRANT
checking for MIKMOD_LIBS... -L/nix/store/kda89xcv5x0r6jv10bv579nrr5dpjwb4-libmikmod-3.3.11.1/lib -lmikmod -lpulse-simple -lpulse -lm
checking for MODPLUG_LIBS (pkg-config)... -L/nix/store/dhpz2j35bnn1g7a3ms1gq2k268vjsvzp-libmodplug-0.8.9.0/lib -lmodplug
checking for MODPLUG_CFLAGS (pkg-config)... -I/nix/store/51gvm9k23m8ibsiwqw867v97pcadvfq7-libmodplug-0.8.9.0-dev/include
checking for function ModPlug_GetModuleType... .tmp-15-prog.c: In function 'main':
.tmp-15-prog.c:1:73: warning: returning 'char (*)()' from a function with return type 'int' makes integer from pointer without a cast [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wint-conversion-Wint-conversion8;;]
    1 | char ModPlug_GetModuleType(); int main(int argc, char *argv[]) { return ModPlug_GetModuleType; }
      |                                                                         ^~~~~~~~~~~~~~~~~~~~~
yes
checking for header <mpc/mpcdec.h>... .tmp-16-prog.c:1:10: fatal error: mpc/mpcdec.h: No such file or directory
    1 | #include <mpc/mpcdec.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
no
checking for header <mpcdec/mpcdec.h>... yes
checking for MPC_LIBS (-lmpcdec -lm)... yes
checking for VORBIS_LIBS (pkg-config)... -L/nix/store/zglg4kbs23psw69zsn6x867hqbk07nyz-libvorbis-1.3.7/lib -lvorbisfile
checking for VORBIS_CFLAGS (pkg-config)... -I/nix/store/z0fkfk0rlw278ccbg3virqb3wbwkxi6f-libvorbis-1.3.7-dev/include
checking for OPUS_LIBS (pkg-config)... -L/nix/store/0c8mygfh8r9kxrb8rpxcqp3w4i9gy689-opusfile-0.12/lib -lopusfile
checking for OPUS_CFLAGS (pkg-config)... -I/nix/store/2ix3zw1v6l01g043a8hsa8nv3cghdsh8-opusfile-0.12-dev/include/opus
checking for LIBSYSTEMD_LIBS (pkg-config)... -L/nix/store/vapnrxrw3b21c7ji61bmnbzl2cj1vl96-systemd-254.3/lib -lsystemd
checking for LIBSYSTEMD_CFLAGS (pkg-config)... -I/nix/store/dwnkgpxy91j38si1rx95i6qrdhxp5hpd-systemd-254.3-dev/include
checking for WAVPACK_LIBS (pkg-config)... -L/nix/store/hmyy91yr88wja7pg8qs0s9zh99fkw7p8-wavpack-5.6.0/lib -lwavpack
checking for WAVPACK_CFLAGS (pkg-config)... -I/nix/store/pylc518d3mhwglknbvrpysfx6hyx31hb-wavpack-5.6.0-dev/include
checking for header <mp4v2/mp4v2.h>... .tmp-19-prog.c:1:10: fatal error: mp4v2/mp4v2.h: No such file or directory
    1 | #include <mp4v2/mp4v2.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
no
checking for header <mp4.h>... .tmp-20-prog.c:1:10: fatal error: mp4.h: No such file or directory
    1 | #include <mp4.h>
      |          ^~~~~~~
compilation terminated.
no
checking for header <neaacdec.h>... .tmp-21-prog.c:1:10: fatal error: neaacdec.h: No such file or directory
    1 | #include <neaacdec.h>
      |          ^~~~~~~~~~~~
compilation terminated.
no
checking for FFMPEG_LIBS (pkg-config)... -L/nix/store/xklprm1qq7kv766bqsrxrdjcys9m2wfm-ffmpeg-6.0-lib/lib -lavformat -lavcodec
checking for FFMPEG_CFLAGS (pkg-config)... -I/nix/store/zs7qcygf7abm3fb16swyfbsd31h9b37r-ffmpeg-6.0-dev/include
checking for header <libavcodec/avcodec.h>... yes
checking for successful build of ffmpeg.c... .tmp-23-prog.c: In function 'ffmpeg_open':
.tmp-23-prog.c:193:23: warning: assignment discards 'const' qualifier from pointer target type [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wdiscarded-qualifiers-Wdiscarded-qualifiers8;;]
  193 |                 codec = avcodec_find_decoder(cp->codec_id);
      |                       ^
.tmp-23-prog.c:205:43: error: 'AV_CODEC_CAP_TRUNCATED' undeclared (first use in this function); did you mean 'AV_CODEC_CAP_HARDWARE'?
  205 |                 if (codec->capabilities & AV_CODEC_CAP_TRUNCATED)
      |                                           ^~~~~~~~~~~~~~~~~~~~~~
      |                                           AV_CODEC_CAP_HARDWARE
.tmp-23-prog.c:205:43: note: each undeclared identifier is reported only once for each function it appears in
.tmp-23-prog.c:206:38: error: 'AV_CODEC_FLAG_TRUNCATED' undeclared (first use in this function); did you mean 'AV_CODEC_FLAG_QSCALE'?
  206 |                         cc->flags |= AV_CODEC_FLAG_TRUNCATED;
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~
      |                                      AV_CODEC_FLAG_QSCALE
.tmp-23-prog.c:245:9: warning: 'av_get_default_channel_layout' is deprecated [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wdeprecated-declarations-Wdeprecated-declarations8;;]
  245 |         av_opt_set_int(swr, "in_channel_layout",  av_get_default_channel_layout(cc->channels), 0);
      |         ^~~~~~~~~~~~~~
In file included from /nix/store/zs7qcygf7abm3fb16swyfbsd31h9b37r-ffmpeg-6.0-dev/include/libavutil/frame.h:33,
                 from /nix/store/zs7qcygf7abm3fb16swyfbsd31h9b37r-ffmpeg-6.0-dev/include/libavcodec/avcodec.h:35,
                 from .tmp-23-prog.c:29:
/nix/store/zs7qcygf7abm3fb16swyfbsd31h9b37r-ffmpeg-6.0-dev/include/libavutil/channel_layout.h:482:9: note: declared here
  482 | int64_t av_get_default_channel_layout(int nb_channels);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.tmp-23-prog.c:245:9: warning: 'channels' is deprecated [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wdeprecated-declarations-Wdeprecated-declarations8;;]
  245 |         av_opt_set_int(swr, "in_channel_layout",  av_get_default_channel_layout(cc->channels), 0);
      |         ^~~~~~~~~~~~~~
/nix/store/zs7qcygf7abm3fb16swyfbsd31h9b37r-ffmpeg-6.0-dev/include/libavcodec/avcodec.h:1042:9: note: declared here
 1042 |     int channels;
      |         ^~~~~~~~
.tmp-23-prog.c:246:9: warning: 'av_get_default_channel_layout' is deprecated [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wdeprecated-declarations-Wdeprecated-declarations8;;]
  246 |         av_opt_set_int(swr, "out_channel_layout", av_get_default_channel_layout(cc->channels), 0);
      |         ^~~~~~~~~~~~~~
/nix/store/zs7qcygf7abm3fb16swyfbsd31h9b37r-ffmpeg-6.0-dev/include/libavutil/channel_layout.h:482:9: note: declared here
  482 | int64_t av_get_default_channel_layout(int nb_channels);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.tmp-23-prog.c:246:9: warning: 'channels' is deprecated [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wdeprecated-declarations-Wdeprecated-declarations8;;]
  246 |         av_opt_set_int(swr, "out_channel_layout", av_get_default_channel_layout(cc->channels), 0);
      |         ^~~~~~~~~~~~~~
/nix/store/zs7qcygf7abm3fb16swyfbsd31h9b37r-ffmpeg-6.0-dev/include/libavcodec/avcodec.h:1042:9: note: declared here
 1042 |     int channels;
      |         ^~~~~~~~
.tmp-23-prog.c:253:9: warning: 'channels' is deprecated [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wdeprecated-declarations-Wdeprecated-declarations8;;]
  253 |         ip_data->sf = sf_rate(cc->sample_rate) | sf_channels(cc->channels);
      |         ^~~~~~~
/nix/store/zs7qcygf7abm3fb16swyfbsd31h9b37r-ffmpeg-6.0-dev/include/libavcodec/avcodec.h:1042:9: note: declared here
 1042 |     int channels;
      |         ^~~~~~~~
.tmp-23-prog.c:271:9: warning: 'channel_layout' is deprecated [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wdeprecated-declarations-Wdeprecated-declarations8;;]
  271 |         channel_layout = cc->channel_layout;
      |         ^~~~~~~~~~~~~~
/nix/store/zs7qcygf7abm3fb16swyfbsd31h9b37r-ffmpeg-6.0-dev/include/libavcodec/avcodec.h:1100:14: note: declared here
 1100 |     uint64_t channel_layout;
      |              ^~~~~~~~~~~~~~
.tmp-23-prog.c:272:9: warning: 'channels' is deprecated [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wdeprecated-declarations-Wdeprecated-declarations8;;]
  272 |         channel_map_init_waveex(cc->channels, channel_layout, ip_data->channel_map);
      |         ^~~~~~~~~~~~~~~~~~~~~~~
/nix/store/zs7qcygf7abm3fb16swyfbsd31h9b37r-ffmpeg-6.0-dev/include/libavcodec/avcodec.h:1042:9: note: declared here
 1042 |     int channels;
      |         ^~~~~~~~
.tmp-23-prog.c: In function 'ffmpeg_fill_buffer':
.tmp-23-prog.c:384:25: warning: 'channels' is deprecated [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wdeprecated-declarations-Wdeprecated-declarations8;;]
  384 |                         output->buffer_used_len = res * cc->channels * sizeof(int16_t);
      |                         ^~~~~~
/nix/store/zs7qcygf7abm3fb16swyfbsd31h9b37r-ffmpeg-6.0-dev/include/libavcodec/avcodec.h:1042:9: note: declared here
 1042 |     int channels;
      |         ^~~~~~~~
no
configure failed.
error: builder for '/nix/store/4g91l3nf3d6w9x2db59pdlwklgmvlwja-cmus-2.10.0.drv' failed with exit code 1;
       last 10 log lines:
       >       |         ^~~~~~~~
       > .tmp-23-prog.c: In function 'ffmpeg_fill_buffer':
       > .tmp-23-prog.c:384:25: warning: 'channels' is deprecated [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wdeprecated-declarations-Wdeprecated-declarations8;;]
       >   384 |                         output->buffer_used_len = res * cc->channels * sizeof(int16_t);
       >       |                         ^~~~~~
       > /nix/store/zs7qcygf7abm3fb16swyfbsd31h9b37r-ffmpeg-6.0-dev/include/libavcodec/avcodec.h:1042:9: note: declared here
       >  1042 |     int channels;
       >       |         ^~~~~~~~
       > no
       > configure failed.
       For full logs, run 'nix-store -l /nix/store/4g91l3nf3d6w9x2db59pdlwklgmvlwja-cmus-2.10.0.drv'.

Full logs: https://gist.github.com/laMudri/1192ead22c7155b3a0c87e50f3190dea

Additional context

I haven't updated in a while, so I'm not sure where this failure starts. Nothing has changed in the cmus package; it must be a change in dependencies.

Notify maintainers

@oxij

Metadata

laMudri commented 10 months ago

cmus started failing somewhere between 51d906d2341c9e866e48c2efcaac0f2d70bfd43e (good) and 6b4e45787b7362fd20f1049e4a0ea42508a05715 (bad). I don't have the hundreds of gigabytes of RAM that would allow me to do a bisection between those, so I'll leave that to someone else.

laMudri commented 10 months ago

Manually going through it suggests 8dfad603247387df1df4826b8bea58efc5d012d8 as a possible culprit. I have no idea what that commit does, though, yet.

kirillrdy commented 10 months ago

the issue is bump of ffmpeg to 6, i am about to push a fix