Opened 12 months ago

Last modified 6 months ago

#64667 assigned defect

mpv @0.34.1: error: expected parameter declarator (static_assert undefined)

Reported by: cave-canem Owned by: i0ntempest
Priority: Normal Milestone:
Component: ports Version:
Keywords: lion mountainlion mavericks Cc: Ionic (Mihai Moldovan), cave-canem, mrkapqa
Port: mpv

Description

sudo port -vd upgrade mpv
...
Build failed
 -> task in 'objects' failed with exit status 1:
	{task 4459254832: c zimg.c -> zimg.c.21.o}
['/opt/MacPorts/bin/clang', '-pipe', '-Os', '-arch', 'x86_64', '-D_ISOC99_SOURCE', '-D_GNU_SOURCE', '-D_FILE_OFFSET_BITS=64', '-Wall', '-std=c11', '-O2', '-Werror=implicit-function-declaration', '-Wno-error=deprecated-declarations', '-Wno-error=unused-function', '-Wempty-body', '-Wdisabled-optimization', '-Wstrict-prototypes', '-Wno-format-zero-length', '-Werror=format-security', '-Wno-redundant-decls', '-Wvla', '-Wimplicit-fallthrough', '-fno-math-errno', '-Wall', '-Wundef', '-Wmissing-prototypes', '-Wshadow', '-Wno-switch', '-Wparentheses', '-Wpointer-arith', '-Wno-pointer-sign', '-Wno-unused-result', '-Wno-logical-op-parentheses', '-fcolor-diagnostics', '-Wno-tautological-compare', '-Wno-tautological-constant-out-of-range-compare', '-pthread', '-I.', '-I..', '-I../../../../../../../../include/lua-5.2', '-I../../../../../../../../include', '-I../../../../../../../../include/uchardet', '-I../../../../../../../../include/libxml2', '-I../../../../../../../../include/ossp', '-I../../../../../../../../include/freetype2', '-I../../../../../../../../include/libpng16', '-I../../../../../../../../include/harfbuzz', '-I../../../../../../../../include/glib-2.0', '-I../../../../../../../../lib/glib-2.0/include', '-I../../../../../../../../include/fribidi', '../video/zimg.c', '-c', '-o/opt/MacPorts/var/macports/build/_opt_macports-ports_multimedia_mpv/mpv/work/mpv-player-mpv-df6d84c/build/video/zimg.c.21.o', '-isystem/opt/MacPorts/include/LegacySupport', '-isystem/opt/MacPorts/include']
Command failed:  cd "/opt/MacPorts/var/macports/build/_opt_macports-ports_multimedia_mpv/mpv/work/mpv-0.34.1" && /opt/MacPorts/bin/python3.9 ./waf build -v --verbose
Exit code: 1
Error: Failed to build mpv: command execution failed
DEBUG: Error code: CHILDSTATUS 49652 1
DEBUG: Backtrace: command execution failed
    while executing
"system {*}$notty {*}$callback {*}$nice $fullcmdstring"
    invoked from within
"command_exec -callback portprogress::target_progress_callback build"
    (procedure "portbuild::build_main" line 8)
    invoked from within
"$procedure $targetname"
Error: See /opt/MacPorts/var/macports/logs/_opt_macports-ports_multimedia_mpv/mpv/main.log for details.
DEBUG: can't read "portutil::autoconf::xcrun_path": no such variable
    while executing
"findBinary xcrun $portutil::autoconf::xcrun_path"

See the detailed log in the attachment.

Attachments (2)

main.log.tar.xz (12.3 KB) - added by cave-canem 12 months ago.
main.log
log_with_defaul_compiler.main.log.tar.xz (16.6 KB) - added by cave-canem 12 months ago.
detailed log with default compiler

Download all attachments as: .zip

Change History (7)

Changed 12 months ago by cave-canem

Attachment: main.log.tar.xz added

main.log

comment:1 Changed 12 months ago by jmroot (Joshua Root)

:debug:configure Preferred compilers: macports-clang macports-gcc clang
:debug:configure Using compiler 'MacPorts Clang (port select)'

That seems rather non-standard.

Changed 12 months ago by cave-canem

detailed log with default compiler

comment:2 Changed 12 months ago by cave-canem

I expected such a response.

New detailed log with default compiler in attachment

comment:3 Changed 7 months ago by jmroot (Joshua Root)

So the relevant part of the log is actually this:

:info:build ../video/zimg.c:34:15: error: expected parameter declarator
:info:build static_assert(MP_IMAGE_BYTE_ALIGN >= ZIMG_ALIGN, "");

Older macOS versions don't have static_assert defined in assert.h. A C11 compiler is being used, so it should be safe to do this somewhere:

#ifndef static_assert
#define static_assert _Static_assert
#endif
Last edited 7 months ago by jmroot (Joshua Root) (previous) (diff)

comment:4 Changed 7 months ago by jmroot (Joshua Root)

Cc: i0ntempest removed
Owner: set to i0ntempest
Status: newassigned
Summary: mpv @0.34.1 Build failed: -> task in 'objects' failed with exit status 1:mpv @0.34.1 Build failed: static_assert undefined

comment:5 Changed 6 months ago by ryandesign (Ryan Schmidt)

Cc: mrkapqa added
Keywords: lion mountainlion mavericks added; Mavericks removed
Summary: mpv @0.34.1 Build failed: static_assert undefinedmpv @0.34.1: error: expected parameter declarator (static_assert undefined)

Has duplicate #65658 on Lion.

Note: See TracTickets for help on using tickets.