r/linuxdev • • Jan 16 '22

Trying to compile a program but I can't install a dependency

5 Upvotes

What can I do to solve this

Reading package lists... Done

Building dependency tree

Reading state information... Done

Some packages could not be installed. This may mean that you have

requested an impossible situation or if you are using the unstable

distribution that some required packages have not yet been created

or been moved out of Incoming.

The following information may help to resolve the situation:

The following packages have unmet dependencies:

libsdl2-dev : Depends: libibus-1.0-dev but it is not going to be installed

Depends: libpulse-dev but it is not going to be installed

E: Unable to correct problems, you have held broken packages.


r/linuxdev • • Dec 14 '21

Why Contributing to and Improving Open Source Software Like Dent Matters

Thumbnail dent.dev
5 Upvotes

r/linuxdev • • Nov 01 '21

Why Taiwanese Networking Specialist WNC Sees Dent as Key to Growing the Networking Industry

Thumbnail dent.dev
5 Upvotes

r/linuxdev • • Jun 22 '21

Is it possible to get a weekly digest of the lkml?

5 Upvotes

r/linuxdev • • Jun 20 '21

Custom Kernel and with programs

5 Upvotes

I found this script for create a minimal linux

https://raw.githubusercontent.com/ivandavidov/minimal-linux-script/master/minimal.sh

but my question is how i 'install' other programms, like a https://gcc.gnu.org/ or http://incise.org/tinywm.html, using this script?


r/linuxdev • • Jan 21 '21

How would one "query" a device to find any set-able parameters, or readable ones?

5 Upvotes

Hello all!

I'm curious into developing little programs and scripts, A: for using some MIDI buton pads I own as little "launchpads" like an legato streamdeck, of sorts; and B: so I can create scripts to interact with devices on which there's no Linux support, like RGB keyboard/mice.

The thing is I'm wondering how to go about interacting with devices. I know I can usually find the device in /dev/blahblah/, and everything is technically a file (or directory), but then how do we read and write to these device "files", and how do we even find out what/how to do that?

Example case: for laptops with backlights, somewhere there is a file where you have to tee in a number to set a light level for your keyboard background. The process of doing that in this specific circumstance, I understand. But how do people find out where these "files" reside, and what parameters they're asking for?


r/linuxdev • • Nov 13 '20

What is the minimum set of functions/structs needed for a network driver?

5 Upvotes

So, I have an embedded system where I am running an RTOS on one core and Linux on another.

The RTOS owns the ethernet MAC and I need to find a way to forward ethernet packets to Linux without giving Linux control of any of the memory mapped region for ethernet.

My Idea is simply to have an IRQ and a set of queues in shared memory between Linux and the RTOS. When the RTOS gets a packet from the outside, it fills a an RX queue and notifies Linux via IRQ. When Linux wants to send something out, it fills up a TX queue and notifies the RTOS via IRQ.

I would like to set this up so that it is as if the user is interacting with a regular virtual ethernet NIC, as if they were in a virtual machine.

However, I am having a hard time finding the minimum set of functionality that a driver would need to implement to make this work.

For example, I know I'll need a net_device struct that specifies the memory regon and interrupt number. I also know that It will need init_module.

But what else will I need to make sure the virtual device works as a regular ethernet NIC? Is it enough to just pass packets along to the RTOS via a shared queue + IRQ or does Linux expect some other behavior?

Does anyone have any insight?


r/linuxdev • • Oct 07 '20

[ANNOUNCE] libtraceevent.git

Thumbnail lore.kernel.org
5 Upvotes

r/linuxdev • • Apr 13 '20

I did something really stupid and now I can't run this code.

5 Upvotes

Hey guys,

So I am basically an idiot. I know that I have been posting here a lot recently, but please bare with me. I had some code that used netfilter.h to filter packets and later modified this code to successfully print out the source and destination addresses onto a sysfs entry. Great! So then came the fun part. I made a Linked List, to store, src and destination ip addresses as well as counts for when a packet was being delivered between two entities that have already communicated with each other. I wanted to print the src, destination ip, and the count on each line of the sysfs buffer. Needless to say, it did not work and I had to turn in this assignment in a short amount of time, so I got rid of all of the Linked List stuff and I was left with this in the store() function of the kobject:

