Comments (16)
I want to attempt this, please can you explain a bit more.
from oomd.
@SauravPrakash98 , sure. a21a584 adds install support to the meson build. When oomd gets installed via sudo ninja install
, oomd's name is /usr/local/bin/oomd_bin
. It'd be great if the name was /usr/local/bin/oomd
.
from oomd.
I have a question, why exactly can't we configure it to install as /usr/local/bin/oomd , is it because system will look at it like tests, please explain ?
from oomd.
@gurungrahul2 In meson.build after you change the name of the executable from oomd_bin
to oomd
, then running meson build && ninja test -C build
is unable to create the binary in the build
folder
from oomd.
it is easy just change the executable name and then it installs as oomd
it is not a bug just a change in file name :) happy to apply patch @danobi
from oomd.
@Hyperion101010 I'm not sure what you mean, could you supply a patch?
from oomd.
here are some updates i ran the build ,so it installed correctly "the oomd named binary in the usr/local/bin" but when i went to run the binary it gave permission error ,
----------------------------------the output message------------------------------------------------------
open: Permission denied
(inl) [../Log.cpp:88] Unable to open outfile (default=/dev/kmsg), not logging
terminate called after throwing an instance of 'std::system_error'
what(): Permission denied
Aborted (core dumped)
now i looked for it in log.cpp it was a file open(permission) issue ,so i ran it in superuser ,but it gave fatal error
resulting in core dump
i'll run this with systrace and then get back to you with updates
from oomd.
https://github.com/Hyperion101010/oomd
from oomd.
just run diff
from oomd.
Ignoring the changed meson files (which should not be part of the commit), it looks like you changed the executable target from oomd_bin
to oomd
. I'm not sure this will work. When I build with that change, I get this output:
$ git --no-pager diff
diff --git a/meson.build b/meson.build
index 8c53421..217b0e0 100644
--- a/meson.build
+++ b/meson.build
@@ -51,7 +51,7 @@ oomd_lib = library('oomd',
cpp_args : cpp_args,
install: true,
dependencies : deps)
-executable('oomd_bin',
+executable('oomd',
files('Main.cpp'),
include_directories : inc,
cpp_args : cpp_args,
$ ninja
[1/13] Linking target oomd.
FAILED: oomd
c++ -o oomd 'oomd@exe/Main.cpp.o' -Wl,--no-undefined -Wl,--as-needed -Wl,--start-group liboomd.so /usr/lib64/libjsoncpp.so -Wl,--end-group -pthread '-Wl,-rpath,$ORIGIN/:XXXXXXXX' -Wl,-rpath-link,/home/dlxu/dev/oomd/biuld/
/bin/ld: cannot open output file oomd: Is a directory
collect2: error: ld returned 1 exit status
[6/13] Linking target oomd_killer_tests.
ninja: build stopped: subcommand failed.
from oomd.
now try running it .
took me two days but its fine i did something ,
the issue was in meson build
1>if we gave it name as "oomd" then there was a directory created for fixtures
thus now when main.cpp was running it saw it as a directory rather than a oomd binary
------------------------solution---------------------------------------------------
2>what i did was renamed the mkdir to make "oomd_fix" rather than "oomd" file for fixtures so it now doesn't conflicts with it and creates a binary named oomd
feeling great :)
from oomd.
@Hyperion101010 That works for creating the executable but it would break the tests. Unfortunately the fixtures have to stay in a folder named oomd
. It's kind of crappy, I know. I was really hoping there was a meson option to install the binary as a different name.
from oomd.
yes i think you are right :(
one way to work around this will be to write a script to directly run
1>the meson.build at first which will create oomd_bin
2>then it'll run ninja and test it as well
3>at last it'll rename the files and thus we can get everything in oomd the "oomd_fix" made can be just copied at last to oomd so we can have a neat single command to make all things happen
4>automatically install required dependencies "gmock" and "gtest"
so that for a new user we can reduce the fuzz of running multiple things
but i am doubtful about fourth point
i am thinking of writing it in python !
awaiting your reply
from oomd.
I don’t think wrapping the build system with what sounds like another build system is a good idea. I think the correct way to do this would be to find the correct meson option or try to implement this feature in meson itself. Or if possible, generate the executable inside another directory so there’s no name collisions.
from oomd.
Hi, all , I'm sure that I've setup the jsoncpp and ninja, but when I run 'meson build && ninja -C build'
[root@bogon oomd]# meson build && ninja -C build
The Meson build system
Version: 0.47.2
Source dir: /home/ufo/oomd
Build dir: /home/ufo/oomd/build
Build type: native build
Project name: oomd
Project version: 0.1.0
Native C++ compiler: c++ (gcc 4.8.5 "c++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)")
Build machine cpu family: x86_64
Build machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (0.27.1)
meson.build:72:0: ERROR: Native dependency 'jsoncpp' not found
A full log can be found at /home/ufo/oomd/build/meson-logs/meson-log.txt
from oomd.
Sorry for bumping an old issue but it looks like 33c4bda resolves this
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.