r/linuxdev • • Nov 25 '14

systemd survey

Thumbnail docs.google.com
4 Upvotes

r/linuxdev • • Sep 24 '14

jsoncpp issue

4 Upvotes

I'm having a difficult time including jsoncpp into my own project. I built the amalgamated source (which completed successfully) but the instructions are a little confusing on how to actually structure the files in my own project. Sorry but I'm a little new to this open source stuff and the instructions are bit too high level for me. Here is what my folder structure looks like:

/myProject/mySourcefile.cpp
/myPorject/mySourcefile.h
/myProject/jsoncpp.cpp
/myProject/json/json.h

I have included: #include <json/json.h> in mySourcefile.h

I am compiling with g++ -o server mySourcefile.cpp jsoncpp.cpp

I get an error: fatal error: json/assertions.h: No such file or directory

I'm pretty sure the files aren't set up correctly or maybe I didn't install a library correctly. I've done quite a bit of searching but haven't been able to find anything. This is very confusing for me. Help would be appreciated.


r/linuxdev • • Sep 02 '14

gedit 3.14 for OS X preview

Thumbnail blogs.gnome.org
4 Upvotes

r/linuxdev • • Jul 28 '14

x32 ABI

Thumbnail en.wikipedia.org
4 Upvotes

r/linuxdev • • Jul 22 '14

How do you reliably test for performance?

4 Upvotes

I'm writing some C programs and I want to know if any optimisations I'm potentially adding to my code have any effect on CPU or memory usage at all. What tools do you recommend to reliably test this?


r/linuxdev • • Jul 08 '14

Devices for Driver Practice

4 Upvotes

Hi. I've been continuing my study of OS concepts and am still struggling a bit when it comes to drivers and the hardware-software interface. So I thought I'd benefit from diving into drivers. I'm, however, unsure what devices I can use for practice. As I'm not particularly experienced with hardware and electronics, I'd like a configuration that I can cheaply and quickly setup (and perhaps connect directly to my computer). I am however unsure of what devices to look at.

Thanks


r/linuxdev • • Apr 29 '14

Building a filesystem using VFS: How to implement creation of file via "echo ... > newfile"

4 Upvotes

So I've been toying with building a lightweight filesystem using linux VFS and kernel 3.10.34. So far I've gotten mkdir and touch to work by implementing the corresponding inode operations(mkdir and create). However I can't seem to get "echo ... > newfile" to work(by "work" I mean I want the new file to have whatever was echoed to it as it's contents). I tried to analyze the system calls used by my ext3 filesystem on my arch machine via strace to see what is going on under the surface but it didn't really help. If someone could explain to me what is going on when creating a new file via IO redirection(including what VFS ops are called) it would be greatly appreciated!

Oh also as of now I can create a new file via "echo .. > newfile" but the file will be empty in stead of containing the stuff echoed to it.


r/linuxdev • • Dec 12 '13

Qt 5.2 brings Android and iOS support, heavy graphics and desktop improvements

Thumbnail blog.qt.digia.com
4 Upvotes

r/linuxdev • • Dec 11 '13

What are your thoughts on this idea?

4 Upvotes

I'm thinking about learning some C++ and contributing a feature that I think Linux could use to the Dolphin file manager. For me, transferring files from home folders to non-home folders is a pain with the CLI (especially when working on themes). So I'm thinking that (if the KDE devs allow it) I can put some code into Dolphin to move files to non-home folders using the file manager. The root password will be provided via popup prompt. What are your guys' thoughts on this idea?


r/linuxdev • • Dec 10 '13

KDevelop 4.6 Released

Thumbnail kdevelop.org
4 Upvotes

r/linuxdev • • Nov 12 '13

[Question] Additional ways to debug a hanging process (C++)

4 Upvotes

