You need to log in before you can comment on or make changes to this bug.
When installing some software which needs libtiff, I get a compile error due to conflicting redefinition of uint64. See below: cd /path/to/hugin-app/work/hugin-2013.0.0/src/hugin1/stitch_project && /usr/bin/clang++ -DHUGIN_HSI -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXMAC__ -D__WXOSX_COCOA__ -D__WXOSX__ -pipe -Os -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=0 -I/opt/local/include -arch x86_64 -I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/include/wx-3.0 -DNDEBUG -arch x86_64 -I/path/to/hugin-app/work/hugin-2013.0.0/src -I/path/to/hugin-app/work/hugin-2013.0.0/src/hugin_base -I/path/to/hugin-app/work/hugin-2013.0.0/src/foreign/vigra -I/path/to/hugin-app/work/hugin-2013.0.0/src/celeste -I/opt/local/include -I/opt/local/include/OpenEXR -F//System/Library/Frameworks -I/System/Library/Frameworks/GLUT.framework/Versions/A/Headers -I/path/to/hugin-app/work/hugin-2013.0.0/src/foreign -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/lib/wx/include/osx_cocoa-unicode-3.0 -I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/include/wx-3.0 -I/path/to/hugin-app/work/hugin-2013.0.0/src/hugin1 -o CMakeFiles/HuginStitchProject.dir/hugin_stitch_project.cpp.o -c /path/to/hugin-app/work/hugin-2013.0.0/src/hugin1/stitch_project/hugin_stitch_project.cpp In file included from /path/to/hugin-app/work/hugin-2013.0.0/src/hugin1/stitch_project/hugin_stitch_project.cpp:46: In file included from /opt/local/include/tiffio.h:33: /opt/local/include/tiff.h:78:23: error: typedef redefinition with different types ('unsigned long' vs 'uint64_t' (aka 'unsigned long long')) typedef TIFF_UINT64_T uint64; ^ //System/Library/Frameworks/Security.framework/Headers/cssmconfig.h:53:18: note: previous definition is here typedef uint64_t uint64; ^ 2 warnings and 1 error generated. I'm using Mac OS X 10.7 with MacPorts, libtiff 4.0.3. I can send the contents of Security.framework if needed.
Here's a minimal example to reproduce the problem on Mac OS X: #include <ApplicationServices/ApplicationServices.h> #include <tiffio.h> int main() { return 0; } which fails to compile with the same problem: > g++ test.cpp -o test -I/opt/local/include In file included from /opt/local/include/tiffio.h:33, from test.cpp:2: /opt/local/include/tiff.h:78: error: conflicting declaration ‘typedef long unsigned int uint64’ /System/Library/Frameworks/Security.framework/Headers/cssmconfig.h:53: error: ‘uint64’ has a previous declaration as ‘typedef uint64_t uint64’ (writing from a temporary account)
There is also another problem on Mac OS X. Consider the following minimal example: #include <tiffio.h> int main() { uint64 a; printf("%d\n", (int)sizeof(a)); return 0; } > g++ -arch i386 test.cpp -o test > ./test 4 while it should return 8.
Created an attachment (id=636) [details] Reverse type preference for uint64. My fix for the problem: reverse type preference in 'configure' script, where 'unsigned long long' should be prefered, and that way it won't conflict with Security.framework.
The issue is still there with MacOS High-Sierra and tiff 4.0.10. When do you plan to fix it ? the proposed patch is great MacPorts has it's own patch : https://github.com/macports/macports-ports/blob/master/graphics/tiff/files/patch-configure.ac.diff
I have submitted a Merge Request : https://gitlab.com/libtiff/libtiff/merge_requests/51
Bugzilla is no longer used for tracking libtiff issues. Remaining open tickets, such as this one, have been migrated to the libtiff GitLab instance at https://gitlab.com/libtiff/libtiff/issues . The migrated tickets have their summary prefixed with [BZ#XXXX] where XXXX is the initial Bugzilla issue number.