Opened 4 years ago

Closed 4 years ago

#62397 closed defect (fixed)

colorer @take5.be5_2: error: redefinition of 'log' as different kind of symbol

Reported by: cooljeanius (Eric Gallager) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: Cc:
Port: colorer

Description

Seems to be some sort of issue with variable naming and/or header inclusion:

../shared//./common/Logging.cpp:13:14: error: redefinition of 'log' as different kind of symbol
static FILE *log = 0;
             ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/math.h:1003:1: note: previous definition is here
log(_A1 __lcpp_x) _NOEXCEPT {return ::log((double)__lcpp_x);}
^
../shared//./common/Logging.cpp:19:10: error: reference to overloaded function could not be resolved; did you mean to call it?
  while (log == 0 && idx < 10){
         ^~~
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/math.h:1003:1: note: possible target for call
log(_A1 __lcpp_x) _NOEXCEPT {return ::log((double)__lcpp_x);}
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/math.h:997:46: note: possible target for call
inline _LIBCPP_INLINE_VISIBILITY long double log(long double __lcpp_x) _NOEXCEPT {return ::logl(__lcpp_x);}
                                             ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/math.h:996:46: note: possible target for call
inline _LIBCPP_INLINE_VISIBILITY float       log(float __lcpp_x) _NOEXCEPT       {return ::logf(__lcpp_x);}
                                             ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:373:15: note: possible target for call
extern double log(double);
              ^

Full error output is kinda long; I'll attach logs.

Attachments (2)

colorerout.log (33.1 KB) - added by cooljeanius (Eric Gallager) 4 years ago.
terminal output from attempting to build colorer
colorermain.log (33.3 KB) - added by cooljeanius (Eric Gallager) 4 years ago.
main.log for colorer

Download all attachments as: .zip

Change History (4)

Changed 4 years ago by cooljeanius (Eric Gallager)

Attachment: colorerout.log added

terminal output from attempting to build colorer

Changed 4 years ago by cooljeanius (Eric Gallager)

Attachment: colorermain.log added

main.log for colorer

comment:1 Changed 4 years ago by mf2k (Frank Schima)

Cc: ryandesign removed
Owner: set to ryandesign
Status: newassigned

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

Resolution: fixed
Status: assignedclosed

In a4d2173287425013bd226e3a3aaa46c77895247f/macports-ports (master):

colorer: Rename log variable to avoid build failure

In newer toolchains, <math.h> seems to get included into this source
file automatically, causing a problem when its log function conflicts
with this file's log variable. Rename the variable to avoid that.

Closes: #62397

Note: See TracTickets for help on using tickets.