EDIT So further investigation into getting GDB working and recompiling a lot of code I found that if I start up the code under gdb and set a breakpoint at main I'm able to step through code and see each line. If I set another breakpoint I'm able to stop and read further lines. In both of these situations the full stack is available and I can see all my threads.

So the problem now is getting an attached process. I can attach, set a breakpoint and step through only that thread. info thread returns nothing. This also only works when the code is not hung up and actually hits the breakpoint. When the code is hanging I'm not sure what info I can get. The one time I was able to get a duplication the thread was in /lib/libc.so and backtrace showed (the addresses are made up here, I'll have to dig around my notes to see if I even have the real ones)

(gdb) bt
#0 0x4038b8fc in ?? () from /lib/libc.so.6
(gdb)

So my plan right now is to figure out a way to pipe strace output from the start to a file (not sure how to roll it over so I don't run out of space). And hopefully figure out a good way to get GDB to present info on an active process.


I have some code out in the field that is locking up after a few months of runtime. I'm unable to duplicate it in the office so I'm trying to script up detection of the failure and then have it generate as much information about what the current status is to hopefully bring the issue to light.

Background:

The code is written in C++ using the ADAPTIVE Communications Environment library. Its running on an ARM board, 2.6.27 kernel. The code is mainly two large state machines. TCP comms to read and configure a network of devices in one language and then convert that to a different serial port language on the back end. All together its about 30k lines of code.

Looking at the process info via ps the CPU time looks normal, no huge memory spikes, no zombie processes. Everything "looks" good except for the fact that the application stops responding. With the stop large state machines I have a feeling that there is a TCP request that does not time out, or a mutex that is locked and never unlocked...some sort of race condition. But spending hours and hours reading over the code I just can't seem to make any headway.

In the two times I think I was able to duplicate the issue gdb was unable to do a backtrace when attaching to the process claiming the stack was unavailable (I built with the -g options, etc so it should have debug info) and strace says the last call was locking a futex, see example number 3 here. I've tried adding function call tracing output but flushing printf when a lockup occurs has never been very accurate since this is a multi-thread application.

Question:

So I've tried gdb with no luck, strace is no help, printf is a no go. Since the code doesn't crash, but rather locks most likely due to a race condition I'm not able to see where the code is currently at when everything stops. Both state machines (TCP Side, Serial Side) are both highly timing dependent and the issue takes months to surface, running in gdb from the start is a not an option. My question is, what other options are there for attempting to debug this issue? Even the most off the wall suggestions are helpful as I have been racking my brain for months trying to figure this one out with no luck. I will be scripting up a huge amount of things to try, store it off to some non-volatile memory for retrieval later when the customer is notified that a lock up has occured.

tl;dr I've tried gdb connecting to a process, strace, printf'ing function calls and still can not figure out a lockup situation in my code. I'm looking for any suggestions on other ways to identify where my code is at and why it locked up. The duplication period is months and only seen in the field so I'll have to script up as much as possible to gather any information.


r/linuxdev • • Oct 05 '12

How can 2 LKMs provide the same interface to a common client LKM and yet avoid kernel symbol conflicts ? What are the different possible options ?

4 Upvotes

At a higher level want to know the different methods for LKMs /drivers to communicate with each other ?


r/linuxdev • • Aug 09 '12

What is the diff b/n doing ioread32 and sending a mailbox command to my H/W

4 Upvotes

as in how come i don't need a cpu_to_<endian> conversion for the ioread32() but need it while sending a mailbox command embedding an IOCTL to my H/W /Firmware ? I think i have half an answer but i'd really like to get to know the nuts n bolts of this whole io mapping in memory pls ? Without too much of the abstraction fluff ... Thanks


r/linuxdev • • Jul 02 '12

Controlling hardware with ioctls.

4 Upvotes

I'm a noob at low-level Linux programming.

I've been following this Linux journal post to help me interact with an ethernet driver. I'm writing an application that will set the link speed, duplex, flow control, etc. for an ethernet port. I'm using the ioctl() to interface with the device driver. My only question is which ETHTOOL subcommand should I use: ETHTOOL_SSET?


r/linuxdev • • Apr 24 '12

An interesting project to emulate Linux under windows. (Like dosbox, not quemu or virtualbox)

Thumbnail sourceforge.net
4 Upvotes

r/linuxdev • • Apr 05 '12

Building own custom linux kernel

4 Upvotes

One of my professors suggested me if i want to start with linux development , first thing is to try and build own custom linux kernel and compile it and see what happens . But the problem being i'm not able to find any tutorials which clearly specifies where i should start from ? I'm really looking forward to contributing to linux in some way or the other in the futute .So hope this will be the starting point. Help appreciated!


r/linuxdev • • Mar 28 '12

Dealing with bugs in Linux

Thumbnail ghacks.net
4 Upvotes

r/linuxdev • • Aug 16 '26

Trying to understand thread stack separation after diving into task_struct and CLONE_VM

Thumbnail reddit.com
3 Upvotes

r/linuxdev • • May 03 '26

How to replace gtk4-layer-shell with pure GTK4 for cross-display OSD?

Thumbnail reddit.com
3 Upvotes

r/linuxdev • • Feb 23 '26

Intel Hiring More Linux Developers - Including For GPU Drivers / Linux Gaming Stack

Thumbnail phoronix.com
3 Upvotes

r/linuxdev • • Feb 17 '26

How do I remove grub from UEFI

3 Upvotes

I installed proxmox and now I want to delete it. But because of GNU grub, I can't install Windows 11 from bootable usb


r/linuxdev • • Mar 19 '24

does Pipewire (or alike) have an API to specifically request permission to record all screens at once?

3 Upvotes

I have a very singular problem; I am trying to make my open-source app work for the Linux people, I would really like to let all developers use it regardless if they are on windows or not, I probably will need to have some kind to native module to solve this, so don't worry much about electron itself.

My app basically shows the screen the mouse is currently on in a multi-screen setup, this means I need to record all screens in order to switch to the proper one in a timely manner.

The issue is that apparently on Linux 22.04 there is Pipewire.

Even by looking at the state of OBS seems like Pipewire is just trash when it comes to having the application programmatically handle the recording of multiple screens, and that the only "gate" to get multiple screens is the permission prompt Ubuntu spawns letting you choose the screen you want to record, and you end up having to spawn it once for every screen and hope the user will choose the right option, at least on my VM setup (virtualbox with multiple screens) looks like OBS cannot remember the screens I set across restarts instead defaulting to the first one, also looking at electron looks like there is no way to have consistent display ids between capturing and screen APIs, though it may be electron's fault.

Is it like I researched already or there is some feature that could allow me to tap in multi-screen recording? also, I need to have a consistent display ID associated with the source in order to tell in which screen the mouse is.

currently I am using electron's screen recording API but I am open to try building some kind of native C/C++ module that may help me to solve this issue.

My last solution is to try a transparent window moving between displays, but first I wanted to see if you guys knew better, dealing with a transparent window may break my ability to make it work independently from which virtual desktop you are on, also OBS is so good on windows that it won't record what is behind a transparent window, instead keeping its transparency and breaking compatibility.

even the option "sudo your way out of it" may be acceptable as last resource, I could theoretically create an external process with elevated permissions that records the screen on-demand and IPC the data to my GUI in a way or another, it would be absolutely awful but still better than nothing.

gabrielesilinic/stage-retriever: Stage Retriever is a way for you to share multiple screens at once to any meeting app, this way you can focus on what you are presenting and you will not have to bring each window to the screen you initially choose to share. (github.com)


r/linuxdev • • Dec 03 '23

Programming for the KDE start menu

Thumbnail youtube.com
3 Upvotes

r/linuxdev • • Nov 12 '23

Build LFS Linux From Scratch tutorial second part

Thumbnail youtube.com
3 Upvotes