emerging libdca-0.0.5

Anything that pertains to Portage

Moderator: Moderators

emerging libdca-0.0.5

Postby avi » Tue Jun 03, 2008 9:37

Hello,
While trying to install libdca-0.0.5 I get the error O_BINARY not defined.
after a little investigation it seems that ./configure searches for the io.h file in linux-headers.
Finds it and thus defines HAVE_IO_H 1 in config.h
The offending code is in files libdca-0.0.5/src/dcadec.c and libdca-0.0.5/src/extract_dca.c
where it tries to use the setmode function, to binary reading from stdin.

I would understand this being done on windows/cygwin but why on linux/Unix??

Am I missing something??
I had to patch the configure.ac and the above metioned source files to get it compiled.. and working.
Did anyone else have this problem?
Attaching patch....

Index: libdca-0.0.5/configure.ac
===================================================================
--- libdca-0.0.5.orig/configure.ac
+++ libdca-0.0.5/configure.ac
@@ -32,7 +32,6 @@ if test x"$GCC" = x"yes"; then
TRY_CFLAGS=`echo "$OPT_CFLAGS $CFLAGS"|sed "s/-O[0-9]*//g"`
changequote([,])
TRY_CFLAGS="$TRY_CFLAGS -O3"
- AC_TRY_CFLAGS([$TRY_CFLAGS],[OPT_CFLAGS=$TRY_CFLAGS; CFLAGS=""])

AC_ARG_ENABLE([debug],
[ --enable-debug debug mode configuration])
--- libdca-0.0.5.orig/configure.ac 2007-04-11 00:28:07.000000000 +1200
+++ libdca-0.0.5/configure.ac 2008-06-03 16:25:54.000000000 +1200
@@ -54,6 +54,10 @@
i686-*) TRY_CFLAGS="$OPT_CFLAGS -mtune=pentiumpro";;
k6-*) TRY_CFLAGS="$OPT_CFLAGS -mtune=k6";;
esac
+ echo "$host_os"
+ if test x"$host_os" = x"linux-gnu"; then
+ AC_DEFINE([LINUX],,[using for O_BINARY problem])
+ fi
AC_TRY_CFLAGS([$TRY_CFLAGS $CFLAGS],[OPT_CFLAGS=$TRY_CFLAGS]);;
sparc-* | sparc64-*)
TRY_CFLAGS="$OPT_CFLAGS -mtune=ultrasparc"
--- libdca-0.0.5.orig/src/dcadec.c 2007-04-08 21:03:48.000000000 +1200
+++ libdca-0.0.5/src/dcadec.c 2008-06-03 16:15:52.000000000 +1200
@@ -605,10 +605,12 @@
{
uint32_t accel;

+#ifndef LINUX
#ifdef HAVE_IO_H
setmode (fileno (stdin), O_BINARY);
setmode (fileno (stdout), O_BINARY);
#endif
+#endif

fprintf (stderr, PACKAGE"-"VERSION
" - by Gildas Bazin <gbazin@videolan.org>\n");
--- libdca-0.0.5.orig/src/extract_dca.c 2007-04-08 21:07:09.000000000 +1200
+++ libdca-0.0.5/src/extract_dca.c 2008-06-03 16:16:37.000000000 +1200
@@ -379,10 +379,13 @@

int main (int argc, char ** argv)
{
+
+#ifndef LINUX
#ifdef HAVE_IO_H
setmode (fileno (stdin), O_BINARY);
setmode (fileno (stdout), O_BINARY);
#endif
+#endif

handle_args (argc, argv);
avi
Baby Hen
 
Posts: 2
Joined: Tue Jun 03, 2008 9:16

Re: emerging libdca-0.0.5

Postby xlnagla » Wed Jun 04, 2008 0:39

Out of curiosity, did you use the overlays and portage proper for this package first? Usually those will have whatever patches anyone needs, and if not file a bug report!

~xlnagla
xlnagla
Sagely Hen
 
Posts: 1078
Joined: Mon May 28, 2007 2:44

Re: emerging libdca-0.0.5

Postby avi » Wed Jun 04, 2008 22:54

Hello,
Overlays even after syncing do not have any patches for libdca, emerging from the proper portage tree also aborts the build midway saying O_BINARY not defined.
That's the reason I patched it (libdca) and emerged it after changing the digest with my own overlay. I would have filed a bug report but want to know if this problem occurs for anyone else but me.....??
Finally checked the Bugzilla for libdca --> says --> Zaroo Bugs.


cheers,
avi
Baby Hen
 
Posts: 2
Joined: Tue Jun 03, 2008 9:16

Re: emerging libdca-0.0.5

Postby xlnagla » Thu Jun 05, 2008 1:05

excellent, thanks for making sure the devs know.

~xlnagla
xlnagla
Sagely Hen
 
Posts: 1078
Joined: Mon May 28, 2007 2:44


Return to Portage|Emerge Package Managers

Who is online

Users browsing this forum: No registered users and 1 guest

cron