Re: Xine-lib fails to compile
Darren Salt <[email protected]>
| Newsgroups | gmane.comp.video.xine.user |
|---|---|
| Message-ID | <4F83069604%[email protected]> |
I demand that Zach Wegner may or may not have written... > I've been trying to get xine-lib (both 1.1.8 and 1.1.10.1) to compile on a > NetBSD4.0/amd64 box, to no avail. It configures fine, except for a few > warnings: > > ................ > > checking X11/extensions/XShm.h usability... no > checking X11/extensions/XShm.h presence... yes > configure: WARNING: X11/extensions/XShm.h: present but cannot be compiled > configure: WARNING: X11/extensions/XShm.h: check for missing > prerequisite headers? > configure: WARNING: X11/extensions/XShm.h: see the Autoconf documentation > configure: WARNING: X11/extensions/XShm.h: section "Present But Cannot > Be Compiled" > configure: WARNING: X11/extensions/XShm.h: proceeding with the > preprocessor's result > configure: WARNING: X11/extensions/XShm.h: in the future, the compiler will > take precedence > checking for X11/extensions/XShm.h... yes config.log will be helpful here. (BTW, don't duplicate your message in HTML. It's pointless and a waste of space.) [snip] > Then, when I try to compile, I get an error in src/audio_out/: > audio_oss_out.c:431: error: 'SNDCTL_DSP_GETODELAY' undeclared (first use in > this function) > OK, so no OSS audio. I read that OSS is not in NetBSD, or something like > that...? If it's just that one ioctl macro, then testing for its presence should be sufficient (see attached). > Anyways, I reconfigured with --disable-oss and then tried to make, > but got a whole heap of errors: > > ............... > > .libs/xineplug_vo_out_xshm_la-yuv2rgb.o: In function > `yuv2rgb_factory_dispose': > /root/Desktop/xine-lib-1.1.8/src/video_out/yuv2rgb.c:3186: undefined > reference to `free' [more of the same] > .libs/xineplug_vo_out_xshm_la-yuv2rgb.o: In function > `yuv2rgb_set_csc_levels': > /root/Desktop/xine-lib-1.1.8/src/video_out/yuv2rgb.c:2427: undefined > reference to `__sF' ... whatever __sF is. > /root/Desktop/xine-lib-1.1.8/src/video_out/yuv2rgb.c:2427: undefined > reference to `fprintf' [more missing C lib functions] What, exactly, was the command (displayed by make) which caused this? (And why are you compiling it as root?) -- | Darren Salt | linux or ds at | nr. Ashington, | Toon | RISC OS, Linux | youmustbejoking,demon,co,uk | Northumberland | Army | + Use more efficient products. Use less. BE MORE ENERGY EFFICIENT. A hermit is a deserter from the army of humanity. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ xine-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/xine-user
xine-lib_bsd_oss.patch
(application/octet-stream, 1.8 KB)
diff --git a/src/audio_out/audio_oss_out.c b/src/audio_out/audio_oss_out.c
--- a/src/audio_out/audio_oss_out.c
+++ b/src/audio_out/audio_oss_out.c
@@ -405,6 +405,18 @@ static int ao_oss_delay(ao_driver_t *thi
if (bytes_left<=0) /* buffer ran dry */
bytes_left = 0;
break;
+ case OSS_SYNC_GETODELAY:
+#ifdef SNDCTL_DSP_GETODELAY
+ if (ioctl (this->audio_fd, SNDCTL_DSP_GETODELAY, &bytes_left)) {
+ perror ("audio_oss_out: DSP_GETODELAY ioctl():");
+ }
+ if (bytes_left<0)
+ bytes_left = 0;
+
+ lprintf ("%d bytes left\n", bytes_left);
+
+ break;
+#endif
case OSS_SYNC_GETOPTR:
if (ioctl (this->audio_fd, SNDCTL_DSP_GETOPTR, &info)) {
perror ("audio_oss_out: SNDCTL_DSP_GETOPTR failed:");
@@ -423,16 +435,6 @@ static int ao_oss_delay(ao_driver_t *thi
this->bytes_in_buffer = info.bytes;
}
this->last_getoptr = info.bytes;
- break;
- case OSS_SYNC_GETODELAY:
- if (ioctl (this->audio_fd, SNDCTL_DSP_GETODELAY, &bytes_left)) {
- perror ("audio_oss_out: DSP_GETODELAY ioctl():");
- }
- if (bytes_left<0)
- bytes_left = 0;
-
- lprintf ("%d bytes left\n", bytes_left);
-
break;
}
@@ -840,10 +842,13 @@ static ao_driver_t *open_plugin (audio_d
* check if SNDCTL_DSP_GETODELAY works. if so, using it is preferred.
*/
+#ifdef SNDCTL_DSP_GETODELAY
if (ioctl(audio_fd, SNDCTL_DSP_GETODELAY, &info) != -1) {
xprintf(class->xine, XINE_VERBOSITY_DEBUG, "audio_oss_out: using SNDCTL_DSP_GETODELAY\n");
this->sync_method = OSS_SYNC_GETODELAY;
- } else if (ioctl(audio_fd, SNDCTL_DSP_GETOPTR, &info) != -1) {
+ } else
+#endif
+ if (ioctl(audio_fd, SNDCTL_DSP_GETOPTR, &info) != -1) {
xprintf(class->xine, XINE_VERBOSITY_DEBUG, "audio_oss_out: using SNDCTL_DSP_GETOPTR\n");
this->sync_method = OSS_SYNC_GETOPTR;
} else {