I am on Litespeed WebServer vertsion 5.0RC2
on Ubuntu 14.04
Ruby: 2.2.0p0
Rails: 4.2.0
Gem: 2.4.5
My GCC info
I would like to compile ruby-lsapi as mentioned in this tutorial https://www.litespeedtech.com/suppo...wiki:other-ext-apps:ruby-on-rails-easy-config
I got following issues
then I managed to fix this bug by add this line at the beginning of setup.rb
Then every thing went fine, then I proceeds to next step
Then I try another installation method
But still got the error, Anyone know how to fix?
on Ubuntu 14.04
Ruby: 2.2.0p0
Rails: 4.2.0
Gem: 2.4.5
My GCC info
$gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.2-19ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.2-19ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)
I would like to compile ruby-lsapi as mentioned in this tutorial https://www.litespeedtech.com/suppo...wiki:other-ext-apps:ruby-on-rails-easy-config
I got following issues
Code:
$ ruby setup.rb config
setup.rb:286: warning: duplicated key at line 287 ignored: "bin-dir"
setup.rb:791:in `load_rbconfig': uninitialized constant Config (NameError)
from setup.rb:771:in `invoke'
from setup.rb:1581:in `<main>'
Code:
require'rbconfig'
Config = RbConfig
Code:
$ruby setup.rb setup
setup.rb:286: warning: duplicated key at line 287 ignored: "bin-dir"
---> ext
---> ext/lsapi
make
compiling lsruby.c
In file included from lsruby.c:7:0:
/usr/local/rvm/rubies/ruby-2.2.0/include/ruby-2.2.0/ruby/backward/util.h:2:2: warning: #warning use "ruby/util.h" instead of bare "util.h" [-Wcpp]
#warning use "ruby/util.h" instead of bare "util.h"
^
lsruby.c: In function ‘lsapi_process’:
lsruby.c:242:18: warning: variable ‘pScriptPath’ set but not used [-Wunused-but-set-variable]
const char * pScriptPath;
^
lsruby.c: In function ‘lsapi_puts_ary’:
lsruby.c:353:9: warning: implicit declaration of function ‘rb_inspecting_p’ [-Wimplicit-function-declaration]
if (rb_inspecting_p(tmp))
^
lsruby.c: In function ‘lsapi_puts’:
lsruby.c:385:17: warning: implicit declaration of function ‘rb_protect_inspect’ [-Wimplicit-function-declaration]
rb_protect_inspect(lsapi_puts_ary, argv, out);
^
lsruby.c: In function ‘Init_lsapi’:
lsruby.c:789:32: error: ‘rb_thread_select’ undeclared (first use in this function)
LSAPI_Init_Env_Parameters( rb_thread_select );
^
lsruby.c:789:32: note: each undeclared identifier is reported only once for each function it appears in
lsruby.c:780:11: warning: unused variable ‘remove_env’ [-Wunused-variable]
VALUE remove_env;
^
lsruby.c: In function ‘createBodyBuf’:
lsruby.c:484:26: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Wunused-result]
ftruncate(fd, s_body.bodyLen);
^
make: *** [lsruby.o] Error 1
setup.rb:658:in `command': system("make") failed (RuntimeError)
from setup.rb:667:in `make'
from setup.rb:1261:in `setup_dir_ext'
from setup.rb:1535:in `block in traverse'
from setup.rb:1552:in `dive_into'
from setup.rb:1533:in `traverse'
from setup.rb:1537:in `block (2 levels) in traverse'
from setup.rb:1536:in `each'
from setup.rb:1536:in `block in traverse'
from setup.rb:1552:in `dive_into'
from setup.rb:1533:in `traverse'
from setup.rb:1527:in `block in exec_task_traverse'
from setup.rb:1522:in `each'
from setup.rb:1522:in `exec_task_traverse'
from setup.rb:1249:in `exec_setup'
from setup.rb:999:in `exec_setup'
from setup.rb:829:in `invoke'
from setup.rb:776:in `invoke'
from setup.rb:1581:in `<main>'
Then I try another installation method
Code:
$ gem install ruby-lsapi
Building native extensions. This could take a while...
ERROR: Error installing ruby-lsapi:
ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/ruby-2.2.0/bin/ruby -r ./siteconf20150101-25425-1flpg8v.rb extconf.rb
checking for main() in -lsocket... no
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling lsruby.c
In file included from lsruby.c:7:0:
/usr/local/rvm/rubies/ruby-2.2.0/include/ruby-2.2.0/ruby/backward/util.h:2:2: warning: #warning use "ruby/util.h" instead of bare "util.h" [-Wcpp]
#warning use "ruby/util.h" instead of bare "util.h"
^
lsruby.c: In function ‘lsapi_process’:
lsruby.c:228:18: warning: variable ‘pScriptPath’ set but not used [-Wunused-but-set-variable]
const char * pScriptPath;
^
lsruby.c: In function ‘lsapi_puts_ary’:
lsruby.c:339:6: warning: implicit declaration of function ‘rb_inspecting_p’ [-Wimplicit-function-declaration]
if (rb_inspecting_p(tmp))
^
lsruby.c: In function ‘lsapi_puts’:
lsruby.c:371:13: warning: implicit declaration of function ‘rb_protect_inspect’ [-Wimplicit-function-declaration]
rb_protect_inspect(lsapi_puts_ary, argv[i], out);
^
lsruby.c: In function ‘Init_lsapi’:
lsruby.c:564:32: error: ‘rb_thread_select’ undeclared (first use in this function)
LSAPI_Init_Env_Parameters( rb_thread_select );
^
lsruby.c:564:32: note: each undeclared identifier is reported only once for each function it appears in
lsruby.c:634:26: warning: assignment from incompatible pointer type [enabled by default]
s_req_data->fn_write = LSAPI_Write_r;
^
lsruby.c:644:29: warning: assignment from incompatible pointer type [enabled by default]
s_stderr_data->fn_write = LSAPI_Write_Stderr_r;
^
lsruby.c:558:11: warning: unused variable ‘remove_env’ [-Wunused-variable]
VALUE remove_env;
^
make: *** [lsruby.o] Error 1
make failed, exit code 2
Gem files will remain installed in /usr/local/rvm/gems/ruby-2.2.0/gems/ruby-lsapi-4.1 for inspection.
Results logged to /usr/local/rvm/gems/ruby-2.2.0/extensions/x86_64-linux/2.2.0/ruby-lsapi-4.1/gem_make.out
But still got the error, Anyone know how to fix?
Code:
lsruby.c:564:32: error: ‘rb_thread_select’ undeclared (first use in this function)
LSAPI_Init_Env_Parameters( rb_thread_select );
Last edited: