Opened 19 years ago

Last modified 8 years ago

#3144 closed defect

cdrtools 2.01: cdda2wav does not build — at Initial Version

Reported by: roeland@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.0
Keywords: Cc:
Port: cdrtools

Description

PROBLEM The cdda2wav program, part of the cdrtools 2.01 port, fails to link on Darwin 8.1.0 (Mac OS X 10.4) with the error:

... /usr/bin/ld: warning prebinding disabled because of undefined symbols /usr/bin/ld: Undefined symbols: _sched_setscheduler collect2: ld returned 1 exit status gnumake[1]: * [OBJ/powerpc-darwin-cc/cdda2wav] Error 1 ...

The port continues to build and is installed successfully, with the exception of cdda2wav.

CAUSE System function sched_setscheduler is not available in Darwin 8.1.0; in /usr/include/unistd.h, _POSIX_PRIORITY_SCHEDULING is defined to be -1. However, in cdda2wav.c there is only a check whether _POSIX_PRIORITY_SCHEDULING is defined or not, its value is not tested; if defined, a call to sched_setscheduler is included in the code.

SOLUTION Extend the check of _POSIX_PRIORITY_SCHEDULING with a test of its value, for example:

======== patch for cdrtools-2.01/cdda2wav/cdda2wav.c ======== --- cdda2wav/cdda2wav.c.orig 2004-08-24 17:06:14.000000000 +0200 +++ cdda2wav/cdda2wav.c 2005-05-19 17:18:14.000000000 +0200 @@ -970,7 +970,7 @@

dontneedroot();

} #else

-#if defined _POSIX_PRIORITY_SCHEDULING +#if defined _POSIX_PRIORITY_SCHEDULING && (_POSIX_PRIORITY_SCHEDULING -0 > 0)

#include <sched.h>

static void

======== end of patch for cdrtools-2.01/cdda2wav/cdda2wav.c ========

Change History (0)

Note: See TracTickets for help on using tickets.