#38168: Conflicting declarations in tiff and opencv --------------------------+------------------------ Reporter: karo03de@… | Owner: stromnov@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: tiff opencv | --------------------------+------------------------ Comment (by karo03de@…): Replying to [comment:5 stromnov@…]:
tiffconf.h constructed at configure phase, so it would be difficult to apply this patch.
Please, attach debug log, I can't reproduce this issue.
I am trying to build gmic from gmic.sourceforge.net with standard settings plus the opencv camera part: the output of make is perhaps what you mean: {{{ make -B -j2 "OPT_CFLAGS = -Dcimg_use_opencv `pkg-config opencv --cflags` -fno-tree-pre -ffast-math" "OPT_LDFLAGS= -Dcimg_use_opencv `pkg-config opencv --libs`" macosx make "CFLAGS=-Dgmic_build -I/opt/local/include -Wall -W -Dgmic_is_beta=1 -Dcimg_display=1 -Dcimg_appname=\\\"gmic\\\" -I/usr/X11R6/include -Dcimg_use_zlib -Dcimg_use_png -Dcimg_use_jpeg -Dcimg_use_tiff -Dcimg_use_openexr -I/opt/local/include/OpenEXR -Dcimg_use_fftw3 -Dcimg_use_opencv -I/opt/local/include/opencv -I/opt/local/include -fno- tree-pre -ffast-math" "LDFLAGS=-L/opt/local/lib -lm -L/usr/X11R6/lib -lX11 -lpthread -lz -lpng -lz -ljpeg -ltiff -lIlmImf -lHalf -lfftw3 -Dcimg_use_opencv /opt/local/lib/libopencv_calib3d.dylib /opt/local/lib/libopencv_contrib.dylib /opt/local/lib/libopencv_core.dylib /opt/local/lib/libopencv_features2d.dylib /opt/local/lib/libopencv_flann.dylib /opt/local/lib/libopencv_gpu.dylib /opt/local/lib/libopencv_highgui.dylib /opt/local/lib/libopencv_imgproc.dylib /opt/local/lib/libopencv_legacy.dylib /opt/local/lib/libopencv_ml.dylib /opt/local/lib/libopencv_nonfree.dylib /opt/local/lib/libopencv_objdetect.dylib /opt/local/lib/libopencv_photo.dylib /opt/local/lib/libopencv_stitching.dylib /opt/local/lib/libopencv_ts.dylib /opt/local/lib/libopencv_video.dylib /opt/local/lib/libopencv_videostab.dylib " gmic_gmic g++ -o gmic_bool.o -c gmic.cpp -Dgmic_build -I/opt/local/include -Wall -W -Dgmic_is_beta=1 -Dcimg_display=1 -Dcimg_appname=\"gmic\" -I/usr/X11R6/include -Dcimg_use_zlib -Dcimg_use_png -Dcimg_use_jpeg -Dcimg_use_tiff -Dcimg_use_openexr -I/opt/local/include/OpenEXR -Dcimg_use_fftw3 -Dcimg_use_opencv -I/opt/local/include/opencv -I/opt/local/include -fno-tree-pre -ffast-math -Dgmic_split_compilation -Dgmic_bool g++ -o gmic_uchar.o -c gmic.cpp -Dgmic_build -I/opt/local/include -Wall -W -Dgmic_is_beta=1 -Dcimg_display=1 -Dcimg_appname=\"gmic\" -I/usr/X11R6/include -Dcimg_use_zlib -Dcimg_use_png -Dcimg_use_jpeg -Dcimg_use_tiff -Dcimg_use_openexr -I/opt/local/include/OpenEXR -Dcimg_use_fftw3 -Dcimg_use_opencv -I/opt/local/include/opencv -I/opt/local/include -fno-tree-pre -ffast-math -Dgmic_split_compilation -Dgmic_uchar In file included from /opt/local/include/tiffio.h:33, from ./CImg.h:286, from gmic.h:71, from gmic.cpp:1032: /opt/local/include/tiff.h:77: error: conflicting declaration ‘typedef long int int64’ /opt/local/include/opencv2/core/types_c.h:163: error: ‘int64’ has a previous declaration as ‘typedef int64_t int64’ /opt/local/include/tiff.h:78: error: conflicting declaration ‘typedef long unsigned int uint64’ /opt/local/include/opencv2/core/types_c.h:164: error: ‘uint64’ has a previous declaration as ‘typedef uint64_t uint64’ In file included from /opt/local/include/tiffio.h:33, from ./CImg.h:286, from gmic.h:71, from gmic.cpp:1032: /opt/local/include/tiff.h:77: error: conflicting declaration ‘typedef long int int64’ /opt/local/include/opencv2/core/types_c.h:163: error: ‘int64’ has a previous declaration as ‘typedef int64_t int64’ /opt/local/include/tiff.h:78: error: conflicting declaration ‘typedef long unsigned int uint64’ /opt/local/include/opencv2/core/types_c.h:164: error: ‘uint64’ has a previous declaration as ‘typedef uint64_t uint64’ make[1]: *** [gmic_uchar.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: *** [gmic_bool.o] Error 1 make: *** [macosx] Error 2 }}} -- Ticket URL: <https://trac.macports.org/ticket/38168#comment:6> MacPorts <http://www.macports.org/> Ports system for OS X