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

Can't build using MingW on Linux. #38

Open
pheest opened this issue May 16, 2022 · 2 comments
Open

Can't build using MingW on Linux. #38

pheest opened this issue May 16, 2022 · 2 comments

Comments

@pheest
Copy link

pheest commented May 16, 2022

Issues I've identified:

  1. GraphicsMagickSrc/magick/Makefile and GraphicsMagickSrc/coders/Makefile link to WIN32 libraries Advapi32 User32 Gdi32 and User32 Gdi32 OleAut32 respectively. Microsoft have these file names with a Capital letter on (case-insensitive) Windows. But MingW has these file names in lower case, which is a problem on (case-sensitive) Linux. The file names should be in lower case in the make file, this will be fine on both Windows and Linux.
  2. GraphicsMagickSrc/ttf/builds/windows/ftdebug cannot compile in these circumstances. The folder is one of several that the GraphicsMagick distribution has, I believe these are intended to allow internal debugging of the GraphicsMagick library. I believe the folder can be removed from the ADSupport compilation.
  3. hdf5src/h5win32defs.h declares struct timezone and struct timespec. But these structures are already declared by Linux headers which are used by MingW. This results in a redefinition error.
pheest pushed a commit to pheest/ADSupport that referenced this issue May 16, 2022
@pheest
Copy link
Author

pheest commented May 18, 2022

Can anyone shed any light on this linker error?

/usr/bin/x86_64-w64-mingw32-ld: /usr/lib/gcc/x86_64-w64-mingw32/9.3-posix/libgcc_eh.a(unwind-seh.o):(.text+0x3d0): multiple definition of `_Unwind_Resume'; /builds/DATAnet/adurl/.cache/adsupport-master/lib/windows-x64-mingw/libMagick++.dll.a(d000016.o):(.text+0x0): first defined here

@mfurseman
Copy link

We've been cross compiling with mingw static builds for MAST-U with the following Area Detector configuration:

# AreaDetector specific configuration
WITH_BOOST     = NO
BOOST_EXTERNAL = YES

WITH_PVA  = NO
WITH_QSRV = NO

WITH_BLOSC     = YES
BLOSC_EXTERNAL = NO

WITH_BITSHUFFLE     = YES
BITSHUFFLE_EXTERNAL = NO

WITH_GRAPHICSMAGICK     = YES
GRAPHICSMAGICK_EXTERNAL = NO

WITH_HDF5     = YES
HDF5_EXTERNAL = NO

WITH_JSON     = YES

WITH_JPEG     = YES
JPEG_EXTERNAL = NO

WITH_NETCDF     = YES
NETCDF_EXTERNAL = NO

WITH_NEXUS     = YES
NEXUS_EXTERNAL = NO

WITH_OPENCV     = NO
OPENCV_EXTERNAL = YES

WITH_SZIP     = YES
SZIP_EXTERNAL = NO

WITH_TIFF     = YES
TIFF_EXTERNAL = NO

XML2_EXTERNAL = NO

WITH_ZLIB     = YES
ZLIB_EXTERNAL = NO

The changes in #36 are what we needed to get things working there. Without looking in detail I'm guessing you are touching code we didn't use for our build?

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

2 participants