Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] libsndfile: Add -D_FILE_OFFSET_BITS=64 to configuration
@ 2012-09-17  6:48 Ryan Mallon
  2012-09-17 17:05 ` Thomas Petazzoni
  0 siblings, 1 reply; 3+ messages in thread
From: Ryan Mallon @ 2012-09-17  6:48 UTC (permalink / raw)
  To: buildroot

libsndfile requires sizeof(sf_count_t) == 8, where sf_count_t is a
typedef alias for off_t. This is not true by default for all
tool-chains, which leads to a runtime assert failure in binaries
compiled against libsndfile. See:
    
  http://permalink.gmane.org/gmane.comp.audio.libsndfile.devel/229
   
Add -D_FILE_OFFSET_BITS=64 to the configuration for libsndfile to
ensure that off_t is the correct size.
    
Signed-off-by: Ryan Mallon <rmallon@gmail.com>
---

diff --git a/package/libsndfile/libsndfile.mk b/package/libsndfile/libsndfile.m
index e5fbb5e..5e39aca 100644
--- a/package/libsndfile/libsndfile.mk
+++ b/package/libsndfile/libsndfile.mk
@@ -7,5 +7,7 @@
 LIBSNDFILE_VERSION = 1.0.25
 LIBSNDFILE_SITE = http://www.mega-nerd.com/libsndfile/files
 LIBSNDFILE_INSTALL_STAGING = YES
+LIBSNDFILE_CFLAGS = $(TARGET_CFLAGS) -D_FILE_OFFSET_BITS=64
+LIBSNDFILE_CONF_ENV += CFLAGS="$(LIBSNDFILE_CFLAGS)"
 
 $(eval $(autotools-package))

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] libsndfile: Add -D_FILE_OFFSET_BITS=64 to configuration
  2012-09-17  6:48 [Buildroot] [PATCH] libsndfile: Add -D_FILE_OFFSET_BITS=64 to configuration Ryan Mallon
@ 2012-09-17 17:05 ` Thomas Petazzoni
  2012-09-17 20:37   ` Ryan Mallon
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2012-09-17 17:05 UTC (permalink / raw)
  To: buildroot

Dear Ryan Mallon,

On Mon, 17 Sep 2012 16:48:14 +1000, Ryan Mallon wrote:
> libsndfile requires sizeof(sf_count_t) == 8, where sf_count_t is a
> typedef alias for off_t. This is not true by default for all
> tool-chains, which leads to a runtime assert failure in binaries
> compiled against libsndfile. See:
>     
>   http://permalink.gmane.org/gmane.comp.audio.libsndfile.devel/229
>    
> Add -D_FILE_OFFSET_BITS=64 to the configuration for libsndfile to
> ensure that off_t is the correct size.
>     
> Signed-off-by: Ryan Mallon <rmallon@gmail.com>
> ---
> 
> diff --git a/package/libsndfile/libsndfile.mk
> b/package/libsndfile/libsndfile.m index e5fbb5e..5e39aca 100644
> --- a/package/libsndfile/libsndfile.mk
> +++ b/package/libsndfile/libsndfile.mk
> @@ -7,5 +7,7 @@
>  LIBSNDFILE_VERSION = 1.0.25
>  LIBSNDFILE_SITE = http://www.mega-nerd.com/libsndfile/files
>  LIBSNDFILE_INSTALL_STAGING = YES
> +LIBSNDFILE_CFLAGS = $(TARGET_CFLAGS) -D_FILE_OFFSET_BITS=64
> +LIBSNDFILE_CONF_ENV += CFLAGS="$(LIBSNDFILE_CFLAGS)"

This looks strange: Buildroot already automatically passes
-D_FILE_OFFSET_BITS=64 when BR2_LARGEFILE=y, see package/Makefile.in.

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] libsndfile: Add -D_FILE_OFFSET_BITS=64 to configuration
  2012-09-17 17:05 ` Thomas Petazzoni
@ 2012-09-17 20:37   ` Ryan Mallon
  0 siblings, 0 replies; 3+ messages in thread
From: Ryan Mallon @ 2012-09-17 20:37 UTC (permalink / raw)
  To: buildroot

On 18/09/12 03:05, Thomas Petazzoni wrote:

> Dear Ryan Mallon,
> 
> On Mon, 17 Sep 2012 16:48:14 +1000, Ryan Mallon wrote:
>> libsndfile requires sizeof(sf_count_t) == 8, where sf_count_t is a
>> typedef alias for off_t. This is not true by default for all
>> tool-chains, which leads to a runtime assert failure in binaries
>> compiled against libsndfile. See:
>>     
>>   http://permalink.gmane.org/gmane.comp.audio.libsndfile.devel/229
>>    
>> Add -D_FILE_OFFSET_BITS=64 to the configuration for libsndfile to
>> ensure that off_t is the correct size.
>>     
>> Signed-off-by: Ryan Mallon <rmallon@gmail.com>
>> ---
>>
>> diff --git a/package/libsndfile/libsndfile.mk
>> b/package/libsndfile/libsndfile.m index e5fbb5e..5e39aca 100644
>> --- a/package/libsndfile/libsndfile.mk
>> +++ b/package/libsndfile/libsndfile.mk
>> @@ -7,5 +7,7 @@
>>  LIBSNDFILE_VERSION = 1.0.25
>>  LIBSNDFILE_SITE = http://www.mega-nerd.com/libsndfile/files
>>  LIBSNDFILE_INSTALL_STAGING = YES
>> +LIBSNDFILE_CFLAGS = $(TARGET_CFLAGS) -D_FILE_OFFSET_BITS=64
>> +LIBSNDFILE_CONF_ENV += CFLAGS="$(LIBSNDFILE_CFLAGS)"
> 
> This looks strange: Buildroot already automatically passes
> -D_FILE_OFFSET_BITS=64 when BR2_LARGEFILE=y, see package/Makefile.in.


Okay, I didn't realise that. libsndfile should either depend on or
select (probably the latter) that package then. I will post a follow up.

Thanks,
~Ryan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-09-17 20:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-17  6:48 [Buildroot] [PATCH] libsndfile: Add -D_FILE_OFFSET_BITS=64 to configuration Ryan Mallon
2012-09-17 17:05 ` Thomas Petazzoni
2012-09-17 20:37   ` Ryan Mallon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox