Opened 7 years ago

Closed 6 years ago

#42800 closed defect (fixed)

ddd @3.3.12_2: error: friend declaration specifying a default argument must be a definition

Reported by: rbdavis (Roger Davis) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: Cc: daniel@…, leo.kuznetsov@…, p-bro
Port: ddd

Description (last modified by ryandesign (Ryan Schmidt))

Hi, I am running MacOS 10.9.2 Mavericks and just upgraded to XCode 5.1. I completely wiped out and re-installed MacPorts from scratch. All went well except for the rebuild of ddd, which failed with compile errors. All was OK up to this point:

/usr/bin/clang++ -DHAVE_CONFIG_H -I.  -I./..  -I/opt/local/include  -Os  -Wall -W -Wwrite-strings -pipe -arch x86_64 -trigraphs  -MT cwd.o -MD -MP -MF .deps/cwd.Tpo -c -o cwd.o cwd.C
In file included from cook.C:36:
In file included from ./cook.h:31:
./strclass.h:813:19: error: friend declaration specifying a default argument must be a definition
    friend string common_prefix(const string& x, const string& y,
./strclass.h:815:19: error: friend declaration specifying a default argument must be a definition
    friend string common_suffix(const string& x, const string& y
./strclass.h:866:16: error: friend declaration specifying a default argument must be a definition
    friend int readline(std::istream& s, string& x,

3 errors generated.
make[2]: * [cook.o] Error 1

Attachments (1)

main.log (58.9 KB) - added by daniel@… 7 years ago.
I'm having the same problem and have attached the log. Using Mavericks (10.9.2) and the latest MacPorts.

Download all attachments as: .zip

Change History (10)

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

Description: modified (diff)
Port: ddd added

Please attach the main.log file.

Also, please report the problem to the developers of ddd so they can fix it.

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

Summary: ddd-3.3.12_2.darwin_13.x86_64.tbz2 build errorddd @3.3.12_2: error: friend declaration specifying a default argument must be a definition

Changed 7 years ago by daniel@…

Attachment: main.log added

I'm having the same problem and have attached the log. Using Mavericks (10.9.2) and the latest MacPorts.

comment:3 Changed 7 years ago by ryandesign (Ryan Schmidt)

Cc: daniel@… leo.kuznetsov@… added

Has duplicate #43184.

This port has no maintainer in MacPorts. The best thing would be if someone could report the problem to the developer, so that they can fix the problem and release a new version. Then we can update the port to that new version.

comment:4 Changed 7 years ago by daniel@…

Yes. I have already written a bug against DDD as well. Sorry for not linking earlier.

This is definitely a problem with DDD. More accurately, GCC has a bug written against it for allowing friend declarations to both contain default arguments and not also be a definition. In other words, the compiler the DDD folks are using is less strict than it should be.

comment:5 in reply to:  4 Changed 7 years ago by rbdavis (Roger Davis)

I also reported this bug on the ddd mailing list and Shaunak Saha, the ddd maintainer, is aware of it. I'm not sure when he is planning to distribute a patched release. In the meantime users can fix the problem by removing the default argument specifiers from the friend function declarations and then specifying those default arguments explicitly wherever those functions are called. (There are only a handful of such calls, so it's not too onerous.)

On a related issue, Xcode no longer includes gdb, the underlying debugger required by ddd. The MacPorts gdb package installs gdb as ggdb, presumably to avoid conflicting with the no-longer-distributed Xcode gdb. This should also be fixed.

Thanks!

comment:6 Changed 6 years ago by p-bro

Cc: p.bro@… added

Cc Me!

comment:7 Changed 6 years ago by platipodium (Carsten Lemmen)

Still present on yosemite beta

error: friend declaration specifying a default argument must be a definition

comment:8 in reply to:  4 Changed 6 years ago by platipodium (Carsten Lemmen)

Replying to daniel@…:

Yes. I have already written a bug against DDD as well. Sorry for not linking earlier.

There is a patch provided upstream which fixes the issue for me on Yosemite. I run into another problem now "./Ddd.ad.h:4:3: error: source file is not valid UTF-8" which could be related to XCode6 and a possibly broken string.h

comment:9 Changed 6 years ago by raimue (Rainer Müller)

Resolution: fixed
Status: newclosed

Patch from upstream report committed in r128623.

ddd @3.3.12_2 now compiles fine for me on OS X 10.10 Yosemite, using Xcode 6.1 build 6A1052d.

Note: See TracTickets for help on using tickets.