Log4Cpp on systemd program logging disabled? - systemd

I'm trying to call a program that has Log4Cpp in it with exec from a systemd service, but I kept getting the following error:
Log4Cpp: PropertyConfigurator::configure failed, logging is disabled!
Does anyone know what this is? I can call that program anywhere even in the background but I just couldn't have a systemd service to call it. I need it to run on start-up for a Raspberry Pi project.
The program is an SDK that only comes with the binary so there isn't a place where I can just uncomment the logging, and it is compiled with cmake with the user project. I would even be fine with any way to just remove Log4Cpp, it's not important in my project.
Any help is greatly appreciated 🙏

Related

AOSP lldbclient.py missing?

I'm building AOSP from source and have created a small C++ program that prints some messages to logcat when started. Now I wanted to debug the program according to https://source.android.com/devices/tech/debug/gdb
In the reference you're encouraged to use lldb in favor of gdb and there is also a short section on using vs code as debugger.
However, I cannot find the mentioned script lldbclient anywhere in my source nor in Android Code Search, only gdbclient.py seems to be present.
Q1: Where can I find lldbclient script?
When running the gdbclient.py script the option --setup-forwarding vscode seems to be ignored and gdb is always started.
Q2: If there isn't a lldbclient script, what options do I have to pass to gdbclient.py to enable debugging with lldb and vs code?
What did I do so far?
gdbclient.py -r /data/mysample_bin --setup-forwarding vscode
Starts my native program with attached gdb and allows me to step through my program.
Though I do not know how to code python, I was able to track down a call sequence in the script to method generate_setup_script, which is called with parameter debugger=gdb. Therefore no lldb configuration for vs code is created. Passing --no-gdb or --lldb to the script doesn't change this behavior.
Q1: You can find lldbclient.py script in the repository https://android.googlesource.com/platform/development, branch android-s-beta-2 (or another android-s branch).
Q2: Android also provides some tutorial debugging with Vscode: https://source.android.com/devices/tech/debug/gdb#vscode.

Unreal: Diagnosing why Windows cannot load a DLL

I'm trying to set up a Windows Server-based continuous integration server to completely build and package an Unreal Engine 4 project. The vast majority of the process works, but at the content cooking stage I keep running into the following errors:
********** COOK COMMAND STARTED **********
Running UE4Editor Cook for project C:\workspace\CEIT_ingame-native-plugins_PR-44\sampleProjects\unreal\ShooterGame26\ShooterGame.uproject
Commandlet log file is C:\Unreal426\Windows\Engine\Programs\AutomationTool\Saved\Cook-2021.07.05-13.56.23.txt
Running: C:\Unreal426\Windows\Engine\Binaries\Win64\UE4Editor-Cmd.exe C:\workspace\CEIT_ingame-native-plugins_PR-44\sampleProjects\unreal\ShooterGame26\ShooterGame.uproject -run=Cook -TargetPlatform=WindowsClient -fileopenlog -ddc=DerivedDataBackendGraph -unversioned -abslog=C:\Unreal426\Windows\Engine\Programs\AutomationTool\Saved\Cook-2021.07.05-13.56.23.txt -stdout -CrashForUAT -unattended -NoLogTimes -UTF8Output
LogInit: Display: Running engine for game: ShooterGame
LogModuleManager: Warning: ModuleManager: Unable to load module 'C:/Unreal426/Windows/Engine/Binaries/Win64/UE4Editor-OpenGLDrv.dll' because the file couldn't be loaded by the OS.
LogModuleManager: Warning: ModuleManager: Unable to load module 'C:/Unreal426/Windows/Engine/Plugins/Lumin/MagicLeap/Binaries/Win64/UE4Editor-MagicLeap.dll' because the file couldn't be loaded by the OS.
Took 14.257796s to run UE4Editor-Cmd.exe, ExitCode=1
ERROR: Cook failed.
(see C:\Users\jenkins\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Unreal426+Windows\Log.txt for full exception trace)
AutomationTool exiting with ExitCode=25 (Error_UnknownCookFailure)
BUILD FAILED
Specifically, UE4Editor-OpenGLDrv.dll and UE4Editor-MagicLeap.dll cannot be loaded, but there's not any clear indication as to why this is, just that "the file couldn't be loaded by the OS". The log files written to disk don't tell me much more than the information above. I've verified that both DLLs are actually present on the CI server, so I suspect that there is some other sub-dependency missing.
I've tried running Dependencies on the Unreal executable and the DLLs mentioned in the logs to work out which DLLs might be missing on the server machine itself, but this takes over three hours to run to completion, so is a bit awkward and time-consuming to do repeatedly. I've followed the advice regarding missing dependencies from this page, and have gone through all of the likely DLLs that were reported as not found by the Dependencies utility (mostly DirectX/OpenGL related ones), but the build still fails and I'm running out of ideas.
Is there any easy way in Windows to work out exactly why a DLL fails to load? I seem to remember that Windows DLL loading error messages are nowhere near as informative as on Linux, but perhaps there's a tool or an easier method to work it out that I'm not familiar with.
EDIT: I've narrowed things down somewhat - if I attempt to load glu32.dll completely dynamically in a program of my own, I get the load error Could not load C:\Windows\System32\glu32.dll: The specified procedure could not be found. As this is on the load attempt, rather than attempt at looking up a function, it implies that some procedure is missing on a sub-dependency of glu32.dll, but I don't know how I'd go about identifying which one it is.
You can try to delete Engine/Intermediate and click GenerateProjectFiles.bat to regenerate the whole project if you use UE Source code to start up, see UE documentation and rebuild with Visual Studio.
If you use the UE4-Editor to start up lacking dll, just add dependency within YourProject.build.cs like a third party, see UE document.