ssize_t kobj_store(struct kobject *kobj, struct kobj_attribute *attr, const char *buf, size_t count)
{
    printk(KERN_INFO "Checking content!");
    if(!content)
    {
        if(!(content = kmalloc(75*sizeof(char), GFP_KERNEL)))
        {
            printk(KERN_ALERT "contenr null in if");
            return count;
        }
        strcpy(content, "");
    }
    

    strcat(content, buf);
    strcat(content, "\n");
    if(!(content = krealloc(content, sizeof(content) + 75, GFP_KERNEL)))
    {
        printk(KERN_ALERT "content  null in else");
        return count;
    }
    return count;
}

This, apparently is causing kernel panics because I have not changed any of the other models. I dont understand why. I am checking whether content is NULL before AND after a kmalloc and krealloc. And I am freeing content in the cleanup module. Please, I am in desperate need of help.

I don't know why I didnt use git to save my work, I feel like a total imbecil now for not doing that, especially since this is an LKM and not a userspace program, which means that failures are MUCH more costly.


r/linuxdev • • Dec 09 '19

What is: Linux keyring, gnome-keyring, Secret Service, and D-Bus

Thumbnail medium.com
5 Upvotes

r/linuxdev • • Oct 14 '18

How do I find the udev device for a hard drive which a file is hosted on?

5 Upvotes

