Opened 4 years ago

Closed 4 years ago

#61265 closed defect (fixed)

libaacs: requires 10.7+ SDK

Reported by: chrstphrchvz (Christopher Chavez) Owned by: i0ntempest
Priority: Normal Milestone:
Component: ports Version: 2.6.3
Keywords: Cc:
Port: libaacs

Description

libaacs 0.10.0 and later do not build on macOS 10.6, due to usage of DISPATCH_QUEUE_SERIAL and DASessionSetDispatchQueue() which were introduced in macOS 10.7:

src/file/mmc_device_darwin.c:386:75: error: use of undeclared identifier 'DISPATCH_QUEUE_SERIAL'
    mmc->background_queue = dispatch_queue_create("org.videolan.libaacs", DISPATCH_QUEUE_SERIAL);
                                                                          ^
src/file/mmc_device_darwin.c:387:5: error: implicit declaration of function 'DASessionSetDispatchQueue' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    DASessionSetDispatchQueue(mmc->session, mmc->background_queue);
mv -f src/devtools/.deps/parser_test-parser_test.Tpo src/devtools/.deps/parser_test-parser_test.Po
    ^
src/file/mmc_device_darwin.c:405:9: error: implicit declaration of function 'DASessionSetDispatchQueue' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        DASessionSetDispatchQueue(mmc->session, NULL);
        ^
3 errors generated.

Should the port be set to require macOS 10.7 (refuse to build on 10.6 or earlier), or should it be pinned to the last version that built on 10.6 (libaacs 0.9.0)?

(I personally do not use this port.)

Change History (7)

comment:1 Changed 4 years ago by i0ntempest

0.9.0 is buggy & causes mpv to segfault, I think it’s better to just set it to require 10.7. Tho I kinda forgot how to do that, do you know a port I could copy code from?

comment:2 Changed 4 years ago by kencu (Ken)

As I recall, you just define that to zero,

Or build against the 10.7 SDK on 10.6, like we do with libsdl2.

Or maybe it really can't be fixed, I haven't tried yet...but it's not very easy to use the buildbot to do these fixes.

comment:3 Changed 4 years ago by i0ntempest

If I add the code to use 10.7 SDK to build on 10.6 would the 10.6 buildbot be able to build it? If not I'll need someone with a 10.6 VM trying it to know if it works.

comment:4 Changed 4 years ago by kencu (Ken)

It worked, it appears:

$ port -v installed libaacs
The following ports are currently installed:
  libaacs @0.11.0_0 (active) platform='darwin 10' archs='x86_64' date='2020-10-03T09:49:52-0700'

I added this bit from libsdl2 to the libaacs portfile:

platform macosx {
    if {${os.major} <= 10} {
        # Build requires at least 10.7.3 SDK, even when targeting 10.6
        set lion_sdkpath ${developer_dir}/SDKs/MacOSX10.7.sdk
        if {[file exists $lion_sdkpath]} {
            configure.sdkroot $lion_sdkpath
        } else {
            pre-fetch {
                error "Building $name @${version} on Mac OS X 10.6 requires the MacOSX10.7.sdk to be present in ${developer_dir}/SDKs/"
            }
        }
    }
}

I admit I have not seen an immediate way to test it, though.

comment:5 in reply to:  3 Changed 4 years ago by kencu (Ken)

Replying to i0ntempest:

If I add the code to use 10.7 SDK to build on 10.6 would the 10.6 buildbot be able to build it? If not I'll need someone with a 10.6 VM trying it to know if it works.

I think it will. Ryan installed the MacOSX10.7.sdk on the 10.6 buildbots a few years ago, as this was coming up now and then.

Last edited 4 years ago by kencu (Ken) (previous) (diff)

comment:6 Changed 4 years ago by i0ntempest

Right thanks, pushing a commit very soon

comment:7 Changed 4 years ago by i0ntempest

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.