Coder Social home page Coder Social logo

Comments (10)

hakavlad avatar hakavlad commented on July 19, 2024 1

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.

danobi avatar danobi commented on July 19, 2024

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.

danobi avatar danobi commented on July 19, 2024

Closing due to inactivity.

from oomd.

hakavlad avatar hakavlad commented on July 19, 2024

@danobi

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.

hakavlad avatar hakavlad commented on July 19, 2024

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.

hakavlad avatar hakavlad commented on July 19, 2024

Did you install the jsoncpp development package?

Yes

from oomd.

hakavlad avatar hakavlad commented on July 19, 2024

Could you specify the minimum versions of dependencies (meson, jsoncpp) required for building oomd?

from oomd.

hakavlad avatar hakavlad commented on July 19, 2024

@danobi

Could you write step-by-step guides for mere mortals on installing oomd on different versions of popular distributions?

from oomd.

danobi avatar danobi commented on July 19, 2024

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.

hakavlad avatar hakavlad commented on July 19, 2024

@danobi Thank you!

from oomd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.