IDN2_ALABEL_ROUNDTRIP is not implemented
The documentation gives no hint of that.
A second minor issue is that idn2_lookup_u8() returns -1, which is not one of the documented return values. It'd be much easier to guess what is happening if it returned -ENOSYS or such.