Comments (10)
you need to use a newer compiler. GCC 8+ or clang 6+ should work.
@danobi
Maybe it should be mentioned in https://github.com/facebookincubator/oomd#building-and-installing
from oomd.
Did you install the jsoncpp development package? What do the following commands print for you?
$ rpm -q jsoncpp-devel
$ rpm -ql jsoncpp-devel
Here's my machine for reference:
$ rpm -ql jsoncpp-devel-1.8.4-3.fc28.x86_64
/usr/include/json
/usr/include/json/allocator.h
/usr/include/json/assertions.h
/usr/include/json/autolink.h
/usr/include/json/config.h
/usr/include/json/features.h
/usr/include/json/forwards.h
/usr/include/json/json.h
/usr/include/json/reader.h
/usr/include/json/value.h
/usr/include/json/version.h
/usr/include/json/writer.h
/usr/lib64/cmake/jsoncpp
/usr/lib64/cmake/jsoncpp/jsoncppConfig-release.cmake
/usr/lib64/cmake/jsoncpp/jsoncppConfig.cmake
/usr/lib64/libjsoncpp.so
/usr/lib64/pkgconfig/jsoncpp.pc
$ rpm -q jsoncpp-devel
jsoncpp-devel-1.8.4-3.fc28.x86_64
from oomd.
Closing due to inactivity.
from oomd.
Unable to build the oomd binary on Ubuntu 18.04:
user@user-VirtualBox:~/44$ git clone https://github.com/facebookincubator/oomd
Cloning into 'oomd'...
remote: Enumerating objects: 29, done.
remote: Counting objects: 100% (29/29), done.
remote: Compressing objects: 100% (23/23), done.
remote: Total 1290 (delta 10), reused 18 (delta 6), pack-reused 1261
Receiving objects: 100% (1290/1290), 689.92 KiB | 427.00 KiB/s, done.
Resolving deltas: 100% (778/778), done.
user@user-VirtualBox:~/44$ cd oomd
user@user-VirtualBox:~/44/oomd$ meson build && ninja -C build
The Meson build system
Version: 0.45.1
Source dir: /home/user/44/oomd
Build dir: /home/user/44/oomd/build
Build type: native build
Project name: oomd
Native C++ compiler: c++ (gcc 7.3.0 "c++ (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0")
Build machine cpu family: x86_64
Build machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Native dependency jsoncpp found: YES 1.8.4
Dependency threads found: YES
Dependency libsystemd found: NO
Dependency GTest found: NO
Dependency GMock found: NO
Build targets in project: 2
Found ninja-1.8.2 at /usr/bin/ninja
ninja: Entering directory `build'
[2/28] Compiling C++ object 'oomd@sha/Oomd.cpp.o'.
FAILED: oomd@sha/Oomd.cpp.o
c++ -Ioomd@sha -I. -I.. -I../.. -I../ -I../util -I../include -I/usr/local/include -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -O0 -g -fPIC -pthread -std=c++14 -g -rdynamic -MD -MQ 'oomd@sha/Oomd.cpp.o' -MF 'oomd@sha/Oomd.cpp.o.d' -o 'oomd@sha/Oomd.cpp.o' -c ../Oomd.cpp
../Oomd.cpp: In member function ‘bool Oomd::Oomd::updateContextCgroup(const Oomd::CgroupPath&, Oomd::OomdContext&)’:
../Oomd.cpp:202:29: sorry, unimplemented: non-trivial designated initializers not supported
.memory_min = memmin});
^
../Oomd.cpp:202:29: sorry, unimplemented: non-trivial designated initializers not supported
../Oomd.cpp:202:29: sorry, unimplemented: non-trivial designated initializers not supported
../Oomd.cpp:202:29: sorry, unimplemented: non-trivial designated initializers not supported
../Oomd.cpp:176:8: warning: variable ‘memlow’ set but not used [-Wunused-but-set-variable]
auto memlow = Fs::readMemlow(absolute_cgroup_path);
^~~~~~
../Oomd.cpp:177:8: warning: variable ‘memmin’ set but not used [-Wunused-but-set-variable]
auto memmin = Fs::readMemmin(absolute_cgroup_path);
^~~~~~
../Oomd.cpp:178:8: warning: variable ‘swap_current’ set but not used [-Wunused-but-set-variable]
auto swap_current = Fs::readSwapCurrent(absolute_cgroup_path);
^~~~~~~~~~~~
../Oomd.cpp:180:8: warning: variable ‘anon_usage’ set but not used [-Wunused-but-set-variable]
auto anon_usage = memory_stats["anon"];
^~~~~~~~~~
[3/28] Compiling C++ object 'oomd@sha/OomdContext.cpp.o'.
ninja: build stopped: subcommand failed.
user@user-VirtualBox:~/44/oomd$ uname -a
Linux user-VirtualBox 5.0.0-050000-generic #201903032031 SMP Mon Mar 4 01:33:18 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
How can I fix it?
from oomd.
And with latest meson:
$ meson build && ninja -C build
The Meson build system
Version: 0.50.0
Source dir: /home/user/89/oomd
Build dir: /home/user/89/oomd/build
Build type: native build
Project name: oomd
Project version: 0.1.0
Native C++ compiler: c++ (gcc 7.3.0 "c++ (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0")
Build machine cpu family: x86_64
Build machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Dependency jsoncpp found: YES 1.8.4
Dependency threads found: YES
Did not find CMake 'cmake'
Found CMake: NO
Dependency libsystemd found: NO (tried pkgconfig and cmake)
Dependency GTest found: NO (tried pkgconfig and system)
Dependency GMock found: NO (tried pkgconfig and system)
Build targets in project: 2
Found ninja-1.8.2 at /usr/bin/ninja
ninja: Entering directory `build'
[2/28] Compiling C++ object 'oomd@sha/Oomd.cpp.o'.
FAILED: oomd@sha/Oomd.cpp.o
c++ -Ioomd@sha -I. -I.. -I../include -I../util -I../ -I../.. -I/usr/local/include -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -g -fPIC -pthread -std=c++14 -g -rdynamic -MD -MQ 'oomd@sha/Oomd.cpp.o' -MF 'oomd@sha/Oomd.cpp.o.d' -o 'oomd@sha/Oomd.cpp.o' -c ../Oomd.cpp
../Oomd.cpp: In member function ‘bool Oomd::Oomd::updateContextCgroup(const Oomd::CgroupPath&, Oomd::OomdContext&)’:
../Oomd.cpp:202:29: sorry, unimplemented: non-trivial designated initializers not supported
.memory_min = memmin});
^
../Oomd.cpp:202:29: sorry, unimplemented: non-trivial designated initializers not supported
../Oomd.cpp:202:29: sorry, unimplemented: non-trivial designated initializers not supported
../Oomd.cpp:202:29: sorry, unimplemented: non-trivial designated initializers not supported
../Oomd.cpp:176:8: warning: variable ‘memlow’ set but not used [-Wunused-but-set-variable]
auto memlow = Fs::readMemlow(absolute_cgroup_path);
^~~~~~
../Oomd.cpp:177:8: warning: variable ‘memmin’ set but not used [-Wunused-but-set-variable]
auto memmin = Fs::readMemmin(absolute_cgroup_path);
^~~~~~
../Oomd.cpp:178:8: warning: variable ‘swap_current’ set but not used [-Wunused-but-set-variable]
auto swap_current = Fs::readSwapCurrent(absolute_cgroup_path);
^~~~~~~~~~~~
../Oomd.cpp:180:8: warning: variable ‘anon_usage’ set but not used [-Wunused-but-set-variable]
auto anon_usage = memory_stats["anon"];
^~~~~~~~~~
[3/28] Compiling C++ object 'oomd@sha/OomdContext.cpp.o'.
ninja: build stopped: subcommand failed.
from oomd.
Did you install the jsoncpp development package?
Yes
from oomd.
Could you specify the minimum versions of dependencies (meson, jsoncpp) required for building oomd?
from oomd.
Could you write step-by-step guides for mere mortals on installing oomd on different versions of popular distributions?
from oomd.
Hi @hakavlad.
For your specific build error, you need to use a newer compiler. GCC 8+ or clang 6+ should work.
Could you write step-by-step guides for mere mortals on installing oomd on different versions of popular distributions?
Yes, thanks for reminding me. I've been meaning to do that. I'll try to get a production setup draft up before the end of the week.
from oomd.
@danobi Thank you!
from oomd.
Related Issues (20)
- doesn't kill cgroup, unable to set xattr trusted.oomd_ooms=1 HOT 5
- How do I set oomd to kill process instead of cgroup? HOT 2
- /sys/fs/cgroup is not a valid cgroup2 filesystem HOT 4
- man page should be located in man8, not in man1 HOT 1
- Possibility to abstract the stat collector HOT 1
- error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT or O_TMPFILE... HOT 1
- prekill_hooks to run a shell script
- KillMemoryGrowth-inl.h: misleading ologKillTarget message for SIZE_NO_THRESHOLD
- KillMemoryGrowth<Base>::get_ranking_fn() should be SEGV safe
- Inefficient TryToKillSomething(): ranking gets made twice for a single run
- memleaks ??? HOT 2
- Prevent specific app to kill - doubt HOT 1
- Oomd
- Cgroup1
- No timestamps in oomd output HOT 1
- Meson build fails due to dumpKillInfo HOT 3
- what does the Senpai plugin used for? HOT 1
- Verifying if Senpai Config is Correct
- Uan HOT 4
- Show: lib to parse proc/cgroup data as json HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oomd.