Opened 11 years ago
Closed 11 years ago
#42304 closed defect (duplicate)
srecord @1.36_0 build failure
Reported by: | hardwhack | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.2.1 |
Keywords: | haspatch | Cc: | |
Port: | srecord |
Description
Am not too fluent in C++ but when I tried to install record on Mavericks, received the following error message:
lib/interval.cc:793:19: error: call to 'to_string' is ambiguous result += to_string(data[j]); ^~~~~~~~~
I tried to "disambiguate" the call by typing data[] to (int) and it seems to fix the problem. The diff of the fix is:
[/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/srecord/work/srecord-1.36/lib]$ diff interval_orig.cc interval.cc 793c793 < result += to_string(data[j]); --- > result += to_string( (int) data[j]); 797c797 < result += to_string(data[j] + 1); --- > result += to_string( (int) data[j] + 1); 802c802 < result += to_string(data[j + 1] - 1); --- > result += to_string( (int) data[j + 1] - 1);
This appears to fix the compile problem and the resulting binaries work as expected.
Change History (2)
comment:1 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | haspatch added; have fix removed |
---|---|
Port: | srecord added |
comment:2 Changed 11 years ago by mf2k (Frank Schima)
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Duplicate of #43561.
Note: See
TracTickets for help on using
tickets.
Attaching a Portfile patch and your patch as a unified diff would be helpful.