0

I've got the source from Adacore, so it should work - I've left an 'issue' on Adacore as well, but it might take some time to get a resolution there. I suspect that I might be doing something wrong, any suggestions?

Here's the problem:

$ gnat make gnatcoll-json.adb

    gcc -c gnatcoll-json.adb

    gnatcoll-json.adb:33:23: missing body for "Prepend" declared at gnatcoll-json.ads:64

    gnatcoll-json.adb:33:23: missing body for "Create" declared at gnatcoll-json.ads:99

    gnatcoll-json.adb:33:23: missing body for "Set_Field" declared at gnatcoll-json.ads:144

    gnatcoll-json.adb:33:23: missing body for "Get" declared at gnatcoll-json.ads:173

    gnatcoll-json.adb:33:23: missing body for "Get" declared at gnatcoll-json.ads:206

    gnatcoll-json.adb:454:63: prefix of dereference must be an access type

    gnatcoll-json.adb:641:33: invalid operand types for operator "/="    gnatcoll-json.adb:641:33: left operand has private type "UTF8_Unbounded_String" defined at gnatcoll-json.ads:47

    gnatcoll-json.adb:641:33: right operand has an access type

    gnatcoll-json.adb:642:19: no candidate interpretations match the actuals:

    gnatcoll-json.adb:642:28: expected type "Counter" defined at gnatcoll-json.ads:239

    gnatcoll-json.adb:642:28: found private type "Ada.Strings.Unbounded.Unbounded_String"

    gnatcoll-json.adb:642:28:   ==> in call to "Free" at gnatcoll-json.ads:289

    gnatcoll-json.adb:642:28:   ==> in call to "Free" at gnatcoll-json.ads:287

    gnatcoll-json.adb:642:28:   ==> in call to "Free" at gnatcoll-json.ads:285

    gnatcoll-json.adb:642:28:   ==> in call to "Free" at a-strunb.ads:88

    gnatcoll-json.adb:714:24: expected private type "Ada.Strings.Unbounded.Unbounded_String"

    gnatcoll-json.adb:714:24: found type access to "UTF8_String" defined at line 714

    gnatcoll-json.adb:841:28: prefix of dereference must be an access type

    gnatmake: "gnatcoll-json.adb" compilation error

I can see that those missing bodies in the gnatcoll.ads file seem to be the first problem. It's certainly true that, for example, the body of Prepend isn't in that file - but I thought that the body should be in the gnatcoll.adb file, not the gnatcoll.ads file anyway.

Dave Newman
  • 1,018
  • 10
  • 15
Peter Brooks
  • 349
  • 3
  • 13
  • your description references gnatcoll.ad[sb] but your compilation is of gnatcoll-json.ad[sb] can you clarify if the missing bodies are in gnatcoll-json.adb ? also , are the gnatcoll.ad[sb] files also in the current directory ? – NWS Jun 05 '13 at 11:02

1 Answers1

0

GNATColl is intended to be built using a fairly standard configure/make/make install process. You can find out more by looking at docs/building.rst in the distribution; I don't have the Sphinx program that is used to build the installable version, but it's pretty readable as-is. There's also docs/json.rst to tell you how to use the JSON support once GNATColl is installed.

In the root directory of the distribution,

$ ./configure --prefix=/your/preferred/install/location # default is /usr/local
$ make
$ sudo make install # if /your/preferred/install/location isn't user-writable
Simon Wright
  • 25,108
  • 2
  • 35
  • 62