Opened 5 years ago
Closed 4 years ago
#59393 closed defect (fixed)
VLC @3.0.7.1_4: error: multiple methods named 'value' found with mismatched result, parameter type or attributes
Reported by: | ccottap (Carlos Cotta) | Owned by: | RJVB (René Bertin) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.6.1 |
Keywords: | haspatch | Cc: | |
Port: | VLC |
Description
I'm trying to install VLC +quartz-x11+svg and get a build error. The problem seems to be in the following section:
:info:build libtool: compile: /usr/bin/clang -DHAVE_CONFIG_H -I. -I.. -DMODULE_STRING=\"macosx\" -D__PLUGIN__ -I./access -I./codec -I../include -I../include -I/opt/local/include -D__unix__=1 -Wno-unknown-pragmas -I/opt/local/lib/live/liveMedia/ include -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_VLC/VLC/work/vlc-3.0.7.1/contrib/include -fobjc-exceptions -fobjc-arc -pipe -Os -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -arch x86_64 -D_INTL_REDIRECT_MACROS -std=gnu11 -Werror=partial-availability -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_VLC/VLC/work/vlc-3.0.7.1/contrib/include -F/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_VLC/VLC/work/vlc-3.0.7.1/contrib -F/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_VLC/VLC/work/vlc-3.0.7.1/contrib/Frameworks -fvisibility=hidden -O3 -funroll-loops -fomit-frame-pointer -MT gui/macosx/libmacosx_plugin_la-VLCPlaylistInfo.lo -MD -MP -MF gui/macosx/.deps/libmacosx_plugin_la-VLCPlaylistInfo.Tpo -c gui/macosx/VLCPlaylistInfo.m -fno-common -DPIC -o gui/macosx/.libs/libmacosx_plugin_la-VLCPlaylistInfo.o :info:build gui/macosx/VLCPlaylistInfo.m:402:16: error: multiple methods named 'value' found with mismatched result, parameter type or attributes :info:build return [item value]; :info:build ^~~~~~~~~~~~ :info:build /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSMetadata.h:137:43: note: one possibility :info:build @property (nullable, readonly, retain) id value; :info:build ^~~~~ :info:build /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURL.h:472:42: note: also found :info:build @property (nullable, readonly) NSString *value; :info:build ^~~~~ :info:build /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSHTTPCookie.h:327:38: note: also found :info:build @property (readonly, copy) NSString *value; :info:build ^~~~~ :info:build /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSMetadata.h:151:33: note: also found :info:build @property (readonly, retain) id value; :info:build ^~~~~ :info:build /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSDictionaryController.h:25:33: note: also found :info:build @property (nullable, strong) id value; :info:build ^~~~~ :info:build /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSStepperTouchBarItem.h:35:18: note: also found :info:build @property double value; :info:build ^~~~~ :info:build gui/macosx/VLCPlaylistInfo.h:110:33: note: also found :info:build @property (readwrite) NSString *value; :info:build ^~~~~ :info:build 1 error generated. :info:build make[4]: *** [gui/macosx/libmacosx_plugin_la-VLCPlaylistInfo.lo] Error 1 :info:build make[4]: Target `all-am' not remade because of errors. :info:build make[4]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_VLC/VLC/work/vlc-3.0.7.1/modules' :info:build make[3]: *** [all-recursive] Error 1 :info:build make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsyn c.macports.org_macports_release_tarballs_ports_multimedia_VLC/VLC/work/vlc-3.0.7.1/modules' :info:build make[2]: *** [all] Error 2 :info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_VLC/VLC/work/vlc-3.0.7.1/modules'
OSX version: 10.15 (19A602) Xcode version: 11.0 (11A420a)
Attachments (2)
Change History (11)
comment:1 Changed 5 years ago by ccottap (Carlos Cotta)
Cc: | ccottap added |
---|
comment:2 Changed 5 years ago by ccottap (Carlos Cotta)
Cc: | ccottap removed |
---|
comment:3 Changed 5 years ago by RJVB (René Bertin)
comment:4 Changed 5 years ago by ccottap (Carlos Cotta)
I have just tried casting the return value to id but it keeps giving the same error:
:info:build gui/macosx/VLCPlaylistInfo.m:402:20: error: multiple methods named 'value' found with mismatched result, parameter type or attributes :info:build return (id)[item value]; :info:build ^~~~~~~~~~~~
comment:5 Changed 5 years ago by RJVB (René Bertin)
Thanks.
I had to dig rather deep in the VLC git repo (the Mac sources were reorganised thoroughly), but found
commit 3d3cdb244e8902ac676a3da4bda51b976c16c140 Author: Felix Paul Kühne <fkuehne@videolan.org> Date: Tue Sep 17 21:20:26 2019 +0200 macosx: future compilation fix In the future, the use of a 'value' property on custom classes will lead to conflicts with the SDK.
I'll swallow my opinion on what I already feared, I'll try to backport that change and post a patch here.
Changed 5 years ago by RJVB (René Bertin)
Attachment: | patch-build-on-post-1014.diff added |
---|
tentative patch for 10.15
comment:6 Changed 5 years ago by ccottap (Carlos Cotta)
The patch works fine for me. The compilation is now completed without error. Thanks!
comment:7 Changed 5 years ago by stilwellweather
Just upgraded to macOS 10.15 (19A603) with Xcode 11.1 (11A1027) and MacPorts 2.6.2
VLC failed to build for me, even with the above patch.
Log file after cleaning attached
Changed 5 years ago by stilwellweather
Attachment: | main.log.zip added |
---|
comment:8 Changed 5 years ago by RJVB (René Bertin)
@stilwellweather: how did you apply the patch? Because the error in your logfile is the same as the one in the OP.
Either way, my fix got applied, so please try again after doing a selfupdate
, and report back.
comment:9 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | haspatch added |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Summary: | VLC @3.0.7.1_4 - Compile error → VLC @3.0.7.1_4: error: multiple methods named 'value' found with mismatched result, parameter type or attributes |
The fix was committed as part of [d16d4f80882fa56c5b97f704cbdd3645d168d1a4/macports-ports].
OK, this goes beyond my ObjC knowledge.
item
here (VLCPlaylistInfo.m:402 is anid
, which to me is the base class for anything in ObjC. All the alternative classes in the error message return either aNSString* value
or anid value
; NSString* should cast toid
transparently *AFAIK*.@ccottap: Are you capable of tinkering a bit with casting the return value (
(id)[item value]
), or does anyone else reading this have a clue. If not I'll have to see if upstream has a fix (or wait for one).