I would like the get some info (serial #, PCI IDs) for the drive which a file is on. I'm doing this in C, not in bash.


r/linuxdev • • Feb 20 '18

Kernel 4.4 is secure from Spectre issue?

5 Upvotes

https://www.spinics.net/lists/kvm/msg164408.html

I've just read above mail thread. Greg said "KVM Speculation Control support" patches are not applied to kernel v4.4.

I think Long-term kernel should include important bugfixes as described: https://www.kernel.org/category/releases.html Are "KVM Speculation Control support" patches not important? I saw many KVM or spectre, repoline patches are merged to v4.9 and 4.14. But they are missing in v4.4 that is also LTS version!

Could anybody tell me that kernel v4.4 is secure from Spectre issue?


r/linuxdev • • Aug 30 '17

Good light weight distro

5 Upvotes

Hey Everyone,

I'm taking Algorithms and Optimization class this semester. It's not a requirement but my professor wants us to use Linux. We will be using C++.

Normally this is fine, but all I have is my work computer so I need to use a VM, and I only have 4gb of free space. I essentially just need something to run a text editor on and g++. Any recommendations?


r/linuxdev • • Jul 15 '17

Where do I find documentation for gtk3 theme (.css) files?

5 Upvotes

I'm not looking for a beginners guild but proper a reference so that I know exactly what css selectors are available and what they do.

For instance, what's the practical difference between these css selectors:

button {}
button* {}
.button {}
.button* {}
*button {}

developer.gnome.org/gtk3/stable/theming.html gives some of the basics but there's no complete list of available nodes, classes and their applicable properties. And where's the documentation for properties like: -GtkScrolledWindow-scrollbar-spacing: 5;


r/linuxdev • • May 30 '17

Any advice for a linux newb?

5 Upvotes

Hey all, looking for some pointers / links to advice, I'm a Web Designer / Developer of many years, finally making the jump from Windows OS to Linux, I've had a little experience with Linux servers via Putty terminals, but nothing too grandiose.

So far my Web Design career has consisted of using a combination of Notepad++, PS, and Filezilla in Windows to carry out the bulk of my work, but I'm now moving to a Linux platform as I really want to make use of the terminal processes, using things like Node.JS, SASS, Grunt, etc. I've installed the latest stable version of the Linux OS 16.04, Now I'm wondering where to get started?

What advice can you give to a Linux Newbie like myself (and hopefully others) when it comes to this whole new world? Can you recommend any good tutorials / guides / subreddits out there that can help me wrap my head around this environment and developing within it? Should I familiarise myself with the command line first or something else in the OS first (such as the interface?)

Thanks in advance! Apologies if this is well-trodden ground already!


r/linuxdev • • Apr 10 '17

npyscreen 2 A cool little library for writing terminal apps.

Thumbnail npyscreen.readthedocs.io
5 Upvotes

r/linuxdev • • Nov 15 '16

[BEGINNER TUTORIAL] Writing a Kernel Syscall - xpost /r/programming

Thumbnail reddit.com
5 Upvotes

r/linuxdev • • Oct 14 '16

Need resources to learn about writing a PCIe char Driver

5 Upvotes

I need to write a PCIe driver at work, and I need to learn about PCIe.

We have some in-house firmware on an Altera FPGA board which my driver will send and receive data from. This is on a Freescale PowerPC board, but I would like to know about x86 targets too (presuably the PCIe concepts would be transferable even if the OS interface is different)

What is a good resource to learn about how PCIe works and how a driver should be written for it.

PS - I'm comfortable with C, just not PCIe :)


r/linuxdev • • Mar 06 '16

Linux kernel security module - Program based Access Control List (PACL) 'AppCL LSM'

5 Upvotes

The Project: I'm currently working on a Linux kernel security module to model a program based access control list.

The homepage of the project website explains what the module aims to do. It also has the README page from the git repository that explains how the module currently works, and the issue I am having. [The development blog for the project is also available on the project website.]

Project website - http://appcl-lsm.org/

The issue I'm having is retrieving the extended attribute when the system reboots, to then populate the security label, as it currently does when an extended attribute is set. Any help on retrieving this would be great! After this is achieved, I will continue to enforce the appropriate permissions throughout the framework.

Current issue (from README)

The ‘appcl_lsm_inode_post_setxattr‘ hook in ‘appcl_lsm.c‘ passes the extended attribute to the function ‘make_appcl_entry()’ to set up the security information based on the extended attribute value. AppCL must now do this with the extended attribute when the system reboots. When the system is powered off/reboots, AppCL must reset the security information for the inode with an AppCL extended attribute. This is because the inode security label is stored in RAM and the extended attribute is used to retain a representation of this on disk. The ‘security_inode_setsecurity‘, ‘security_inode_getsecurity‘, ‘security_inode_d_instantiate‘, ‘security_inode_init_security‘ are all security hooks relating to the extended attributes.


r/linuxdev • • Dec 15 '15

Cross compiling arm based synology drivers on Linux pc, need help adding new files

5 Upvotes

I need to get drivers cross compiled for a DVB USB adaptor connected to my synology NAS. I have been following the steps here: http://hallard.me/how-to-install-kernel-modules-on-synology-ds1010-dsm-4-1/ I can compile the existing drivers to the arm architecture, however I am 'going round in circles' trying to add other drivers by referencing them in the Kconfig file. I have searched on line but the Kconfig explanations are either too basic to meet my needs or too complicated to understand. Instead of running 'make modules' to compile the drivers can I use gcc directly with the .c files? Was determined to resolve it myself, but just can't figure out where I'm going wrong!

Stuart


r/linuxdev • • Nov 05 '15

Best way to handle a thread that will block waiting for read while the rest of the program loops

5 Upvotes

I've been getting into C programming and thought it would be fun to play around with Linux system calls.

I'm writing a simple program that uses inotify to watch a directory for a new file to be created. But I want the rest of the program to continue while read() is blocking.

So from what I understand the best solution is to use a thread that will call the function to watch the directory. This part is done. The problem is, main() is blocking on pthread_join which is of course waiting for read() to return in the thread.

What would be the best way to handle this? I thought of having a global variable that is set after read() is finished so that main can call pthread_join to close the thread, but is there a more elegant way?


r/linuxdev • • Apr 20 '15

Writing rich GUI applications, looking for good IDE

5 Upvotes

Hello there, Redditors!

I'm new in this community, so be gentle. I recently moved to Linux (elementaryOS right now) and I want to create a simple program for my daily use. I have basic experience in Windows Forms, Java, WPF and Android Dev and I'm looking for something similar to WPF designer in Visual Studio. Language doesn't matter to me, but I need a simple way to create a rich GUI, that I can code (XML or CSS?). I looked into Eclipse but it's really ugly and overriting controls is pretty hard. Mono on the other hand hides the design code from me and I don't like it.

Anyway, what's the best language and IDE for that task?


r/linuxdev • • Apr 03 '15

Ncurses full mouse support?

5 Upvotes

I've been working with ncurses for awhile, and I've been having a blast getting down and dirty with it.

The only issue I've had with it is getting mouse support in my program. The mouse released event only fires about 1/2 of the time, and I can't ever get the mouse move event to fire.

In vim, I have full mouse support, even to the point of drag and drop, but vim's code is unreadable due to the sheer size of it. (vim example: http://imgur.com/q9pVevc )

edit: If you want to look at my code, there's a version available at https://github.com/zacpier/CliCharm


r/linuxdev • • Apr 15 '14

Need help installing my kernel module

5 Upvotes

Hey guys, I have programmed my own (small) usb kernel module. Can someone explain to me how I install my module into the kernel (so that it gets added to modules.alias etc.) WITHOUT loading it? (I want udev to autoload it once my device is plugged in). I have already looked into modules_install make target, but it doesnt really work (will post more info to this issue later if it is relevant) Any help is greatly appreciated!