I am trying to build libtiff from the GnuWin32 source package. I am using Bash and Make from MSYS 1.0.10, and I have the current BinUtils and GCC from MinGW 5.1.4. I edited config.status to fix the glibc path for my machine and I ran make. It failed compiling tif_unix.c.
In file included from ../../tiff-3.8.2-src/libtiff/tif_unix.c:97:
D:/Progra~1/GnuWin32/include/glibc/sys/mman.h:32: error: conflicting types for 'off_t'
d:/win32app/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/sys/types.h:41: error: previous declaration of 'off_t' was here
...
It appears that MinGW is not compatible with the large file support that is enabled in the GnuWin32 libtiff source (off_t is a long in MinGW). I thought that I could easily fix this by making sure that the HAVE_SYS_TYPES_H macro was not defined. I commented out the two relevant lines in the config.status script and ran it again. However, attempting to run make again resulted in the exact same error as above. I looked at the tif_config.h file and verified that HAVE_SYS_TYPES_H was not defined. I don't understand why sys/types.h is still being pulled in from MinGW.
Any insights will be greatly appreciated. Thanks in advance.
Rob
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The compilation process used for this version of libtiff is rather tricky. I think you night best try to configure and make it without any additional tricks such as large-file support. Add these only after you have successfully compiled the most simple case, and even then you may probably be more successful when adding them in your own way (such as a simple #define stat _stati64).
See also the discussion on the gnuwin32-users-list: https://sourceforge.net/mailarchive/forum.php?thread_name=338589.11597.qm%40web55407.mail.re4.yahoo.com&forum_name=gnuwin32-users
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I am trying to build libtiff from the GnuWin32 source package. I am using Bash and Make from MSYS 1.0.10, and I have the current BinUtils and GCC from MinGW 5.1.4. I edited config.status to fix the glibc path for my machine and I ran make. It failed compiling tif_unix.c.
In file included from ../../tiff-3.8.2-src/libtiff/tif_unix.c:97:
D:/Progra~1/GnuWin32/include/glibc/sys/mman.h:32: error: conflicting types for 'off_t'
d:/win32app/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/sys/types.h:41: error: previous declaration of 'off_t' was here
...
It appears that MinGW is not compatible with the large file support that is enabled in the GnuWin32 libtiff source (off_t is a long in MinGW). I thought that I could easily fix this by making sure that the HAVE_SYS_TYPES_H macro was not defined. I commented out the two relevant lines in the config.status script and ran it again. However, attempting to run make again resulted in the exact same error as above. I looked at the tif_config.h file and verified that HAVE_SYS_TYPES_H was not defined. I don't understand why sys/types.h is still being pulled in from MinGW.
Any insights will be greatly appreciated. Thanks in advance.
Rob
The compilation process used for this version of libtiff is rather tricky. I think you night best try to configure and make it without any additional tricks such as large-file support. Add these only after you have successfully compiled the most simple case, and even then you may probably be more successful when adding them in your own way (such as a simple #define stat _stati64).
See also the discussion on the gnuwin32-users-list:
https://sourceforge.net/mailarchive/forum.php?thread_name=338589.11597.qm%40web55407.mail.re4.yahoo.com&forum_name=gnuwin32-users