Opened 10 years ago

Closed 10 years ago

#45305 closed defect (fixed)

bind9: opportunistically links with json-c but build fails when jsoncpp is active

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: danielluke (Daniel J. Luke)
Priority: Normal Milestone:
Component: ports Version: 2.3.99
Keywords: Cc: cooljeanius (Eric Gallager)
Port: bind9

Description

If the jsoncpp and json-c ports are both installed and active, building bind9 fails with:

:info:build In file included from app.c:40:
:info:build In file included from ../include/isc/mem.h:27:
:info:build In file included from ../include/isc/json.h:29:
:info:build In file included from /opt/local/include/json/json.h:9:
:info:build In file included from /opt/local/include/json/autolink.h:9:
:info:build /opt/local/include/json/config.h:73:1: error: unknown type name 'namespace'
:info:build namespace Json {
:info:build ^
:info:build /opt/local/include/json/config.h:73:15: error: expected ';' after top level declarator
:info:build namespace Json {
:info:build               ^
:info:build               ;

If jsoncpp is active but json-c is not, configure fails with:

checking for json library... yes
checking for library containing json_object_new_int64... no
configure: error: found libjson include but not library.

If json-c is active but jsoncpp is not active, bind9 builds successfully and links with the json-c library.

If neither json-c nor jsoncpp are active, bind9 builds successfully, but without json support.

I believe the problem relates to the fact that the json-c headers have recently changed location in order to not conflict with jsoncpp. bind9 may still be erroneously looking for json-c's headers in their old location.

Also, bind9 either needs to declare a dependency on json-c, or not use it even if it is already installed.

Change History (2)

comment:1 Changed 10 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:2 Changed 10 years ago by danielluke (Daniel J. Luke)

Resolution: fixed
Status: newclosed

Thanks - fixed in r126406. Looks like this was added in bind9.10. Eagerly awaiting the day when we always run in trace mode to prevent this sort of thing.

Note: See TracTickets for help on using tickets.