Skip to main content


#Git on #Plan9 is borken in weird ways.

Want to rebase branch A on top of branch B? No you don't. You want to change A to match B and drop all other commits.

Want to merge A into B but there's a conflict? Let's just arbitrarily take the line from A and ignore the one from B. That's what you wanted, right?

Unknown parent

Jonathan Lamothe

@pixx There's also the rebase issue where it seems to just drop the commits in the branch being merged and moves the head to the base branch.

Again, I don't know if this is just a problem on whaever version of the software SDF is using.

@pixx
Unknown parent

Jonathan Lamothe
@pixx I don't recognize the @{...} syntax. What's happening there?
@pixx


I have a complaint about #Plan9 #C.

I don't like that a literal 0 is accepted as a null pointer. I just spent an embarrassingly long time tracking down a segfault because in an attempt to zero out a buffer, I accidentally used memcpy(&buf, 0, sizeof(buf)) instead of memset(&buf, 0, sizeof(buf)).

The compiler should've been able to catch this.

#c #plan9


Been writing a little extension for acme mail in #Plan9. It's been a while since I've touched C though.

I, being me, am making it harder on myself by going full #TDD on this project.


Celeste Ryder 🐾 πŸ€πŸ³οΈ‍🌈 reshared this.


Any #Plan9 gurus on the fedi?

I've managed to break my profile causing me to be unable to connect to my account. It disconnects me upon running the profile script. drawterm -c is not an option because it executes the profile disconnecting me before even running the command. drawterm -G's a no-go as well.

Is there a way I can mount my remote home directory into my local (Debian 12) filesystem so that I can fix the profile without running rcpu?

#AskFedi

in reply to moody

scary compiler error
@moody When I try to compile, I get the following. I have the libssl-dev package installed, FWIW.
cc `pkg-config openssl --libs`  -o tlsclient cpu.o p9any.o libauthsrv/libauthsrv.a libmp/libmp.a libc/libc.a libsec/libsec.a                                                          /usr/bin/ld: cpu.o: in function `tls_send':                                                                                                                                           /home/jlamothe/src/tlsclient/cpu.c:92: undefined reference to `SSL_write'                                                                                                             /usr/bin/ld: cpu.o: in function `tls_recv':                                                                                                                                           /home/jlamothe/src/tlsclient/cpu.c:93: undefined reference to `SSL_read'                                                                                                              /usr/bin/ld: cpu.o: in function `main':                                                                                                                                               /home/jlamothe/src/tlsclient/cpu.c:164: undefined reference to `OPENSSL_init_ssl'                                                                                                     /usr/bin/ld: /home/jlamothe/src/tlsclient/cpu.c:165: undefined reference to `OPENSSL_init_crypto'                                                                                     /usr/bin/ld: /home/jlamothe/src/tlsclient/cpu.c:166: undefined reference to `OPENSSL_init_ssl'                                                                                        /usr/bin/ld: /home/jlamothe/src/tlsclient/cpu.c:167: undefined reference to `TLSv1_2_client_method'                                                                                   /usr/bin/ld: /home/jlamothe/src/tlsclient/cpu.c:167: undefined reference to `SSL_CTX_new'                                                                                             /usr/bin/ld: /home/jlamothe/src/tlsclient/cpu.c:168: undefined reference to `SSL_CTX_set_psk_client_callback'                                                                         /usr/bin/ld: /home/jlamothe/src/tlsclient/cpu.c:172: undefined reference to `SSL_CTX_set_options'                                                                                     /usr/bin/ld: /home/jlamothe/src/tlsclient/cpu.c:177: undefined reference to `SSL_new'                                                                                                 /usr/bin/ld: cpu.o: in function `p9authtls':                                                                                                                                          /home/jlamothe/src/tlsclient/cpu.c:53: undefined reference to `SSL_set_fd'                                                                                                            /usr/bin/ld: /home/jlamothe/src/tlsclient/cpu.c:55: undefined reference to `SSL_connect'                                                                                              collect2: error: ld returned 1 exit status                                                                                                                                            make: *** [Makefile:14: tlsclient] Error 1
in reply to Jonathan Lamothe

You need at least openssl1.1 this seems like you only have 1.0 which has not been supported for 3 years and counting.
in reply to moody

@moody That's surprising. Stuff in Debian's repositories is often out of date, but not usually that out of date.
in reply to Jonathan Lamothe

Yeah, something does seem a bit fishy, sorry that it doesn't work out for you. I'll get a debian VM going in a bit and figure out whats up. In terms of booting a 9front VM, you should be able to use the live CD for connecting, you don't need to do a full install first. For what that's worth.
in reply to moody

@moody Such is the nature of compiling C code. I really wish it had some sort of automatic dependency management, but what can you expect from a language that old?

When the bootcamp is over, I actually want to get into writing software for Plan9, because despite being very C-centric, it seems a nice system to develop for.

Edit: autocorrupt

This entry was edited (1 year ago)
in reply to Jonathan Lamothe

I figured out the issue, it was somehow related to the ordering of passing the -l flags to cc (ugh!), if you pull the latest code from sr.ht it should build fine on debian stable now. You will need both libssl-dev and pkg-config. I've added debian to the CI builds for this now so this shouldn't slip by again without me noticing. Thanks for the bug report.

Plan 9 C thankfully has none of this insanity, as you've noticed.

in reply to Jonathan Lamothe

@moody So I ran:
./tlsclient -u jlamothe -h 9p.sdf.org -a 9p.sdf.org -p 17019 rm /usr/jlamothe/lib/profile
...but my profile still seems to exist. It's giving me the same error about line 7 when I connect using drawterm.
in reply to Jonathan Lamothe

You need -R to make tlslcient act like rcpu, by default it works closer to tlsclient on 9front. If you choose to just remove the file don't forget to re-run /sys/lib/newuser to generate a new default.
in reply to Jonathan Lamothe

Cool, so now you can do something like:

tlsclient -R -h 9p.sdf.org -a 9p.sdf.org rc -i

Then edit profile with either ed or sam -d.

in reply to moody

@moody oh my god, I have a prompt!

Thank you!!

Edit: I was clearly too happy here to be bothered with proper spelling.

This entry was edited (1 year ago)

This website uses cookies. If you continue browsing this website, you agree to the usage of cookies.

⇧