Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation fails with default compiler flags on Ubuntu 13.10 (at least) #10

Open
benalavi opened this issue Jan 22, 2014 · 2 comments
Open

Comments

@benalavi
Copy link

On Ubuntu 13.10 (and possibly other systems with the default compiler flag -Werror=format-security) the gem native extension will fail to build. You can get around this by installing with gem install ruby-audio --with-cflags=-Wno-error=format-security but I suppose the C-extension should be updated to not cause a security error (or at least a note added somewhere, I'm not a C expert so not sure what really should be done to remedy).

@lephuongbg
Copy link

I'm also having this problem on Ubuntu 14.04. I just want to add a small fix to your command (if anyone is wondering why it doesn't work, me did also):

gem install ruby-audio -- --with-cflags=-Wno-error=format-security

@sp00ck
Copy link

sp00ck commented Sep 25, 2022

ra_soundinfo.h:11:14: warning: ‘ra_soundinfo_free’ declared ‘static’ but never defined [-Wunused-function]
11 | static void ra_soundinfo_free(SF_INFO *info);
| ^~~~~~~~~~~~~~~~~
ra_soundinfo.h:14:14: warning: ‘ra_soundinfo_valid’ declared ‘static’ but never defined [-Wunused-function]
14 | static VALUE ra_soundinfo_valid(VALUE self);
| ^~~~~~~~~~~~~~~~~~
ra_soundinfo.h:15:14: warning: ‘ra_soundinfo_frames’ declared ‘static’ but never defined [-Wunused-function]
15 | static VALUE ra_soundinfo_frames(VALUE self);
| ^~~~~~~~~~~~~~~~~~~
ra_soundinfo.h:16:14: warning: ‘ra_soundinfo_samplerate’ declared ‘static’ but never defined [-Wunused-function]
16 | static VALUE ra_soundinfo_samplerate(VALUE self);
| ^~~~~~~~~~~~~~~~~~~~~~~
ra_soundinfo.h:17:14: warning: ‘ra_soundinfo_samplerate_set’ declared ‘static’ but never defined [-Wunused-function]
17 | static VALUE ra_soundinfo_samplerate_set(VALUE self, VALUE new_samplerate);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
ra_soundinfo.h:18:14: warning: ‘ra_soundinfo_channels’ declared ‘static’ but never defined [-Wunused-function]
18 | static VALUE ra_soundinfo_channels(VALUE self);
| ^~~~~~~~~~~~~~~~~~~~~
ra_soundinfo.h:19:14: warning: ‘ra_soundinfo_channels_set’ declared ‘static’ but never defined [-Wunused-function]
19 | static VALUE ra_soundinfo_channels_set(VALUE self, VALUE new_channels);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
ra_soundinfo.h:20:14: warning: ‘ra_soundinfo_format’ declared ‘static’ but never defined [-Wunused-function]
20 | static VALUE ra_soundinfo_format(VALUE self);
| ^~~~~~~~~~~~~~~~~~~
ra_soundinfo.h:21:14: warning: ‘ra_soundinfo_format_set’ declared ‘static’ but never defined [-Wunused-function]
21 | static VALUE ra_soundinfo_format_set(VALUE self, VALUE new_format);
| ^~~~~~~~~~~~~~~~~~~~~~~
ra_soundinfo.h:22:14: warning: ‘ra_soundinfo_sections’ declared ‘static’ but never defined [-Wunused-function]
22 | static VALUE ra_soundinfo_sections(VALUE self);
| ^~~~~~~~~~~~~~~~~~~~~
ra_soundinfo.h:23:14: warning: ‘ra_soundinfo_seekable’ declared ‘static’ but never defined [-Wunused-function]
23 | static VALUE ra_soundinfo_seekable(VALUE self);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from ra_sound.h:7,
from ra_sound.c:1:
ra_buffer.h:24:14: warning: ‘ra_buffer_allocate’ declared ‘static’ but never defined [-Wunused-function]
24 | static VALUE ra_buffer_allocate(VALUE klass);
| ^~~~~~~~~~~~~~~~~~
ra_buffer.h:25:14: warning: ‘ra_buffer_free’ declared ‘static’ but never defined [-Wunused-function]
25 | static void ra_buffer_free(RA_BUFFER *buf);
| ^~~~~~~~~~~~~~
ra_buffer.h:28:14: warning: ‘ra_buffer_init’ declared ‘static’ but never defined [-Wunused-function]
28 | static VALUE ra_buffer_init(int argc, VALUE *argv, VALUE self);
| ^~~~~~~~~~~~~~
ra_buffer.h:29:14: warning: ‘ra_buffer_init_copy’ declared ‘static’ but never defined [-Wunused-function]
29 | static VALUE ra_buffer_init_copy(VALUE copy, VALUE buf);
| ^~~~~~~~~~~~~~~~~~~
ra_buffer.h:30:14: warning: ‘ra_buffer_channels’ declared ‘static’ but never defined [-Wunused-function]
30 | static VALUE ra_buffer_channels(VALUE self);
| ^~~~~~~~~~~~~~~~~~
ra_buffer.h:31:14: warning: ‘ra_buffer_size’ declared ‘static’ but never defined [-Wunused-function]
31 | static VALUE ra_buffer_size(VALUE self);
| ^~~~~~~~~~~~~~
ra_buffer.h:32:14: warning: ‘ra_buffer_real_size’ declared ‘static’ but never defined [-Wunused-function]
32 | static VALUE ra_buffer_real_size(VALUE self);
| ^~~~~~~~~~~~~~~~~~~
ra_buffer.h:33:14: warning: ‘ra_buffer_real_size_set’ declared ‘static’ but never defined [-Wunused-function]
33 | static VALUE ra_buffer_real_size_set(VALUE self, VALUE new_real_size);
| ^~~~~~~~~~~~~~~~~~~~~~~
ra_buffer.h:34:14: warning: ‘ra_buffer_type’ declared ‘static’ but never defined [-Wunused-function]
34 | static VALUE ra_buffer_type(VALUE self);
| ^~~~~~~~~~~~~~
ra_buffer.h:35:14: warning: ‘ra_buffer_each’ declared ‘static’ but never defined [-Wunused-function]
35 | static VALUE ra_buffer_each(VALUE self);
| ^~~~~~~~~~~~~~
ra_buffer.h:36:14: warning: ‘ra_buffer_aref’ declared ‘static’ but never defined [-Wunused-function]
36 | static VALUE ra_buffer_aref(VALUE self, VALUE index);
| ^~~~~~~~~~~~~~
ra_buffer.h:37:14: warning: ‘ra_buffer_index_get’ declared ‘static’ but never defined [-Wunused-function]
37 | static VALUE ra_buffer_index_get(RA_BUFFER *buf, long i);
| ^~~~~~~~~~~~~~~~~~~
ra_buffer.h:38:14: warning: ‘ra_buffer_aset’ declared ‘static’ but never defined [-Wunused-function]
38 | static VALUE ra_buffer_aset(VALUE self, VALUE index, VALUE val);
| ^~~~~~~~~~~~~~
ra_buffer.h:39:13: warning: ‘ra_buffer_index_set’ declared ‘static’ but never defined [-Wunused-function]
39 | static void ra_buffer_index_set(RA_BUFFER *buf, long i, VALUE val);
| ^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make: *** [Makefile:245: ra_sound.o] Błąd 1


fedora

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants