[MacPorts] #3144: BUG: cdrtools 2.01: cdda2wav does not build
MacPorts
noreply at macports.org
Thu Mar 24 07:08:59 PDT 2016
#3144: BUG: cdrtools 2.01: cdda2wav does not build
------------------------+--------------------------------
Reporter: roeland@… | Owner: macports-tickets@…
Type: defect | Status: closed
Priority: Normal | Milestone:
Component: ports | Version: 1.0
Resolution: fixed | Keywords:
Port: cdrtools |
------------------------+--------------------------------
Changes (by ryandesign@…):
* port: => cdrtools
Old 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 ========
New 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 ========
--
--
Ticket URL: <https://trac.macports.org/ticket/3144#comment:3>
MacPorts <https://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list