Open T35R6braPwgDJKq opened 2 years ago
configure:11332: i686-w64-mingw32-gcc -o conftest.exe -g -O2 -I/tmp/tor-win32/prefix/include -Wl,-rpath,/tmp/tor-win32/prefix/lib -L/tmp/tor-win32/prefix/lib conftest.c -levent -liphlpapi -lbcrypt -lws2_32 >&5
configure:11332: $? = 0
configure:11332: ./conftest.exe
0164:err:module:import_dll Library libevent-2-1-6.dll (which is needed by L"Z:\\tmp\\tor-win32\\src\\tor\\conftest.exe") not found
0164:err:module:LdrInitializeThunk Importing dlls for L"Z:\\tmp\\tor-win32\\src\\tor\\conftest.exe" failed, status c0000135
configure:11332: $? = 53
configure: program exited with status 53
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "tor"
| #define PACKAGE_TARNAME "tor"
| #define PACKAGE_VERSION "0.4.7.3-alpha-dev"
| #define PACKAGE_STRING "tor 0.4.7.3-alpha-dev"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define CONFIG_FLAGS "--host=i686-w64-mingw32 --disable-asciidoc --disable-zstd --disable-lzma --enable-static-libevent --with-libevent-dir=/tmp/tor-win32/prefix --enable-static-openssl --with-openssl-dir=/tmp/tor-win32/prefix --disable-tool-name-check --enable-fatal-warnings --prefix=/tmp/tor-win32/prefix"
| #define APPROX_RELEASE_DATE "2021-12-16"
| #define PACKAGE "tor"
| #define VERSION "0.4.7.3-alpha-dev"
| #define HAVE_STDIO_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_WCHAR_H 1
| #define STDC_HEADERS 1
| #define _ALL_SOURCE 1
| #define _DARWIN_C_SOURCE 1
| #define _GNU_SOURCE 1
| #define _HPUX_ALT_XOPEN_SOCKET_API 1
| #define _NETBSD_SOURCE 1
| #define _OPENBSD_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1
| #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
| #define __STDC_WANT_IEC_60559_DFP_EXT__ 1
| #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
| #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1
| #define __STDC_WANT_LIB_EXT2__ 1
| #define __STDC_WANT_MATH_SPEC_FUNCS__ 1
| #define _TANDEM_SOURCE 1
| #define __EXTENSIONS__ 1
| #define ENABLE_OPENSSL 1
| #define ENABLE_ZSTD_ADVANCED_APIS 1
| #define HAVE_SYSTEMD 1
| #define HAVE_SYSTEMD_209 1
| #define HAVE_MODULE_RELAY 1
| #define HAVE_MODULE_DIRCACHE 1
| #define HAVE_MODULE_DIRAUTH 1
| #define COMPILER_VERSION "11.2.0"
| #define COMPILER_VENDOR "gnu"
| #define COMPILER "GCC"
| #define FLEXIBLE_ARRAY_MEMBER /**/
| #define HAVE_ATTR_FALLTHROUGH 1
| #define HAVE_FTIME 1
| #define HAVE_GETTIMEOFDAY 1
| #define HAVE_LLROUND 1
| #define HAVE_LROUND 1
| #define HAVE_RINT 1
| #define HAVE_SNPRINTF 1
| #define HAVE_STRNCASECMP 1
| #define HAVE_STRCASECMP 1
| #define HAVE_STRNLEN 1
| #define HAVE_STRTOK_R 1
| #define HAVE_STRTOULL 1
| #define HAVE_TRUNCATE 1
| #define HAVE_USLEEP 1
| #define HAVE_VASPRINTF 1
| #define HAVE__VSCPRINTF 1
| #define HAVE_VSNPRINTF 1
| #define HAVE_CLOCK_GETTIME 1
| #define HAVE_DECL_SECUREZEROMEMORY 1
| #define HAVE_DECL__GETWCH 1
| /* end confdefs.h. */
|
| #ifdef _WIN32
| #include <winsock2.h>
| #endif
| struct event_base;
| struct event_base *event_base_new(void);
| void event_base_free(struct event_base *);
| int
| main (void)
| {
|
| #ifdef _WIN32
| {WSADATA d; WSAStartup(0x101,&d); }
| #endif
| event_base_free(event_base_new());
|
| ;
| return 0;
| }
configure:11349: error: Found linkable libevent in /tmp/tor-win32/prefix, but it does not seem to run, even with -R. Maybe specify another using --with-libevent-dir}
The problem seems to be runtime linking
find -name libevent-2-1-6.dll
./prefix/bin/libevent-2-1-6.dll
./src/libevent-2.1.8-stable/.libs/libevent-2-1-6.dll
I installed MSYS and Mingw on it and I compiled a static Tor for Windows successfully with this project: https://github.com/cretz/tor-static
The only problem is that you'll need to have access to a Windows host, I tried to install MSYS on Wine in Linux and the installer is buggy.