Opened 6 years ago

Closed 6 years ago

#58206 closed defect (fixed)

libVLC-3.0.6_0+qtkit+quartz.darwin_15.x86_64 fails to build 10.11.6 El Capitan

Reported by: mikealeonetti Owned by: RJVB (René Bertin)
Priority: Normal Milestone:
Component: ports Version: 2.5.2
Keywords: Cc: mojca (Mojca Miklavec)
Port: libVLC

Description

When installing libVLC with +qtkit +quarts -x11 +no_x11 libVLC seems to choke on the files: modules/audio_output/coreaudio_common.c modules/access/qtsound.m

Complaining about some uncompilable code:

:info:build access/qtsound.m:51:36: error: expected a type
:info:build + (void)requestAccessForMediaType:(AVMediaType)mediaType completionHandler:(void (^)(BOOL granted))handler API_AVAILABLE(macos(10.14), ios(7.0));
:info:build                                    ^
:info:build access/qtsound.m:51:121: error: expected ':'
:info:build + (void)requestAccessForMediaType:(AVMediaType)mediaType completionHandler:(void (^)(BOOL granted))handler API_AVAILABLE(macos(10.14), ios(7.0));
:info:build                                                                                                                         ^
:info:build                                                                                                                         :
:info:build access/qtsound.m:51:121: error: expected ';' after method prototype
:info:build + (void)requestAccessForMediaType:(AVMediaType)mediaType completionHandler:(void (^)(BOOL granted))handler API_AVAILABLE(macos(10.14), ios(7.0));
:info:build                                                                                                                         ^
:info:build                                                                                                                         ;
:info:build access/qtsound.m:321:13: error: unexpected '@' in program
:info:build         if (@available(macOS 10.14, *)) {
:info:build             ^
:info:build 4 errors generated.
:info:build audio_output/coreaudio_common.h:35:9: fatal error: 'os/lock.h' file not found
:info:build #import <os/lock.h>
:info:build         ^
:info:build In file included from audio_output/coreaudio_common.c:25:
:info:build audio_output/coreaudio_common.h:35:9: fatal error: 'os/lock.h' file not found
:info:build #import <os/lock.h>
:info:build         ^
:info:build 1 error generated.

I've attached the whole log file.

Attachments (2)

main3.log (2.6 MB) - added by mikealeonetti 6 years ago.
main.log
port:VLC.patch (6.3 KB) - added by RJVB (René Bertin) 6 years ago.
tentative fix (to be applied to the ports tree)

Change History (14)

Changed 6 years ago by mikealeonetti

Attachment: main3.log added

main.log

comment:1 Changed 6 years ago by mojca (Mojca Miklavec)

Owner: set to RJVB
Status: newassigned

comment:2 Changed 6 years ago by mojca (Mojca Miklavec)

Cc: mojca added

comment:3 Changed 6 years ago by RJVB (René Bertin)

The 1st error means we'll have to require clang 5.0 (which I used) or newer (or patch the code); I'd have to figure out why I didn't see the 2nd error myself.

comment:4 Changed 6 years ago by mikealeonetti

Okay cool. Let me know how I could help.

Changed 6 years ago by RJVB (René Bertin)

Attachment: port:VLC.patch added

tentative fix (to be applied to the ports tree)

comment:5 Changed 6 years ago by RJVB (René Bertin)

Do you know how to apply patches? This should fix things for your 10.11 as I fixed them on my own 10.9 .

comment:6 Changed 6 years ago by mikealeonetti

There's a manually applying patches section on this article. https://guide.macports.org/chunked/development.patches.html

I'm assuming I can just cd to the directory, apply the patch, and re-run install?

comment:7 Changed 6 years ago by RJVB (René Bertin)

Yes, you can do something like

`

(cd port dir libVLC patch -Np3 -i /path/to/port:VLC.patch)

`

comment:8 Changed 6 years ago by mikealeonetti

It compiles and works. Although libvlc_new takes 21 seconds to load everything is working well.

Thanks so much!

comment:9 Changed 6 years ago by RJVB (René Bertin)

I take it you mean libvlc.5.dylib? I've never timed how long it takes to load but that's probably because I never noticed loading times even far less than 21s. If an official VLC 3.x build exists for OS X 10.11 you may want to check how much time that takes, if this bothers you.

Mojca, can I ask you to apply the patch and commit to the ports tree? A revbump shouldn't be necessary as the port didn't build before.

comment:10 Changed 6 years ago by mikealeonetti

No I’m good. Don’t mean to sound ungrateful. You had a patch with lightning speed. Thanks. I just have a habit of talking aloud. It drives my wife crazy. Thanks again!

comment:11 Changed 6 years ago by mojca (Mojca Miklavec)

I'm on vacations in the middle of nowhere with only occasional overlap of being abble to use my laptop and having internet access. If you submit a PR, I can click the button from my phone, else it will take time.

comment:12 Changed 6 years ago by RJVB (René Bertin)

Resolution: fixed
Status: assignedclosed

In 50c4c8e049ffed1ec5384017eb3d08080b9787ba/macports-ports (master):

VLC : make build on 10.11

fixes: #58206

Note: See TracTickets for help on using tickets.