Closed luzaranza closed 2 years ago
@weiss, @prefiks: It has been solved, I think?
Yes, indeed. The problem was with compiling the fast_tls
dependency, this has been fixed.
Ok, so the solution was to adjust the fast_tls.c code. Many thanks. On Monday, 25 July 2022, 16:55:22 GMT-5, Holger Weiß @.***> wrote:
Closed #37 as completed.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
Yes. Many thanks to all. On Monday, 25 July 2022, 16:50:07 GMT-5, Neustradamus @.***> wrote:
@weiss, @prefiks: It has been solved, I think?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
I was following along to a blog to install an erlang stun component using mix on Windows 10.
ref: https://littlelines.com/blog/2020/07/06/building-a-video-chat-app-in-phoenix-liveview
In brief:
after adding # {:stun, "~> 1.0"} to mix.xs and running mix deps.get then mix compile I received an error message while trying to run what appears to be a batch compile executable called cl.exe that the dependency fast_tls.c, could not be compiled due to missing c (++?) header files (eg stdio.h ...), On further investigation this appeared to be due to the Microsoft Visual Studio MVSC compiler tools not being in place, and after installing some of the Microsoft Visual Studio core, I managed to create a dummy project and access the command line within the Microsoft Visual Studio env and re-ran the mix command. This appeared to advance things a little and the next error was due to the missing openssl src files. I then applied the fix I saw to the Mac homebrew settings:
for the windows environment. And then re-ran the mix compile. But now it is clear that the MSVC compiler presumable called by the cl.exe batch file will not allow the fast_stl.c source file to compile. Apart from spitting out a host of warnings it stops compilation with essentially these error messages:
c:/Users/Paul/Desktop/phoenix/els_umbrella/deps/fast_tls/c_src/fast_tls.c(484): error C2057: expected constant expression c:/Users/Paul/Desktop/phoenix/els_umbrella/deps/fast_tls/c_src/fast_tls.c(484): error C2466: cannot allocate an array of constant size 0 c:/Users/Paul/Desktop/phoenix/els_umbrella/deps/fast_tls/c_src/fast_tls.c(484): error C2133: 'name': unknown size
This appears to tell me that this particular compiler is too picky when looking a memory allocation for data structures such as arrays?
Well, I was just wondering if there is another way to go to compile this source code on a Windows 10 machine without using Visual Studio? I've tried changing the so-called Platform toolset (to LLVM clang-cl an alternative lib offered by Visual Study) but this has not effect. I don't want to have to doctor the fast_tls.c code since quite clearly it compiles fine on other platforms. Or, has anyone had a similar experience in trying to compile this mix dep on a Windows platform?
Best regards.
Paul.
Originally posted by @philipmoniaga in https://github.com/processone/ejabberd/issues/1107#issuecomment-217828211