The infamous "main: TLS init def ctx failed: -1" and a solution