Error compiling with clang

  • TEMPPART
    15th Feb 2022 Member 0 Permalink

    Haven't changed anything, just a fresh clone from git

     

    $ ninja
    [1/1] Linking target powder.exe
    FAILED: powder.exe
    "c++" @powder.exe.rsp
    ld.lld: error: undefined symbol: __start_tpt_tls
    >>> referenced by powder.exe.p/src_common_tpt-thread-local.cpp.obj:(.refptr.__start_tpt_tls)

    ld.lld: error: undefined symbol: __stop_tpt_tls
    >>> referenced by powder.exe.p/src_common_tpt-thread-local.cpp.obj:(.refptr.__stop_tpt_tls)

    ld.lld: error: undefined symbol: __declspec(dllimport) _sys_nerr
    >>> referenced by libcurl.a(libcurl_la-strerror.o):(Curl_strerror)
    c++: error: linker command failed with exit code 1 (use -v to see invocation)
    ninja: build stopped: subcommand failed.

    Edited once by TEMPPART. Last: 15th Feb 2022
  • LBPHacker
    15th Feb 2022 Developer 0 Permalink
    Are you cross-compiling for windows with clang?
  • TEMPPART
    15th Feb 2022 Member 0 Permalink

    @LBPHacker (View Post)

     I'm using MSYS2

  • LBPHacker
    15th Feb 2022 Developer 0 Permalink
    Alright, noted. This is technically not supported (in the sense that it might work but we've never tried it and it's too much work to support), because on windows, you're reliant on our prebuilt libraries, which are built with gcc under mingw. The "too much work" part would be getting tpt-libs to build with clang under msys2. There's absolutely no documentation on how to do this, mostly because nobody ever asked. If you don't feel like either wasting your time trying to get tpt-libs to build, or waiting for us to decide to do the same, you should consider building with gcc under mingw.

    Edit: Feel free to hop onto irc to discuss this further.
    Edited once by LBPHacker. Last: 15th Feb 2022
  • TEMPPART
    15th Feb 2022 Member 0 Permalink

    @LBPHacker (View Post)

     I see. Also, would you ever support using libressl?