soundcloud2000 icon indicating copy to clipboard operation
soundcloud2000 copied to clipboard

Issues compiling on Funtoo

Open lozenge57 opened this issue 10 years ago • 5 comments

I apologize if this I overlooked the solution or missed the obvious answer.

lozenge@ramtag ~> sudo gem install soundcloud2000
Building native extensions.  This could take a while...
ERROR:  Error installing soundcloud2000:
    ERROR: Failed to build gem native extension.

    current directory: /usr/local/lib64/ruby/gems/2.2.0/gems/audite-0.4.0/ext/portaudio
/usr/bin/ruby22 -r ./siteconf20160201-2646-18myoch.rb extconf.rb
checking for portaudio.h... yes
checking for main() in -lportaudio... yes
checking for PaStreamCallbackTimeInfo in portaudio.h... yes
creating Makefile

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /usr/local/lib64/ruby/gems/2.2.0/extensions/x86_64-linux/2.2.0/audite-0.4.0/mkmf.log

current directory: /usr/local/lib64/ruby/gems/2.2.0/gems/audite-0.4.0/ext/portaudio
make "DESTDIR=" clean

current directory: /usr/local/lib64/ruby/gems/2.2.0/gems/audite-0.4.0/ext/portaudio
make "DESTDIR="
compiling portaudio.c
linking shared-object portaudio.so
portaudio.o: In function `rb_portaudio_write_from_mpg':
portaudio.c:(.text+0x4e6): undefined reference to `mpg123_read'
portaudio.c:(.text+0x50e): undefined reference to `mpg123_plain_strerror'
collect2: error: ld returned 1 exit status
Makefile:253: recipe for target 'portaudio.so' failed
make: *** [portaudio.so] Error 1

make failed, exit code 2

Gem files will remain installed in /usr/local/lib64/ruby/gems/2.2.0/gems/audite-0.4.0 for inspection.
Results logged to /usr/local/lib64/ruby/gems/2.2.0/extensions/x86_64-linux/2.2.0/audite-0.4.0/gem_make.out

lozenge57 avatar Feb 01 '16 05:02 lozenge57

have_header: checking for portaudio.h... -------------------- yes

"x86_64-pc-linux-gnu-gcc -o conftest -I/usr/include/ruby-2.2.0/x86_64-linux -I/usr/include/ruby-2.2.0/ruby/backward -I/usr/include/ruby-2.2.0 -I.    -march=core2 -O2 -pipe -fno-strict-aliasing -fPIC conftest.c  -L. -L/usr/lib64 -L. -Wl,-O1 -Wl,--sort-common -Wl,--as-needed -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,--no-undefined     -lruby22  -lpthread -lgmp -ldl -lcrypt -lm   -lc"
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: int main(int argc, char **argv)
4: {
5:   return 0;
6: }
/* end */

"x86_64-pc-linux-gnu-gcc -E -I/usr/include/ruby-2.2.0/x86_64-linux -I/usr/include/ruby-2.2.0/ruby/backward -I/usr/include/ruby-2.2.0 -I.    -march=core2 -O2 -pipe -fno-strict-aliasing -fPIC  conftest.c -o conftest.i"
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <portaudio.h>
/* end */

--------------------

have_library: checking for main() in -lportaudio... -------------------- yes

"x86_64-pc-linux-gnu-gcc -o conftest -I/usr/include/ruby-2.2.0/x86_64-linux -I/usr/include/ruby-2.2.0/ruby/backward -I/usr/include/ruby-2.2.0 -I.    -march=core2 -O2 -pipe -fno-strict-aliasing -fPIC conftest.c  -L. -L/usr/lib64 -L. -Wl,-O1 -Wl,--sort-common -Wl,--as-needed -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,--no-undefined     -lruby22 -lportaudio  -lpthread -lgmp -ldl -lcrypt -lm   -lc"
checked program was:
/* begin */
 1: #include "ruby.h"
 2: 
 3: /*top*/
 4: extern int t(void);
 5: int main(int argc, char **argv)
 6: {
 7:   if (argc > 1000000) {
 8:     printf("%p", &t);
 9:   }
10: 
11:   return 0;
12: }
13: int t(void) { void ((*volatile p)()); p = (void ((*)()))main; return 0; }
/* end */

--------------------

have_type: checking for PaStreamCallbackTimeInfo in portaudio.h... -------------------- yes

"x86_64-pc-linux-gnu-gcc -I/usr/include/ruby-2.2.0/x86_64-linux -I/usr/include/ruby-2.2.0/ruby/backward -I/usr/include/ruby-2.2.0 -I.    -march=core2 -O2 -pipe -fno-strict-aliasing -fPIC   -c conftest.c"
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <portaudio.h>
4: 
5: /*top*/
6: typedef PaStreamCallbackTimeInfo conftest_type;
7: int conftestval[sizeof(conftest_type)?1:-1];
/* end */

--------------------

lozenge57 avatar Feb 01 '16 05:02 lozenge57

Same problems when you try to build from source? The gem is a tad older than current source, I need to update the gem... I'll check to make sure its still working on OSX.

SophisticaSean avatar Feb 02 '16 07:02 SophisticaSean

Also, this app is designed to run on ruby 1.9 can you try switching ruby versions to see if that will fix the problem?

SophisticaSean avatar Feb 02 '16 07:02 SophisticaSean

all give these a shot, thanks

lozenge57 avatar Feb 02 '16 21:02 lozenge57

lozenge@ramtag ~> cd /home/lozenge/Make/soundcloud2000-master/
lozenge@ramtag ~/M/soundcloud2000-master> gem build soundcloud2000.gemspec
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
  Successfully built RubyGem
  Name: soundcloud2000
  Version: 0.1.0
  File: soundcloud2000-0.1.0.gem
lozenge@ramtag ~/M/soundcloud2000-master> gem install soundcloud2000-0.1.0.gem
Fetching: curses-1.0.1.gem (100%)
Building native extensions.  This could take a while...
Successfully installed curses-1.0.1
Building native extensions.  This could take a while...
ERROR:  Error installing soundcloud2000-0.1.0.gem:
    ERROR: Failed to build gem native extension.

    current directory: /home/lozenge/.gem/ruby/2.2.0/gems/audite-0.4.0/ext/portaudio
/usr/bin/ruby22 -r ./siteconf20160202-8870-7n3idq.rb extconf.rb
checking for portaudio.h... yes
checking for main() in -lportaudio... yes
checking for PaStreamCallbackTimeInfo in portaudio.h... yes
creating Makefile

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /home/lozenge/.gem/ruby/2.2.0/extensions/x86_64-linux/2.2.0/audite-0.4.0/mkmf.log

current directory: /home/lozenge/.gem/ruby/2.2.0/gems/audite-0.4.0/ext/portaudio
make "DESTDIR=" clean

current directory: /home/lozenge/.gem/ruby/2.2.0/gems/audite-0.4.0/ext/portaudio
make "DESTDIR="
compiling portaudio.c
linking shared-object portaudio.so
portaudio.o: In function `rb_portaudio_write_from_mpg':
portaudio.c:(.text+0x4e6): undefined reference to `mpg123_read'
portaudio.c:(.text+0x50e): undefined reference to `mpg123_plain_strerror'
collect2: error: ld returned 1 exit status
Makefile:253: recipe for target 'portaudio.so' failed
make: *** [portaudio.so] Error 1

make failed, exit code 2

Gem files will remain installed in /home/lozenge/.gem/ruby/2.2.0/gems/audite-0.4.0 for inspection.
Results logged to /home/lozenge/.gem/ruby/2.2.0/extensions/x86_64-linux/2.2.0/audite-0.4.0/gem_make.out
lozenge@ramtag ~/M/soundcloud2000-master> 

I'll try ruby 1.9 next

lozenge57 avatar Feb 02 '16 22:02 lozenge57