Bug#720440: mpg123: mpg123 does not build LFS wrappers on kfreebsd-i386

Reinhard Tartler siretart at gmail.com
Sat Aug 31 08:03:46 UTC 2013


On Wed, Aug 28, 2013 at 10:24 AM, Thomas Orgis <thomas-forum at orgis.org> wrote:
> The mpg123 header specifies off_t as argument.
> When off_t is always 64 bits (could you possibly set
> _FILE_OFFSET_BITS=32 ?!), there is no justification for _32 functions
> at all! So, you only want lfs_alias for [no suffix] -> _64. You dont't
> want lfs_wrap. That eases the problem, actually. Just make sure _not_
> to include lfs_wrap and define _FILE_OFFSET_BITS=64 in configure for
> lfs_alias. That should just work ...

Makes sense. This patch to configure at least compiles and provides
the symbols in libmpg123.so:


Index: mpg123/configure.ac
===================================================================
--- mpg123.orig/configure.ac    2013-08-29 19:19:25.000000000 +0000
+++ mpg123/configure.ac 2013-08-31 07:18:45.000000000 +0000
@@ -934,12 +934,24 @@
 AC_CHECK_SIZEOF(int32_t)
 AC_CHECK_SIZEOF(long,4)

+dnl unless we are on e.g., kfreebsd-i386, then enable it anyways,
here off_t is wide
+dnl cf. http://lists.gnu.org/archive/html/autoconf/2003-01/msg00010.html
+AC_MSG_CHECKING(whether system is 32bit but has 64bit off_t)
+ac_cv_sys_wide_off_t="no"
+if test ".$ac_cv_sizeof_size_t$ac_cv_sys_file_offset_bits$ac_cv_sizeof_off_t"
= ".4no8"; then
+       ac_cv_sys_wide_off_t="yes"
+#      ac_cv_sys_file_offset_bits=64
+       AC_DEFINE(LARGEFILE_WIDE64_OFF_T, 1,
+       [whether the system is 32bit, but has 64bit off_t])
+fi
+AC_MSG_RESULT([$ac_cv_sys_wide_off_t])
+
 # The alias functions want to know the native off_t bits.
 # "Native" also means large file offsets, if enabled, it's what is
native to the mpg123 library.
-if test "x$ac_cv_sizeof_long" = "x"; then
-  AC_MSG_ERROR([Cannot determine sizeof(long)?])
+if test "x$ac_cv_sizeof_off_t" = "x"; then
+  AC_MSG_ERROR([Cannot determine sizeof(off_t)?])
 else
-  LFS_ALIAS_BITS=`expr "$ac_cv_sizeof_long" "*" "8"`
+  LFS_ALIAS_BITS=`expr "$ac_cv_sizeof_off_t" "*" "8"`
   AC_DEFINE_UNQUOTED([LFS_ALIAS_BITS], $LFS_ALIAS_BITS,
     [Define this to the size of long type in bits, used for LFS
small/native alias functions.])
 fi
Index: mpg123/src/libmpg123/mpg123lib_intern.h
===================================================================
--- mpg123.orig/src/libmpg123/mpg123lib_intern.h        2013-08-31
07:47:44.000000000 +0000
+++ mpg123/src/libmpg123/mpg123lib_intern.h     2013-08-31
07:28:40.000000000 +0000
@@ -45,6 +45,11 @@
 #define BUILD_MPG123_DLL
 #endif
 #include "compat.h"
+
+#ifdef LARGEFILE_WIDE64_OFF_T
+#define MPG123_NO_LARGENAME 1
+#endif
+
 #include "mpg123.h"

This patch at least does lead to a kfreebsd-i386 package that does
provide the _64 bit wrappers. I also believe that it does not have on
other architectures.

Thomas, may I have your opinion on this patch? If you are d'accord,
I'd upload it to debian/unstable for further testing.

Thanks for your prompt assistance,
Reinhard

-- 
regards,
    Reinhard



More information about the pkg-multimedia-maintainers mailing list