Opened 12 years ago

Closed 12 years ago

#35933 closed defect (fixed)

pHash: CImg.h: error: declaration of 't' shadows template parameter

Reported by: angleto@… Owned by: toy
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: Cc: ryandesign (Ryan Carsten Schmidt)
Port: pHash

Description

pHash does not build on macos 10.8.1 because of template preprocessing error.

The error is the following:

:info:build mv -f .deps/ph_fft.Tpo .deps/ph_fft.Plo
:info:build In file included from pHash.cpp:25:
:info:build In file included from ./pHash.h:46:
:info:build /opt/local/include/CImg.h:24833:18: error: declaration of 't' shadows template parameter
:info:build       for (float t = 0; t<1; t+=_precision) {
:info:build                  ^
:info:build /opt/local/include/CImg.h:24809:23: note: template parameter is declared here
:info:build     template<typename t>
:info:build                       ^
:info:build In file included from cimgffmpeg.cpp:26:
:info:build In file included from ./cimgffmpeg.h:33:
:info:build /opt/local/include/CImg.h:24833:18: error: declaration of 't' shadows template parameter
:info:build       for (float t = 0; t<1; t+=_precision) {
:info:build                  ^
:info:build /opt/local/include/CImg.h:24809:23: note: template parameter is declared here
:info:build     template<typename t>
:info:build                       ^
:info:build In file included from audiophash.cpp:25:
:info:build In file included from ./audiophash.h:33:
:info:build In file included from ./pHash.h:46:
:info:build /opt/local/include/CImg.h:24833:18: error: declaration of 't' shadows template parameter
:info:build       for (float t = 0; t<1; t+=_precision) {
:info:build                  ^
:info:build /opt/local/include/CImg.h:24809:23: note: template parameter is declared here
:info:build     template<typename t>
...

There is a new minor release of of pHash (0.9.4) which could have solved the problem, but I did't try.

Attachments (2)

main.log (101.6 KB) - added by angleto@… 12 years ago.
build log
Portfile (1.2 KB) - added by angleto@… 12 years ago.
Portfile for CImg 1.5.1

Download all attachments as: .zip

Change History (6)

Changed 12 years ago by angleto@…

Attachment: main.log added

build log

comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: changed from macports-tickets@… to ivan@…
Port: phash added

comment:2 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Port: pHash added; phash removed
Summary: phash @0.9.3 Build error - preprocessing template from CImg.h headerpHash: CImg.h: error: declaration of 't' shadows template parameter

Upgrading CImg to 1.5.1 seems to fix this.

Changed 12 years ago by angleto@…

Attachment: Portfile added

Portfile for CImg 1.5.1

comment:3 in reply to:  2 Changed 12 years ago by angleto@…

Replying to ryandesign@…:

Upgrading CImg to 1.5.1 seems to fix this.

I confirm, it works using CImg 1.5.1 If somebody need it, I attached above the portfile for building CImg 1.5.1

comment:4 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed

r97590 (maintainer timeout)

Note: See TracTickets for help on using tickets.