-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes for building on OpenBSD #22
Comments
Good idea, I'll start working on this. Instead of doing small PRs, I'll work on a large one for this issue encompassing all the current build issues. |
Good luck. |
One of the issues at compile time is pgrep.c, but I'm honestly baffled at what exactly is going on there (and the only comment shows that whoever worked on this last also was confused, as on line 902 it's just a single "?").
If any of you can give me a bit of a rundown as to what's going on here, it'd be appreciated. |
Sorry for the delay.
"""UNIX hacking""" as always. It's more like alchemy than "science". 😆 PS: Incredible. https://github.com/Projeto-Pindorama/heirloom-ng/blob/master/pgrep/pgrep.c#L902
At a first glance, this seems like an "API breakage" to me. I think that, on more recent versions (that I don't know exactly) of OpenBSD, one will need to disable |
Heyo, I've been working on the OpenBSD stuff recently. I got |
PS. The KVM stuff did change so I fixed that in pgrep but not ps yet. |
Well, that's good. About including About |
Yes, I added -lkvm through uncommenting it in mk.config. I'll post the build logs for |
Alright, I decided to remote in while I had the chance; this is the excerpt of the build logs.
|
I saw that and it caught my attention: isn't the Makefile "forgetting" to include |
O.k., I think I may have found a solution for this. |
Yeah, I noticed that and I just modified the mk.config to include /usr/local/include in the CPPFLAGS. |
And on this -- I fixed pgrep using a similar solution, but I believe I forgot to put in the datestamp. I will update that in a bit. I'm not sure how to fix it for ps, but it might be that I'm not looking at it the right way. |
Since it's the same problem on both I really hope this helps a little. |
Watch out for |
@takusuman Finally got back into working on this under my fork, but under
Is it possible I may work on another feature in the meanwhile as it appears that POSIX standardization and Linux support are the priority? If so, anything I should look into? |
Well, that's great. I'm a little bit busy lately, but I've been using and testing Heirloom NG directly from the master branch.
Well, nice. How do we got /dev/mem information on OpenBSD then? Do they have some sort of kernel API for that which returns a /dev/mem-"compatible" struct? If so, I think it wouldn't be so difficult to workaround that. Just thinking loud here.
Yes, sure! No problem. |
Well, I'm not exactly sure about that (as you can't access /dev/mem at all without making the kernel insecure via a sysctl) but OpenBSD has And I'll look into the readlink issue in a few hours -- I'll post an update if I see anything that could be causing the issue. |
I think I may have to dig on this along with you. That will be a lot of fun, for sure.
Great! Merci. |
@mamccollum I think I may have found something promising on the |
Also, I got to compile
Also I got Please note with
I am on to Thanks for your patience with my absence for a few months. I really needed the break. :) |
Ok, everything else compiles just fine. The last issues that have to be solved is |
You're welcome anytime.
I was expecting that, let's go...
I've made some search in the code, and discovered that, in the non-UCB variant ( I know it will sound obvious, but that's really strange, never seen nothing like it. By the way, if you find a way to fix it: don't forget to use both "
This really sounds like a memory issue or something like that.
I know the possibility is small, but maybe the kernel is sending a signal to kill the program? If I'm not completely mistaken, it's an OpenBSD payload to kill programs when it tries to access memory areas that aren't allowed per default.
So... it has the same glitches as the normal
The PID still glitched just as the default
It was late to me too at that day. 😄 |
Well, nice to see it working. 😄
Well, is there a way to fix it without having to rewrite everything? 😆
Merci, I saw that! I'm happy to see this implementation working on other systems.
Yeah, I saw that when implementing. I even though of changing the name from
No problem, happy to see you're back here. |
Thanks, will fix that later prior to any PRs. I'll check what was there prior to the commit and make sure that the old code is still retained for old systems. |
@takusuman I am (potentially) back again from a long hiatus of lots of things going on in my personal life. I came up with an idea, which would require a lot of effort but may be worth it. With the issues I experienced and everything I have committed so far to my fork for OpenBSD support, I believe potentially a better idea than changing all these different files and adding on would be to futureproof this by replacing a lot of these ifdefs with common functions in libcommon, to provide a universal interface for these OS-specific functions. Again, it would require very much effort but I believe it may be worth it to prevent this kind of issue from happening again across several programs. What are your thoughts? I will likely create a local backup of my existing branch, and start fresh from the current main and use the local one as a reference for what to do. Let me know what you think. |
And -- for moving some stuff to libcommon, if that becomes the choice for this I will first move some of Linux's stuff over to it as to test if it is feasible, since Linux is our first-class citizen here. If that goes well, I will start moving other systems' capabilities to the library as well. |
First of all, welcome back! We missed you, hope you're O.k. now.
Sounds great, Gunnar Ritter was portabilising Heirloom this way before stopping with the project.
Well, sounds awesome. If you're going to push to the latest branch, you may wish to go to
That made me wonder if |
Alright, I'll get started on that as soon as I can (sometime this week). I will try to update you on progress here throughout this process as to give myself some place to have a second opinion and input. EDIT: Forgot to mention, I will test the code (for now, I likely will add more systems later as time goes on) on my own Debian machine, the OpenBSD action, the Ubuntu action, and the Alpine Linux action. |
That's great. If you're going to use it, you can pull-request it into this main repository, these changes are very welcome.
If you're going to test it on a musl-based Linux distribution, you can try with Copacabana Linux, there's a Docker image available. By the way, if you want to, you can update the compatibility table at README.md too. |
As Molly stated in #21:
This issue will work as a list of what needs to be made for running Heirloom NG on OpenBSD.
@mamccollum If I were you, I would create a branch called "openbsd-compat" and make changes on it, it will be easier to apply the changes later in a "big patch".
The text was updated successfully, but these errors were encountered: