0

I'm trying to compile the thrift cpp library from a debian and mingw toolset. I manage to compile zlib, openssl, and libevent with mingw. But when I'm trying to configure thrift, it does not detect libevent (but it detects openssl and zlib). below is my configure command :

./configure --host=x86_64-w64-mingw32 --enable-static --disable-shared LDFLAGS=”-L/home/ioan/devTools/openssl-OpenSSL_1_1_1-stable -L/home/ioan/devTools/libevent-2.1.11-stable/ -L/home/ioan/devTools/zlib-1.2.11/ -L/usr/x86_64-w64-mingw32/lib -lgdi32 -lws2_32 -lmincore -lole32 -lwindowsapp” CPPFLAGS=”-I/home/ioan/devTools/zlib-1.2.11/ -I/home/ioan/devTools/openssl-OpenSSL_1_1_1-stable/include -I/home/ioan/devTools/libevent-2.1.11-stable/include --with-libevent=/home/ioan/devTools/libevent-2.1.11-stable” --with-boost=/home/ioan/devTools/boostLibs --with-zlib=/home/ioan/devTools/zlib-1.2.11

I set the LDFLAGS environment variable, the CPPFLAGS environment variable and the --with-libevent tag. But the configure result is always the same : not detected!!!

The build is ok, but i'm missing the libthriftnb.a library (I got only libthrift.a and libthriftz.a) Did I miss something?

regards, Ioan

  • 1
    Have you tried using `cmake` instead of `./configure`? Thrift 0.14.1 builds in my MinGW-w64 environment with the following `cmake` flags: `-DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL=ON -DWITH_PYTHON:BOOL=OFF -DWITH_HASKELL:BOOL=OFF -DWITH_JAVA:BOOL=OFF -DWITH_NODEJS:BOOL=OFF -DBUILD_TESTING:BOOL=OFF` – Brecht Sanders May 23 '21 at 16:20
  • so I tried with cmake. It seems to generate all the right stuff, but the make command, builds a so file and not a dll (I previously set all environmentvariables to point to mingw compiler and linker). and he stills does not finf the libevent library. – Ioan Le Gué May 25 '21 at 06:20
  • Are you sure cross compiling? Can you check the `.so` and `.a` files with the `file` command to see for which platform they were generated? I'm guessing you just built the Linux versions... – Brecht Sanders May 25 '21 at 09:05
  • the file isan ELF 64 one, but I will make an other try, as I can not anymore even generate the Makefile with configure!!! – Ioan Le Gué May 25 '21 at 13:09
  • by the way configure set the WIN32 definition and the compiler and linker are all set to mingw ones. and the host option is set to x86_64-w64-mingw32 to indicate that the target is windows one. – Ioan Le Gué May 25 '21 at 13:18

0 Answers0