Solved Trying to port a new package: xlunch

Hi there.

xlunch is a light weight launcher for Xorg/X11 to run programs, commands, or simply select something out of a list using your mouse or keyboard. It requires only pure Xlib and Imlib2.

I'm trying to port a fork of xlunch. I had to do some changes over the source code to compile it using gcc without errors on FreeBSD 12 but when I try to run it I see this:
Code:
./xlunch -W
Segmentation fault (core dumped)

And using gdb xlunch xlunch.core to see what is happening I'm getting this:
Code:
Core was generated by `./xlunch -W'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00000008009c821f in strlen () from /lib/libc.so.7

[code](gdb) list +
1    /usr/src/lib/csu/amd64/crti.S: No such file or directory.

Code:
(gdb) list +
1    /usr/src/lib/csu/amd64/reloc.c: No such file or directory.

Code:
(gdb) bt full
#0  0x00000008009c821f in strlen () from /lib/libc.so.7
No symbol table info available.
#1  0x000000080079dccc in XSetClassHint () from /usr/local/lib/libX11.so.6
No symbol table info available.
#2  0x0000000000402ccf in main ()
No symbol table info available.
Does anybody know how to solve that? I could I add the libraries that are missing? Thanks a lot!

Regards
 
You need to have a complete source tree (with the correct version) in /usr/src to be able to resolve the missing files from /usr/src/.
 
Hi SirDice, thanks again for your support.

That changes the error to another. Now gdb says another thing:

Code:
(gdb) 
Line number 67 out of range; /usr/src/lib/csu/amd64/reloc.c has 66 lines.

Thanks for your help. I'll be checking code with the main developer of the package.

Regards
 
Make sure the source tree in /usr/src matches with the version of FreeBSD that you have.
 
Thanks SirDice

I did it using uname -r to be sure/check what version I'm using :) (12.0 RELEASE)
Then I syncronize my tree with svn checkout https://svn.freebsd.org/base/releng/12.0 /usr/src/

Anyway, tomorrow at office I'll check again.

Thanks, thanks, thanks. 👍
 
Hi again SirDice

Problem was solved. I was talking with the developer and we detect some changes in c sources to build it without problems under linux and FreeBSD.;)

Now its running in my right monitor.

6119


A last question: I was reading this guide https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/quick-porting.html to build, submit and mantain this port for FreeBSD, am I right or should I read another thing?

Thanks again for your help!
 
A last question: I was reading this guide https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/quick-porting.html to build, submit and mantain this port for FreeBSD, am I right or should I read another thing?
No, that's the thing you need to read. Make sure to also follow the test procedures, that will ensure your port is complete as it will do a bunch of tests on pkg-plist for example. Especially the poudriere tests are essential.
 
Back
Top