Opened 4 years ago

Closed 4 years ago

#61580 closed defect (fixed)

libdv @1.0.0 build failure with Xcode 12

Reported by: MaurizioLoreti Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: bigsur catalina Cc:
Port: libdv

Description

I just upgraded to Big Sur, and I am reinstalling ports from scratch. I need transcode, that depends from libdv, that does not compile (report attached). libdv is maintained by (nobody). May some kind peolpe help?

Attachments (1)

main.log (247.7 KB) - added by MaurizioLoreti 4 years ago.

Download all attachments as: .zip

Change History (7)

Changed 4 years ago by MaurizioLoreti

Attachment: main.log added

comment:1 Changed 4 years ago by jmroot (Joshua Root)

Port: libdv added
Summary: libdv does not installlibdv @1.0.0 build failure with Xcode 12
:info:build dvconnect.c:873:7: error: implicit declaration of function 'sched_setscheduler' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
:info:build                 if (sched_setscheduler (0, SCHED_RR, &scp) < 0) {
:info:build                     ^

comment:2 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: bigsur catalina added
Owner: set to ryandesign
Status: newaccepted

There hasn't been a release of libdv since 2006 so I don't expect upstream to help, but I'll see what I can do.

comment:3 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

sched_setscheduler is a Linux function that has never existed on macOS, as far as I can tell, so I'm scratching my head how this ever compiled on macOS before.

comment:4 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

A patch for this was submitted in 2009: https://sourceforge.net/p/libdv/patches/43/

comment:5 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Initially the patch didn't work for me: it adds a configure test for sched_setscheduler but it surprisingly determined that it was available, and then the build failed as before.

I noticed that the port forces the use of -flat_namespace -undefined suppress which has been in the port ever since it was added in 2005 in [8ed1835344effbeda34c7df31fce834174521fcf/macports-ports]. That was right after the release of Mac OS X 10.3. The use of the flat namespace was typical on Mac OS X 10.2 and earlier but in 10.3 and later the two-level namespace should be used instead. After removing the lines that forced the flat namespace, the configure test correctly determines that sched_setscheduler doesn't exist and the build succeeds.

Version 0, edited 4 years ago by ryandesign (Ryan Carsten Schmidt) (next)

comment:6 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: acceptedclosed

In 3a44daacbc5f67cc1b95835810f04e3868a5a973/macports-ports (master):

libdv: Fix implicit declaration of function

Don't try to use sched_setscheduler on macOS where it doesn't exist.

Closes: #61580

Note: See TracTickets for help on using tickets.