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

portaudio ext Makefile does not include -lmpg123 #16

Open
assertivist opened this issue Jan 20, 2016 · 0 comments
Open

portaudio ext Makefile does not include -lmpg123 #16

assertivist opened this issue Jan 20, 2016 · 0 comments

Comments

@assertivist
Copy link

This causes the build to fail for me when using gem install. See my comment on grobie/soundcloud2000 issue 58. Manually adding -lmpg123 to the Makefile and running make again successfully builds portaudio.so.

grobie/soundcloud2000#58 (comment)

$ gem install audite -- --with-cppflags=-I/usr/local/include --with-ldflags=-L/usr/local/lib
Building native extensions with: '--with-cppflags=-I/usr/local/include --with-ldflags=-L/usr/local/lib'
This could take a while...
ERROR:  Error installing audite:hal ERROR: Failed to build gem native extension.

/usr/bin/ruby.exe -r ./siteconf20160120-6292-bwquhm.rb extconf.rb --with-cppflags=-I/usr/local/include --with-ldflags=-L/usr/local/lib
checking for portaudio.h... yes
checking for main() in -lportaudio... yes
checking for PaStreamCallbackTimeInfo in portaudio.h... yes
creating Makefile

make "DESTDIR=" clean
rm -f
rm -f portaudio.so  *.o  *.bak mkmf.log .*.time

make "DESTDIR="
gcc -I. -I/usr/include/ruby-2.2.0 -I/usr/include/ruby-2.2.0/ruby/backward -I/usr/include/ruby-2.2.0 -I. -DHAVE_PORTAUDIO_H -DHAVE_TYPE_PASTREAMCALLBACKTIMEINFO -I/usr/local/include  -ggdb -O2 -pipe -Wimplicit-function-declaration    -o portaudio.o -c portaudio.c
portaudio.c: In function ‘rb_portaudio_wait’:
portaudio.c:139:3: warning: implicit declaration of function ‘rb_thread_call_without_gvl’ [-Wimplicit-function-declaration]
   rb_thread_call_without_gvl(portaudio_wait, portaudio, RUBY_UBF_IO, NULL);
   ^
rm -f portaudio.so
gcc -shared -o portaudio.so portaudio.o -L. -L/usr/lib -L/usr/local/lib -Wl,--export-all-symbols -Wl,--enable-auto-image-base,--enable-auto-import    -lruby220 -lportaudio  -lpthread -lgmp -ldl -lcrypt
portaudio.o: In function `rb_portaudio_write_from_mpg':
/home/user/.gem/ruby/gems/audite-0.4.0/ext/portaudio/portaudio.c:120: undefined reference to `mpg123_read'
/home/user/.gem/ruby/gems/audite-0.4.0/ext/portaudio/portaudio.c:120:(.text+0x4f6): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `mpg123_read'
/home/user/.gem/ruby/gems/audite-0.4.0/ext/portaudio/portaudio.c:130: undefined reference to `mpg123_plain_strerror'
/home/user/.gem/ruby/gems/audite-0.4.0/ext/portaudio/portaudio.c:130:(.text+0x51e): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `mpg123_plain_strerror'
collect2: error: ld returned 1 exit status
Makefile:254: recipe for target 'portaudio.so' failed
make: *** [portaudio.so] Error 1

make failed, exit code 2
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

1 participant