AdaCore / gprbuild

GPRbuild is an advanced build system designed to help automate the construction of multi-language systems.
Other
65 stars 21 forks source link

Unable to locate binder when building encapsulated shared library on Linux #114

Closed andrewathalye closed 2 years ago

andrewathalye commented 2 years ago

Hello, I'm trying to bulid an encapsulated shared library on Linux (so that there are no dependencies on GNAT), however gprlib throws "unable to locate binder" with no furtehr details, when trying to generate the lexch file. A slightly redacted gpr file is quoted below: ` library project Name is for Library_Kind use "dynamic";

    type OS_Type is ("linux", "Windows_NT");
    OS : OS_Type := external ("os", "linux");
    case OS is
            when "linux" =>
                    for Source_Dirs use ("../ext_src/name/src/");
                    for Object_Dir use "../ext_src/name/obj/";
                    for Library_Name use "name";
                    for Library_Dir use "../ext_lib";
                    for Library_Interface use ("function_name");
                    for Library_Standalone use "encapsulated";
            when "Windows_NT" =>
                    for Languages use ("C");
                    for Library_Name use "name";
                    for Library_Dir use "..";
                    for Externally_Built use "true";
            when others => null;
    end case;
    end Name;`

Windows in this case doesn't need the encapsulated library, since it uses a different, ABI-compatible, implementation.

andrewathalye commented 2 years ago

I'm going to tentatively close this issue, since upon further inspection it looks like my distro (Gentoo) had patches applied to cause GPRBuild to search for a specific version of gnatbind, rather than the upstream default. Sorry for the invalid issue. The solution in this case is for us to revert some of these patches back and/or update them for the latest GCC versions, especially since with GNAT-GPL no longer being separate from GNAT-FSF it shouldn't be necessary to maintain additional GNAT version-specific support locally.

t-14 commented 2 years ago

Ok, thanks for the heads up.