Re:A week-long programming retreat
by Cieplak on Monday March 05, 2018 @01:23AM
(#16519144)
Interesting to hear that C++ isn’t that well supported on OpenBSD. The story is quite the opposite with FreeBSD, where it’s really easy to use either clang or gcc. I usually spin up new jails to keep different installations sandboxed. CLion works quite nicely with most window managers on FreeBSD, but I rarely boot Xwindows these days and usually prefer to work with emacs inside tmux from the console.
[ Parent
| on HN ]
C++ support is pretty good with base Clang 5, OpenBSD is using the libc++ standard library and libc++abi (FreeBSD uses PathScale's libcxxrt). The situation with debuggers is another story, the base version of gdb is outdated (GPLv2 version). The ports/packages version (egdb) has better support for things like C++, threads, but may lack other features. There is currently no support for the LLVM debugger, sadly.
I wondered why he didn’t use LLDB; thanks.
My gut feeling is(was) that C++ is a first class citizen on OpenBSD. Its interesting having my beliefs challenged like this from someone so influential.
The question becomes; if its not C++, then what is the first class citizen on OpenBSD. And if it is C++ then how do we improve support? Just going to ports seems like a poor answer.
> The question becomes; if its not C++, then what is the first class citizen on OpenBSD.
Being an UNIX derivative the answer is quite easy, C.
Sure, but is there a popular, modern C compiler out there that doesn't compile C++ as well? Clang, GCC, Intel, MSVC... all of them compile C++ as well as C. I don't think it's possible to have first-hand support for C and not C++ any more unless you ship your own compiler. It sounds like the issue here is that OpenBSD is shipping older versions of LLVM/Clang and GCC.
Re:A week-long programming retreat
by temprature on Monday March 05, 2018 @06:10AM
(#16520227)
OpenBSD's base ships the most recent LLVM and Clang (5.01), but there's no LLDB yet and gdb is outdated (6.3, the last GPLv2 version).
He would have had a much better time using C99 than C++11, especially since he didn't want to install a newer gdb from ports.
Actually those C compilers you mention are implemented in C++, so yeah from that point of view you are right.
I was just speaking from language point of view, without regard to specific implementations.
Re:A week-long programming retreat
by justonepost on Monday March 05, 2018 @03:05AM
(#16519523)
It's possible given his technical depth he was using more obscure C++ constructs which aren't as well supported.