byteduck / duckOS

An x86 monolithic kernel and operating system written in modern C++. Comes with in-house graphical applications and command line utilities, plus ports of existing software. And yes, it runs DOOM!
GNU General Public License v3.0
618 stars 25 forks source link

[SUGGESTION] Improved LibC #19

Closed PF94 closed 2 years ago

PF94 commented 2 years ago

Suggestion

One of the issues

While attempting to port QT1 (at https://github.com/PF94/qt1, until i nearly entered X11 hell), the building process falls apart at the beginning due to a lack of an access function in unistd.h.

image

https://man7.org/linux/man-pages/man2/faccessat.2.html

byteduck commented 2 years ago

Good idea. libc compatibility is something I've been chipping away at as issues come up while porting other software (which, as you can tell, I haven't done much of). I'm focused on stability for the time being, but this is definitely on the roadmap.

PF94 commented 2 years ago

i'm still trying to figure out what things to port to duckOS, it appears some of the stuff I'm interested in porting either doesn't support cmake or they require a lot of dependencies.

byteduck commented 2 years ago

Yeah, porting new apps will require a lot more libc compat work and a build system. We would probably either fork them and use submodules or store them in the monorepo as a patch file.

PF94 commented 2 years ago

i believe serenityos' port system uses patch files, right? also for legacy things like qt1 i think a fork (which i did lol) would be better than multiple patch files.

PF94 commented 2 years ago

also this might be required in order to actually have LibM? I tried to port some LibM implementation from another OSdev project with the same license and it kept reporting missing functions (and header files such as endian.h).

byteduck commented 2 years ago

I've added stubs for a bunch more stuff, and implemented the access(2) syscall. I'll just close this for now, since improving libc is always an ongoing battle :)