Error while installing SilkJS - osx-mavericks

I am trying to install SilkJS in mavericks, I am getting the following error.
Version of my XCode is 5.0.2 and I have downloaded latest version of silk from github.
I have followed the instructions to install SilkJS from website, I have got following error while performing "make" command in instruction 5.
In file included from ../src/accessors.cc:28:
In file included from ../src/v8.h:60:
In file included from ../src/objects-inl.h:38:
In file included from ../src/elements.h:33:
In file included from ../src/heap.h:41:
../src/store-buffer.h:229:9: error: private field 'heap_' is not used
[-Werror,-Wunused-private-field]
Heap* heap_;
^
1 error generated.
make[3]: *** [/Users/sree/SilkJS/src/v8-read-only/out/x64.release/obj.target/v8_base/src/accessors.o] Error 1
make[3]: *** Waiting for unfinished jobs....
In file included from ../src/assembler.cc:35:
In file included from ../src/assembler.h:38:
In file included from ../src/v8.h:60:
In file included from ../src/objects-inl.h:38:
In file included from ../src/elements.h:33:
In file included from ../src/heap.h:41:
../src/store-buffer.h:229:9: error: private field 'heap_' is not used
[-Werror,-Wunused-private-field]
Heap* heap_;
^
1 error generated.
In file included from ../src/ast.cc:28:
In file included from ../src/ast.h:31:
In file included from ../src/v8.h:60:
In file included from ../src/objects-inl.h:38:
In file included from ../src/elements.h:33:
In file included from ../src/heap.h:41:
../src/store-buffer.h:229:9: error: private field 'heap_' is not used
[-Werror,-Wunused-private-field]
Heap* heap_;
^
In file included from ../src/ast.cc:34:
../src/parser.h:99:8: error: private field 'owns_data_' is not used
[-Werror,-Wunused-private-field]
bool owns_data_;
^
make[3]: *** [/Users/sree/SilkJS/src/v8-read-only/out/x64.release/obj.target/v8_base/src/assembler.o] Error 1
2 errors generated.
make[3]: *** [/Users/sree/SilkJS/src/v8-read-only/out/x64.release/obj.target/v8_base/src/ast.o] Error 1
In file included from ../src/api.cc:28:
In file included from ../src/api.h:31:
In file included from ../src/v8.h:60:
In file included from ../src/objects-inl.h:38:
In file included from ../src/elements.h:33:
In file included from ../src/heap.h:41:
../src/store-buffer.h:229:9: error: private field 'heap_' is not used
[-Werror,-Wunused-private-field]
Heap* heap_;
^
In file included from ../src/api.cc:49:
../src/parser.h:99:8: error: private field 'owns_data_' is not used
[-Werror,-Wunused-private-field]
bool owns_data_;
^
2 errors generated.
make[3]: *** [/Users/sree/SilkJS/src/v8-read-only/out/x64.release/obj.target/v8_base/src/api.o] Error 1
make[2]: *** [x64.release] Error 2
make[1]: *** [v8-read-only/out/x64.release/libv8_base.a] Error 2
make: *** [all] Error 2

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>

Mac os 10.11.1 MakeFile erro: ext/numeric file not found

