You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears there are quite a few problems with the latest head resulting in a broken build when compiling under windows. Here are the issues I've encountered so far in no particular order:
THThread.c uses USE_WIN32_THREADS but the CMake file actually defines USE_WIN_THREADS=1 causing incorrect preprocessing. This is easily fixed by changing one of them to match.
The restrict keyword is a c99 feature but THThread.c is being compiled without using -std=c99 resulting in errors.
In THThread.c, THREAD_FUNCTION isn't defined anywhere but pthread_create attempts to cast into it nonetheless resulting in compile errors. According to MSDN_beginthreadex needs unsigned ( __stdcall *start_address )( void * ) for the 3rd argument. Perhaps THREAD_FUNCTION should be defined to that?
threads.c #include <dlfcn.h> but that header doesn't exist under windows. Not sure what the fix should be here.
Please advise on how best to address the above issues.
Thanks
The text was updated successfully, but these errors were encountered:
Looks like there's an outstanding Pull Request #21 from last year that fixes most of the problems I've encountered above. Why hasn't this been merged into the master branch yet?
@honghuCode unfortunately no, I haven't heard anything back from the torch maintainers yet. :(
For time being I'm just using lua-lanes for my concurrency needs while programming in lua.
It appears there are quite a few problems with the latest head resulting in a broken build when compiling under windows. Here are the issues I've encountered so far in no particular order:
USE_WIN32_THREADS
but the CMake file actually definesUSE_WIN_THREADS=1
causing incorrect preprocessing. This is easily fixed by changing one of them to match.restrict
keyword is a c99 feature but THThread.c is being compiled without using-std=c99
resulting in errors.THREAD_FUNCTION
isn't defined anywhere butpthread_create
attempts to cast into it nonetheless resulting in compile errors. According to MSDN_beginthreadex
needsunsigned ( __stdcall *start_address )( void * )
for the 3rd argument. PerhapsTHREAD_FUNCTION
should be defined to that?#include <dlfcn.h>
but that header doesn't exist under windows. Not sure what the fix should be here.Please advise on how best to address the above issues.
Thanks
The text was updated successfully, but these errors were encountered: