C Language (gcc) Subform? GNU Hurd

Is there a C Language subform for those wishing to learn C programming?

Furthermore, for those wishing to learn more advanced C programming–specifically GNU Compiler Collection–to participate in GNU Projects written in C…GNU Hurd. Are there learnining paths/certifications for that?

I would like to learn and study the GNU Hurd project source code here:

It is my understanding one also needs to understand GNU make, GNU autoconf, and GNU automake…GNU autotools.

Also, QEMU…

Hi and welcome to the forum!

We don’t have an official C subforum; those posts can be put into #General.

We don’t have as any official C curriculum, but there are some resources:




and CS50 is great.

There are a few C developers here on the forum that can answer questions for you.


For any C project, I’d focus on learning C first. Make is magic and really you don’t need to do much once everything is set up to build correctly. The other stuff will come along as you need it.

1 Like

I have watched the Giraffe Academy C lessons, and was hoping to find more advanced C topics from Free Code Camp to understand a real C project.

Sorry to learn there isn’t more involvement in C language development.

In regards to the GNU Hurd gnumach project. There seems to be even more magic, sourcery, than Makefile to build the project. The git repo doesn’t even have a Makefile; it has Makefile.am and configure.ac instead along with other similarly named files which one assumes are also part of the build system. So I was hoping for more resources to understand the files beyond the *.c and *.h files in the project.

GNU Autotools (automake and autoconf?)

Where is the C file with the main function and will this build on an x86_64 Debian System? How does one build it from the command line (BASH)?

Yeah, it looks like they are using automake. I like regular make personally, but the build system for any project rarely changes and you don’t really need to all of the intricacies of the system to contribute to the project.


I think some of your answers are in the README file:


(though they are missing build instructions)
I think these build instructions will probably work:

This looks like a library, so there is not actually a file with a main(). Instead, this is a series of functions that are available to be called by other people in their main() or whatnot.

The Autotools toolchain is designed to build portable, cross-platform Makefiles. Nominally, after checking out the project from git, you need to run aclocal , automake , and autoconf – in that order. Doing so will generate a script called configure . Running that will generate a Makefile. Lastly, running make will build the project.

No idea where the entry point for the program is (I recommend grep to find it), but Mach is a micro-kernel for the Hurd operating system. The entry point is probably not a main() function in some C file; rather, it’s more likely a bit of assembly. Also, it’s not going to do much by itself.

Hope this helps.

jrm

1 Like

Getting started with C by hacking on Hurd is like learning auto maintenance by building a Wankel rotary engine. It’s all of super-low-level, strange, and obscure. If studying kernels is your bag, maybe try Minix 3.

1 Like

It does. Thank you for the reply!

Course | CS50 | edX You might like taking this course. CS50 is among the best, I myself am taking it.

Thank you for the Minix suggestion

It looks like one can even get a Masters degree to study it.

My question to you would be “why C?”

I use C because I write scientific software and C compilers are ubiquitous on the machines where my software is run. If it was an option, I’d use something more powerful, like Rust.

In general, I recommend against using C (or C++) for new projects unless you really need it. I recommend more modern languages such as Rust. C is important for understanding memory management and maintaining old projects, but it just isn’t my go-to for new code.

Is your interest in C because you want to work on kernels? How much C experience do you have? Kernel and OS stuff can be a complicated place to start.

I would like to see a subtopic for Rust too. freeCodeCamp lessons for Rust…Zero to Hero (Intro to Advanced) lessons would be great. Lessons where one can acquire the knowledge and practice to port these existing C projects to Rust.

GNU GCC is working on a

For those ineterested in Free Software licensed software or GNU Project software.