Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to cross compile for windows 32 bit: error: conflicting types for ‘ssize_t’ #890

Open
zsoerenm opened this issue Nov 7, 2022 · 0 comments

Comments

@zsoerenm
Copy link

zsoerenm commented Nov 7, 2022

I failed to cross compile the windows 32 bit binaries using i686-w64-mingw32.

mkdir host/build
cd host/build
cmake -DCMAKE_INSTALL_PREFIX=$prefix\
  -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN}\
  -DCMAKE_BUILD_TYPE=Release\
  -DENABLE_BACKEND_LIBUSB=TRUE ..
make

It fails with:

[08:16:42] In file included from /workspace/srcdir/bladeRF/host/common/thirdparty/ad936x/../../../../thirdparty/analogdevicesinc/no-OS_local/platform_bladerf2/platform.h:47:0,
[08:16:42]                  from /workspace/srcdir/bladeRF/host/build/common/thirdparty/ad936x/ad9361.c:53:
[08:16:42] /workspace/srcdir/bladeRF/host/build/common/thirdparty/ad936x/util.h:163:17: error: conflicting types for ‘ssize_t’
[08:16:42]  typedef SSIZE_T ssize_t;
[08:16:42]                  ^~~~~~~
[08:16:42] In file included from /opt/i686-w64-mingw32/i686-w64-mingw32/sys-root/include/crtdefs.h:10:0,
[08:16:42]                  from /opt/i686-w64-mingw32/i686-w64-mingw32/sys-root/include/intrin.h:36,
[08:16:42]                  from /workspace/srcdir/bladeRF/host/build/common/thirdparty/ad936x/../../../common/include/host_config.h:128,
[08:16:42]                  from /workspace/srcdir/bladeRF/host/build/common/thirdparty/ad936x/ad9361.c:42:
[08:16:42] /opt/i686-w64-mingw32/i686-w64-mingw32/sys-root/include/corecrt.h:52:13: note: previous declaration of ‘ssize_t’ was here
[08:16:42]  typedef int ssize_t;
[08:16:42]              ^~~~~~~
[08:16:42] make[2]: *** [common/thirdparty/ad936x/CMakeFiles/ad936x.dir/build.make:77: common/thirdparty/ad936x/CMakeFiles/ad936x.dir/ad9361.c.obj] Error 1
[08:16:42] make[2]: Leaving directory '/workspace/srcdir/bladeRF/host/build'
[08:16:42] make[1]: *** [CMakeFiles/Makefile2:732: common/thirdparty/ad936x/CMakeFiles/ad936x.dir/all] Error 2

@zsoerenm zsoerenm changed the title Failing to cross compile for windows: error: conflicting types for ‘ssize_t’ Failing to cross compile for windows 32 bit: error: conflicting types for ‘ssize_t’ Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant