-
Notifications
You must be signed in to change notification settings - Fork 35
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
Porting it to FreeBSD #106
Comments
Hello, I have really no idea. I am afraid I cannot help with this. |
There is no reasons to be afraid @Tomas-M Thanks for your time. I'll be checking sources because this is a really nice launcher and I supose that many users in FreeBSD will like it because is simply, light and functional. Regards |
Ah yes, it was me who added that. It's part of the functionality that allows xlunch to read input from a stream in progress and add elements on the fly instead of just statically reading in everything in the beginning of the program. According to the poll documentiation POLLHUP is only available for revents and is ignored in events, so adding that flag wont do anything. Can't quite remember if POLLRDHUP is required or not for this feature, I don't think it is. Removing it and building on Linux works just fine, so I don't think this is what's causing your segfault. Could you look in the Makefile and comment out CFLAGS and comment in the CFLAGS that enable debugging information? The stack trace you provided doesn't really contain any helpful information. |
Hi @PMunch thanks for your suggestions. I re-build it in linux without POLLRDHUP and works fine. so I will delete that to be compliant with linux and BSD systems. This already compile over OpenBSD and FreeBSD without warnings or problems. About the CFLAGS suggestion I change the file in this way and re-compile:
And at build time this show this info with two warnings:
But this is finishing with a "Signal 11", so this means that the program accessed a memory location that was not assigned to it. At run time and in gdb I see the same for now:
GDB:
For me this appear to be a problem when xlunch includes in its build process to reloc.c in /lib/csu/amd64/reloc.c because if I change that file adding two blank lines at the end the problem appears two lines after two... In normal build without change:
In a build after add two blank lines:
Any idea? Thanks again. Best regards |
Where is the basename() function defined on Linux? And where on BSD?
|
It looks to me that basename() function is declared by string.h on Linux, not sure why that is not the case on FreeBSD, but anyway, I think we can safely add #include <libgen.h> to xlunch.c. It compiles fine for me on Linux with the include. So I've updated the sources here: 7db2f51 |
Hi @Tomas-M
I'm porting xlunch to FreeBSD 12 and I hope to port it for each new version of your launcher and the OS because I think is very efficient, simple and just do what people need when they have a simple desk. Thanks for your work (and for Slax too).
I did a little changed to your code replacing the constant POLLRDHUP for POLLHUP to get xlunch succefully compiled using gcc under FreeBSD:
But when I try to run it I get a "Segmentation fault (core dumped)" message. Then when I go to debug it with gdb I get this:
Do you have any idea what should I change to solve it?
Thanks for your time. Best regards.
The text was updated successfully, but these errors were encountered: