soundcloud2000
soundcloud2000 copied to clipboard
Can't compile on gentoo linux
hi, trying to compile on gentoo, stops with this output:
/usr/bin/ruby19 extconf.rb checking for portaudio.h... yes checking for main() in -lportaudio... yes checking for PaStreamCallbackTimeInfo in portaudio.h... yes creating Makefile
make compiling portaudio.c linking shared-object portaudio.so portaudio.o: nella funzione "rb_portaudio_write_from_mpg": portaudio.c:(.text+0x4d9): riferimento non definito a "mpg123_read" portaudio.c:(.text+0x534): riferimento non definito a "mpg123_plain_strerror" collect2: error: ld returned 1 exit status make: *** [portaudio.so] Errore 1
maybe some specific support must be enabled in portaudio? my version is 19_pre20140130, compiled with following flags: alsa cxx -debug -jack -oss -static-libs.
thanks in advance
Hi, funkoolow. I have the same problem as you described. Seems like problem is caused by absence of "-lmpg123" in the Makefile for portaudio extension of "audite" gem. For me, it is /usr/local/lib64/ruby/gems/1.9.1/gems/audite-0.3.0/ext/portaudio/Makefile
If I change this line
LIBS = $(LIBRUBYARG_SHARED) -lportaudio -lpthread -lrt -ldl -lcrypt -lm -lc
to this (adding -lmpg123):
LIBS = $(LIBRUBYARG_SHARED) -lportaudio -lmpg123 -lpthread -lrt -ldl -lcrypt -lm -lc
then this command
cd /usr/local/lib64/ruby/gems/1.9.1/gems/audite-0.3.0/ext/portaudio make
runs successfully and "portaudio.so" compiles.
I am not a rubyist, so I don't know how to put that change correctly into "gem install audite" procedure.
I'm also having the same issue compiling on Cygwin.
Ruby seems to cache my partially installed gem in a different place (~/.gem/ruby/gems/audite-0.4.0/ext/portaudio
) but I too can add -lmpg123
and get a portaudio.so
.
I'm frankly very confused why this isn't in the Makefile to begin with, possibly it isn't required on some platforms?
Besides that, it seems impossible to continue the installation of the gem after compiling the .so manually. gem install audite
simply deletes the .so you just compiled and nukes the changes to the Makefile so it fails again.
Is Ruby just painful like this? I also can't figure out how to install a gem "from source", audite
and soundcloud2000
are both open source, but it seems impossible to build them without using the gem
program.
Add -lmpg123
to LIBS in /usr/lib/ruby/2.2.0/rbconfig.rb
, e.g. change CONFIG["LIBS"] = "-lpthread -lgmp -ldl -lcrypt"
to CONFIG["LIBS"] = "-lpthread -lgmp -ldl -lcrypt -lmpg123"
Built it successfully on Cygwin.