Problem with root on MacOs: error: module ‘Darwin’ uses additional module map

See also related topic: Problem with root on macos: error: module 'Darwin' uses additional module map - #4 by Axel.

Maybe @Axel knows any workaround?