I am trying to compile a public software called CofiRank. Here is the link to package: https://github.com/markusweimer/cofirank
To compile it I run:
make -f CofiRank-Makefile.mk CONF=Deploy
and here is part of my terminal results:
g++ -D NDEBUG -c -g -Isrc -Ilibs -o build/Deploy/GNU-
MacOSX/src/loss/ndcgdomainmodel.o src/loss/ndcgdomainmodel.cpp
In file included from src/utils/ublastools.cpp:1:
src/utils/ublastools.hpp:17:10: fatal error: 'ext/numeric' file not found
#include <ext/numeric> // for iota
In file included from src/bmrm/solver/dualinnersolver.cpp:29:
src/utils/ublastools.hpp:17:10: fatal error: 'ext/numeric' file not found
#include <ext/numeric> // for iota
1 error generated.
make[2]: *** [build/Deploy/GNU-MacOSX/src/utils/ublastools.o] Error 1
make[2]: *** Waiting for unfinished jobs....
1 error generated.
make[2]: *** [build/Deploy/GNU-MacOSX/src/bmrm/solver/dualinnersolver.o]
In file included from src/bmrm/solver/daifletcherpgm.cpp:28:
In file included from src/bmrm/solver/daifletcherpgm.hpp:22:
In file included from src/bmrm/solver/dualinnersolver.hpp:6:
src/utils/ublastools.hpp:17:10: fatal error: 'ext/numeric' file not found
#include <ext/numeric> // for iota
1 error generated.
make[2]: *** [build/Deploy/GNU-MacOSX/src/loss/ndcgdomainmodel.o] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
I searched a lot but could not fix it. I think I need to use libstd++ instead lib++ which is the default of mac os, but I don't know how to (or if it is the problem)
can someone help me on this?
<ext/numeric> is a non-standard header file provided by the GNU C++ standard library (libstdc++) that comes with GCC.
You are probably compiling with Clang, and so need to tell it to use the GNU library not its own one, so compile with -stdlib=libstdc++

Problems compiling 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.

Protocol buffers version error when trying to make Mosh source code

I've been trying to install Mosh (the mobile shell) on the following system:
[ptedder#ukch-dev-lndt03 mosh-1.2.4]$ cat /etc/*-release
CentOS release 5.3 (Final)
It configures okay, however when I try and make Mosh 1.2.4 (or 1.2.0) I get the following error:
make all-recursive
make[1]: Entering directory `/home/ptedder/bin/mosh-1.2.4'
Making all in src
make[2]: Entering directory `/home/ptedder/bin/mosh-1.2.4/src'
Making all in protobufs
make[3]: Entering directory `/home/ptedder/bin/mosh-1.2.4/src/protobufs'
make all-am
make[4]: Entering directory `/home/ptedder/bin/mosh-1.2.4/src/protobufs'
CXX userinput.pb.o
In file included from userinput.pb.cc:5:
userinput.pb.h:12:2: error: #error This file was generated by a newer version of protoc which is
userinput.pb.h:13:2: error: #error incompatible with your Protocol Buffer headers. Please update
userinput.pb.h:14:2: error: #error your headers.
make[4]: *** [userinput.pb.o] Error 1
make[4]: Leaving directory `/home/ptedder/bin/mosh-1.2.4/src/protobufs'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/home/ptedder/bin/mosh-1.2.4/src/protobufs'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/ptedder/bin/mosh-1.2.4/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/ptedder/bin/mosh-1.2.4'
make: *** [all] Error 2
This was with Protocol buffers version 2.4.1 (suggested it might be hardcoded into mosh here #import <string> in ios? Protobuf c++ in ios) but I've tried using Protocol buffers version 2.3.0 and 2.5.0 as well and they all give the following error:
"This file was generated by a newer version of protoc which is
userinput.pb.h:13:2: error: #error incompatible with your Protocol Buffer headers. Please update
userinput.pb.h:14:2: error: #error your headers."
any ideas?
Two years after this question was asked, I still couldn't find a good solution. I had the same problem, and eventually fixed it after some detective work. The problem was this: I had the latest version of protobuf from the git repo, https://github.com/google/protobuf. When I tried to build my project, it was throwing the error shown in qmp's answer,
#if GOOGLE_PROTOBUF_VERSION < 2004000
#error This file was generated by a newer version of protoc which is...
I was building code that someone else wrote, and in their .proto file, they didn't specify a version. The default is syntax = "proto2"; I added syntax = "proto3"; to the .proto file just before the package declaration and removed all instances of the optional and required keywords, as they are not part of version 3 syntax. Then from the command line, I regenerated the protobuf output.
prompt#ubuntu$ protoc --cpp_out=. project.proto
This updated all the files generated by protoc to version 3, which solved the issue.
If you look at userinput.pb.h, you will notice it reads
#if GOOGLE_PROTOBUF_VERSION < 2004000
#error This file was generated by a newer version of protoc which is
So protobuf-2.4.1 is sufficient for mosh-1.2.4. If you still get the error, then there may be a stray protobuf installation, likely something in /usr/local.

Resources