Allow root to login Dragonfly BSD through SSH

To allow root to login Dragonfly BSD through SSH, you need to modify two parts in /etc/ssh/sshd_config:

......
PermitRootLogin yes
......
PasswordAuthentication yes
......

Otherwise you will bump into following error:

$ ssh root@192.168.35.195
The authenticity of host '192.168.35.195 (192.168.35.195)' can't be established.
......
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.35.195' (ECDSA) to the list of known hosts.
root@192.168.35.195: Permission denied (publickey,keyboard-interactive).

 

Fix “identifier “__builtin_is_constant_evaluated” is undefined” error on Arch Linux

The Arch Linux has shipped gcc 9, but the newest CUDA V10.1.168 still only supports gcc 8. So I met following error after upgrading Arch Linux:

......
/usr/include/c++/9.1.0/bits/stl_function.h(437): error: identifier "__builtin_is_constant_evaluated" is undefined
......

Unfortunately, gcc-8 package is not ready now. So I fell back to gcc-7:

SET(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -ccbin=gcc-7"}

Although the CUDA release note claims it already supports clang 8, I indeed bumped into some compile errors when using clang 8. So using gcc-7 is a feasible work-around for me.

First taste of DragonFly BSD

Last week, I needed to pick a BSD Operating System which supports NUMA to do some testing, so I decided to give Dragonfly BSD a shot. Dragonfly BSDonly can run on X86_64 architecture, which reminds me of Arch Linux, and after some tweaking, I feel Dragonfly BSD may be a “developer-friendly” Operating System, at least for me.

I mainly use Dragonfly BSD as a server, so I don’t care whether GUI is fancy or not. But I have high requirements of developer tools, i.e., compiler and debugger. The default compiler of Dragonfly BSD is gcc 8.3, and I can also install clang 8.0.0 from package. This means I can test state-of-the-art features of compilers, and it is really important for me. gdb‘s version is 7.6.1, a little lag behind, but still OK.

Furthermore, the upgradation of Dragonfly BSD is pretty simple and straightforward. I followed document to upgrade my Operating System to 5.6.0 this morning, just copied and pasted, no single error, booted successfully.

Last but not least, there are many out-of-box packages which I can explore in the future.

It sounds interesting, right? Why not try it yourself?

Install DragonFly BSD on VirtualBox

Today I tried to install DragonFly BSD on VirualBox, and the whole progress was pretty smooth, but some caveats need to be noticed:

(1) Select FreeBSD(64-bit) as the Operating System;

(2) I use the simplest “Legacy BIOS“.

If you want to make your feet wet in DragonFly BSD, you can follow above steps yourself. Have fun!

Be aware of using gmake or make on BSD systems

When working on BSD systems, you should be aware of using gmake or make. E.g., I met a weird error using make on NetBSD today:

# make
.....
/usr/lib/crt0.o: In function `___start':
(.text+0xf7): undefined reference to `main'
collect2: error: ld returned 1 exit status
*** Error code 1
......

But using gmake, the compilation is OK.