Assistance with Compiling Synergy KVM Software

I'm following the instructions here: https://github.com/symless/synergy-core/wiki/Compiling for compiling on OSX. I've "finished" everything. But I don't understand what to do to install synergy once the compiler has completed? I was expecting a nice output directory somewhere with a synergy.app or something in it. Am I missing something? I've used the GUI method using QT to compile the code as I didnt scroll down far enough initially to realise you can do it on the command line. But either way I've managed to get to the end of the instructions for compiling and I'm a little lost now.
Thanks
Once it's compiled, Synergy binaries are outputted to the build/bin directory inside whatever directory you cloned the Synergy source to (it was ~/git/synergy-core in my case).
You can run ~/git/synergy-core/build/bin/synergy (replacing with whatever your path is) to start the Synergy configuration UI which lets you configure your server or client as desired.

PhantomJs.exe throwing "terminate called after throwing an instance of 'std::bad_alloc' " error on Windows 2008 R2

I trying to run my jamsine specs from command line using PhantomJs.exe. Here is my command line
'path\to\phantomjs\phantomjs.exe run-jasmine.js SpecRunner.html
I'm running this from the folder where my spec runner html file is located. The above command throws following error
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.
I have already looked at http://code.google.com/p/phantomjs/issues/detail?id=365 on phantomjs group but that does not help much for someone like me who comes from a .net background.
So far I have found out that version 1.3.0 of PhantomJs works fine for me.
Take a look at this url on stackoverflow.
This is a typicall situation that takes place when a conflict of instances of C Runtime (CRT) libraries is detected! One app ist bound statically to the CRT and at the same time the app tries to dynamically bind to CRT.

How to debug into my apache module built using a Makefile?

Firstly, I come from Windows-VisualStudio-C++ background. Now I am developing in a Ubuntu environment.
With the help of a Makefile, I built a mymodule.so and copied it to the modules folder within apache. Now, it appears that the module is working fine. But I would like to debug into this module to understand it better.
So, first, is there any way I can get something similar to the Visual Studio debugger type of feel while debugging this module?
Now, i read that i can use gdb to debug into apache modules, can somebody tell me in detail how this is done or point me to some resource that does it.
Ideally, i would like to single step and stuff. I am trying Code::Blocks IDE which has some debugging support. Using the IDE and custom make file, I build the module. Copied it to module location, but how do i debug.
How do i hook to the apache process. Should I use Attach to Process. I tried that with the pid of httpd, but with no success.
Also, while building is there some flag that i should set so that the .so file is debuggable?
I am pretty basic with Linux because i come from windows programming background. Kindly suggest how I go about this.
Thanks in advance,
Arjun
I think you can attach to an apache process using gdb (at 1111, where 1111 is the PID of the process, or in Code::Blocks) and set breakpoints in your module functions, if the module was compiled with debug. You will need to be root or the same user as the apache process.
gcc -g flag is used to build binaries with the debug info.

Resources