Problems compiling Ruby - ruby

I am trying to install Gitlab CI on a virtual machine, and I am following this instructions to do so.
The point #2 is about installing and compiling ruby. When I execute the command make I encounter at the end of the process the following error messages:
make[2]: Entering directory `/tmp/ruby/ruby-2.0.0-p353/ext/pty'
compiling pty.c
pty.c: In function ‘chfunc’:
pty.c:143:12: warning: ignoring return value of ‘seteuid’, declared with attribute warn_unused_result [-Wunused-result]
seteuid(getuid());
^
linking shared-object pty.so
installing default pty libraries
make[2]: Leaving directory `/tmp/ruby/ruby-2.0.0-p353/ext/pty'
make[2]: Entering directory `/tmp/ruby/ruby-2.0.0-p353/ext/racc/cparse'
compiling cparse.c
linking shared-object racc/cparse.so
installing default cparse libraries
make[2]: Leaving directory `/tmp/ruby/ruby-2.0.0-p353/ext/racc/cparse'
make[2]: Entering directory `/tmp/ruby/ruby-2.0.0-p353/ext/readline'
compiling readline.c
readline.c: In function ‘Init_readline’:
readline.c:1886:26: error: ‘Function’ undeclared (first use in this function)
rl_pre_input_hook = (Function *)readline_pre_input_hook;
^
readline.c:1886:26: note: each undeclared identifier is reported only once for each function it appears in
readline.c:1886:36: error: expected expression before ‘)’ token
rl_pre_input_hook = (Function *)readline_pre_input_hook;
^
readline.c: At top level:
readline.c:530:1: warning: ‘readline_pre_input_hook’ defined but not used [-Wunused-function]
readline_pre_input_hook(void)
^
make[2]: *** [readline.o] Error 1
make[2]: Leaving directory `/tmp/ruby/ruby-2.0.0-p353/ext/readline'
make[1]: *** [ext/readline/all] Error 2
make[1]: Leaving directory `/tmp/ruby/ruby-2.0.0-p353'
make: *** [build-ext] Error 2
Here is a more long log: http://pastebin.com/m6wzLVd9
What can I do to solve this problem?

It appears to be this bug https://bugs.ruby-lang.org/issues/9578. I think you need the most stable version of ruby.

Related

expected string-literal before ‘)’ when using static_assert in c++17

So when I try to build my c++ application I get compile-time error in the following piece of code
static_assert(sizeof(int32_t) == 4)
This is the error that I get expected string-literal before ‘)’
On some investigation I found out that static_assert required a message param in c++11 which was eliminated in c++17. So does it look like my application is being compiled for c++11?
In my CMakeLists.txt file I have the following lines
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
Shouldn't the above lines build my application for c++17?
Thanks!
Update1 -- Full Error trace
In file included from <project_root>/src/include/buffer/buffer_pool_manager.h:22:0,
from <project_root>/src/include/catalog/simple_catalog.h:8,
from <project_root>/src/include/catalog/table_generator.h:6,
from <project_root>/src/catalog/table_generator.cpp:1:
<project_root>/src/include/storage/page/page.h:70:39: error: expected ‘,’ before ‘)’ token
static_assert(sizeof(page_id_t) == 4);
^
<project_root>/src/include/storage/page/page.h:70:39: error: expected string-literal before ‘)’ token
In file included from <project_root>/src/include/buffer/buffer_pool_manager.h:22:0,
from <project_root>/src/buffer/buffer_pool_manager.cpp:13:
<project_root>/src/include/storage/page/page.h:70:39: error: expected ‘,’ before ‘)’ token
static_assert(sizeof(page_id_t) == 4);
^
<project_root>/src/include/storage/page/page.h:70:39: error: expected string-literal before ‘)’ token
src/CMakeFiles/bustub_shared.dir/build.make:62: recipe for target 'src/CMakeFiles/bustub_shared.dir/buffer/buffer_pool_manager.cpp.o' failed
make[2]: *** [src/CMakeFiles/bustub_shared.dir/buffer/buffer_pool_manager.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
src/CMakeFiles/bustub_shared.dir/build.make:114: recipe for target 'src/CMakeFiles/bustub_shared.dir/catalog/table_generator.cpp.o' failed
make[2]: *** [src/CMakeFiles/bustub_shared.dir/catalog/table_generator.cpp.o] Error 1
CMakeFiles/Makefile2:383: recipe for target 'src/CMakeFiles/bustub_shared.dir/all' failed
make[1]: *** [src/CMakeFiles/bustub_shared.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
I changed it to gcc-7 and g++-7 solved my problem.

fblualib installation in Ubunt16.04

I am trying to install fblualib from this link.
When I run ./install_all.sh inside fblualib, I have errors as
+ echo Building folly
Building folly
+ echo
+ cd /tmp/fblualib-build.zofU4g/folly/folly
+ autoreconf -ivf
autoreconf: 'configure.ac' or 'configure.in' is required
According to last discussion here, there is a discussion as "autotools based build system has been removed from Folly in favor of CMake, so you'll need to build Folly with CMake rather than autotools." so I go to folly folder
/tmp/fblualib-build.zofU4g/folly/build and try to build using `cmake`.
Then I have errors as
[ 36%] Building CXX object CMakeFiles/folly_base.dir/folly/detail/ThreadLocalDetail.cpp.o
In file included from /tmp/fblualib-build.zofU4g/folly/folly/detail/ThreadLocalDetail.h:33:0,
from /tmp/fblualib-build.zofU4g/folly/folly/detail/ThreadLocalDetail.cpp:16:
/tmp/fblualib-build.zofU4g/folly/folly/SharedMutex.h: In static member function ‘static void folly::threadlocal_detail::StaticMetaBase::onThreadExit(void*)’:
/tmp/fblualib-build.zofU4g/folly/folly/SharedMutex.h:457:33: error: ‘*((void*)& rlock +10)’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
!tryUnlockSharedDeferred(token.slot_)) {
^
/tmp/fblualib-build.zofU4g/folly/folly/detail/ThreadLocalDetail.cpp:169:31: note: ‘*((void*)& rlock +10)’ was declared here
SharedMutex::ReadHolder rlock(nullptr);
^
cc1plus: all warnings being treated as errors
CMakeFiles/folly_base.dir/build.make:1886: recipe for target 'CMakeFiles/folly_base.dir/folly/detail/ThreadLocalDetail.cpp.o' failed
make[2]: *** [CMakeFiles/folly_base.dir/folly/detail/ThreadLocalDetail.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/folly_base.dir/all' failed
make[1]: *** [CMakeFiles/folly_base.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
The error is happening in SharedMutex.h, what could be worng>

Raspberry Pi V4L2 Compile Error How to Fix

I am using opencv with python on raspberry pi so according to tutorials on the internet I need the V4L2 driver. I'm following this tutorial to install the driver https://www.ics.com/blog/raspberry-pi-camera-module#.VAaCHqM0_YQ
However when I compile I get this error. I don't know what's the problem and have never ran into this problem before. How do I fix this. Thanks.
make[3]: Entering directory '/home/pi/v4l-utils/utils/v4l2-compliance'
CXX v4l2-test-input-output.o
v4l2-test-input-output.cpp: In function ‘int checkInput(node*, const v4l2_input&, unsigned int)’:
v4l2-test-input-output.cpp:368:3: error: expected primary-expression before ‘.’ token
v4l2-test-input-output.cpp:369:3: error: expected primary-expression before ‘.’ token
v4l2-test-input-output.cpp: In function ‘int checkOutput(node*, const v4l2_output&, unsigned int)’:
v4l2-test-input-output.cpp:733:3: error: expected primary-expression before ‘.’ token
v4l2-test-input-output.cpp:734:3: error: expected primary-expression before ‘.’ token
Makefile:438: recipe for target 'v4l2-test-input-output.o' failed
make[3]: *** [v4l2-test-input-output.o] Error 1
make[3]: Leaving directory '/home/pi/v4l-utils/utils/v4l2-compliance'
Makefile:373: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/pi/v4l-utils/utils'
Makefile:470: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/pi/v4l-utils'
Makefile:398: recipe for target 'all' failed
make: *** [all] Error 2
The line numbers have changed somewhat in the 2+ years since this question was posted. It could have easily had more bugs back then with Raspbian 7 Wheezy on a Raspberry Pi 2 or classic Pi.
One correction to the webpage would be that it's better to run ./bootstrap.sh rather than autoreconf. I also write libjpeg-dev to avoid dependency problems with the too-specific libjpeg62-dev. Then the build and installation works fine today on Raspbian 9 Stretch (gcc 6.3):
sudo apt-get install autoconf gettext libtool libjpeg-dev
git clone git://git.linuxtv.org/v4l-utils.git
cd v4l-utils
./bootstrap.sh
./configure
make
sudo make install

Gearman installation in windows

i've been working on this for days, and I really don't have any clue to what's going on
I'm trying to install gearman on windows and followed EXACTLY what's on this link:
http://www.phpvs.net/2010/11/30/installing-gearman-and-gearmand-on-windows-with-cygwin/
However, no luck. I've installed libevent and i'm on installation of gearman:
I've only managed to execute ./configure on cygwin.
After that, using make :
make -j2 all-am
make[1]: Entering directory '/cygdrive/c/gearman'
CXX libgearman/libgearman_libgearman_la-error.lo
libgearman/error.cc: In function 'gearman_return_t gearman_universal_set_perror(gearman_universal_st&, gearman_return_t, int, const char*, const char*, const char*, ...)':
libgearman/error.cc:218:83: error: 'strerror_r' was not declared in this scope
errmsg_ptr= strerror_r(universal._error.system_error(), errmsg, sizeof(errmsg));
^
Makefile:6247: recipe for target 'libgearman/libgearman_libgearman_la-error.lo' failed
make[1]: *** [libgearman/libgearman_libgearman_la-error.lo] Error 1
make[1]: Leaving directory '/cygdrive/c/gearman'
Makefile:3050: recipe for target 'all' failed
make: *** [all] Error 2
This comes on, and I don't know what I've done wrong. I need help on this. Thanks!

Debian "make" error

I'm trying to install ufasoft miner on my Debian machine, but after entering make it shows this message:
make[1]: Entering directory `/root/ufasoft_coin-0.75'
CXX el/libext/bignum.o
In file included from el/libext/bignum.cpp:18:0:
./el/bignum.h: In member function ?void Ext::BigInteger::swap(Ext::BigInteger&)?:
./el/bignum.h:310:8: error: ?mpz_class? has no member named ?swap?
make[1]: *** [el/libext/bignum.o] Error 1
make[1]: Leaving directory `/root/ufasoft_coin-0.75'
make: *** [all] Error 2
Check your installed GMP version.
For me, ufasoft_coin-0.75 compiles fine against the latest gmp-5.1.3 (With --enable-cxx)

Resources