Alex-Gamper / Ada-WinRT-Runtime

Ada Runtime targeting WinRT (ie compatable with Windows Store)
1 stars 0 forks source link

Problems compiling on Win 10 + Gnat CE 2021 #3

Open danwinslow opened 3 years ago

danwinslow commented 3 years ago

Hi, Having some trouble compiling. Apologies in advance if this is just a dumb mistake. I have WIndows 10, and 2 versions of GNAT CE installed:

The PATH variable has only c:\GNAT\2021 set. See end of text for a full PATH dump.

I had already installed the extension into Visual Studio, and when I got creation errors I noticed that you had mentioned that this and one other build was a requirement, so now I am trying to get the first of those loaded. image

I seem to have 3 versions of gcc libs under GNAT/2021: lib\gcc\x86_64-w64-mingw32\8.3.1\include-fixed\README lib\gcc\x86_64-w64-mingw32\9.3.1\include-fixed\README lib\gcc\x86_64-w64-mingw32\10.3.1\include-fixed\README

I've tried changing the gprbuild setting between all 3 with the same results.

I am running Build.cmd from the dir in which I put the installation files : C:\Users\Dan\Desktop\New Aetheria\Ada-WinRT-Runtime-master

On first run it cranked through some .c compilations, and then it (and subsequent runs) get this: C:\Users\Dan\Desktop\New Aetheria\Ada-WinRT-Runtime-master>gprbuild -p -P winrt_runtime.gpr Compile [Ada] unchdeal.ads [Ada] unchconv.ads [Ada] text_io.ads a-stream.ads:70:09: error: run-time library configuration error gprbuild: *** compilation phase failed

That line is just the root_stream_type definition: type Root_Stream_Type is abstract tagged limited null record;

C:\Users\Dan\Desktop\New Aetheria\Ada-WinRT-Runtime-master>link /lib /machine:x64 /nodefaultlib /out:.\lib\libother.a .\lib*.o link: extra operand '/nodefaultlib' Try 'link --help' for more information.

C:\Users\Dan\Desktop\New Aetheria\Ada-WinRT-Runtime-master>link /lib /machine:x64 /nodefaultlib /out:.\libgnarl\libgnarl.a .\libgnarl*.o link: extra operand '/nodefaultlib' Try 'link --help' for more information.

C:\Users\Dan\Desktop\New Aetheria\Ada-WinRT-Runtime-master>gprinstall -f -p -P winrt_runtime.gpr Install project Winrt_Runtime file C:\Users\Dan\Desktop\New Aetheria\Ada-WinRT-Runtime-master\build\text_io.ali does not exist, build may not be complete

CONTENTS of Winrt-Runtime.gpr:

` project Winrt_Runtime is

Base_Source_Dir       := Project'Project_Dir;
--Base_Installation_Dir := "lib\gcc\x86_64-w64-mingw32\8.3.1/";
Base_Installation_Dir := "lib\gcc\x86_64-pc-mingw32\8.3.1/";
Default_Prefix        := Base_Installation_Dir & "rts-Winrt_Runtime";
Install_Prefix        := external ("PREFIX", Default_Prefix);

for Languages use ("Ada", "C", "Asm");
for Library_Auto_Init use "False";
for Library_Name use "gnat";
for Library_Kind use "static";
for Library_Dir use "adalib";
for Object_Dir use "build";
for Source_Dirs use ("adainclude", "cpp");
for Target use "x86_64-w64-mingw32";

type Build_Type is ("Production", "Debug");

Build : Build_Type := external ("BUILD", "Debug");

package Builder is
    for Switches ("Ada") use ("--RTS=" & Project'Project_dir);
end Builder;

package Compiler is
    CFLAGS := ("");

    case Build is
        when "Production" =>
            CFLAGS := CFLAGS & ("-O2");
        when "Debug" =>
            CFLAGS := CFLAGS & ("-O0");
    end case;

    ALL_CFLAGS := ("-fexceptions") & CFLAGS;
    for Switches ("C") use ALL_CFLAGS;

    ALL_ADAFLAGS := ("-g", "-gnatpg", "-nostdinc") & CFLAGS;
    for Switches ("Ada") use ALL_ADAFLAGS;
end Compiler;

package Binder is
end Binder;

package Linker is
end Linker;

package Install is
    for Prefix use Install_Prefix;
    for Required_Artifacts ("") use ("runtime.xml", "ada_source_path", "ada_object_path");
    for Required_Artifacts ("adalib") use ("./lib/libother.a", "./libgnarl/libgnarl.a");
    for Sources_Subdir use "adainclude";
    for Lib_Subdir use "adalib";
    for Install_Project use "false";
end Install;

end Winrt_Runtime; `

(not sure why the code block above skipped beginning and end lines)

Relevant Path(s) from PATH variable:-------------------------------------------------------------------------------------------- C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\Extensions\Microsoft\IntelliCode\CLI; C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\TestWindow; C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer; C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\bin\Roslyn; C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Team Tools\Performance Tools; C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools\vs2019\; C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\; C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\FSharp\; C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x86; C:\Program Files (x86)\Windows Kits\10\bin\x86;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin; C:\Windows\Microsoft.NET\Framework\v4.0.30319; C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\; C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\; c:\cygwin64\bin; C:\GNAT\2021\bin; C:\Windows\system32; C:\Windows; C:\Windows\System32\Wbem; C:\Windows\System32\WindowsPowerShell\v1.0\; C:\Program Files\Common Files\Microsoft Shared\Windows Live; C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live; C:\Program Files (x86)\Windows Live\Shared; C:\Program Files\dotnet\; C:\Program Files\Microsoft VS Code\bin; C:\Program Files (x86)\dotnet\; C:\WINDOWS\system32; C:\WINDOWS;C:\WINDOWS\System32\Wbem; C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\; C:\cygwin64\bin; C:\Users\Dan\AppData\Local\Microsoft\WindowsApps; C:\Users\Dan\AppData\Local\Programs\Microsoft VS Code\bin; C:\Users\Dan.dotnet\tools; C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\VC\Linux\bin\ConnectionManagerExe;

danwinslow commented 3 years ago

OK, noticed I missed the 'you must have c++ desktop workload enabled' part. Installing that now, will post back later.

later I can create a project now. Will work on this build later.