• Trouble building with gnatcoll

    From John Perry@21:1/5 to All on Fri Apr 29 18:43:29 2022
    Hello

    I tried to build something with GnatColl from GPS Community 2021 on Fedora 35. The linker failed, saying

    ld: /home/cantanima/common/Ada/Quoter/obj/gnatcoll-refcount.o: in function `gnatcoll__refcount__sync_bool_compare_and_swap':
    gnatcoll-refcount.adb:(.text+0x622): undefined reference to `gnatcoll_sync_bool_compare_and_swap_access'
    collect2: error: ld returned 1 exit status

    I can fix this from the command line by copying the failed command and adding ~/opt/GNAT/2021/include/gnatcoll/gnatcoll_support.c to the list of things to compile, as that's the included file with the desired function. That's awfully inconvenient, though.

    I guess I have something configured slightly wrong. Might anyone here have an idea?

    (Also posting to StackOverflow.)

    john perry

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Perry@21:1/5 to All on Fri Apr 29 21:30:48 2022
    I found the answer, and it's a bit embarrassing, but looking in the gnatcoll examples would have done it: add

    with "gnatcoll";

    to the beginning of the gpr file.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)