Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build problem on Windows with Alire #187

Open
frankltr opened this issue Mar 22, 2025 · 0 comments
Open

Build problem on Windows with Alire #187

frankltr opened this issue Mar 22, 2025 · 0 comments

Comments

@frankltr
Copy link

frankltr commented Mar 22, 2025

Hello,
this is the issue description:

OS:
Windows 10 Pro Version 10.0.19045 Build 19045

Software Version:
Gnatstudio 25.0w: gnatstudio-25.0w-20240506-x86_64-windows64-bin.exe
Alire 2.1.0: alr-2.1.0-installer-x86_64-windows.exe
MSYS2 environment: MINGW64_NT-10.0-19045 version 3.5.7-2644508f.x86_64 (runneradmin@fv-az833-983) (gcc version 13.3.0 (GCC) ) 2025-03-11 08:33 UTC

Steps to replicate problem (from scratch installation):
On the powershell alire prompt:

PS C:\projects\ada> alr init --bin first
PS C:\projects\ada>cd first
PS C:\projects\ada\first> alr with gwindows

....
Note: Deploying gprbuild=22.0.1...
################################################################################################################# 100.0%
Note: gprbuild=22.0.1 installed successfully.
Note: Deploying gnat_native=14.2.1...
################################################################################################################# 100.0%
Note: gnat_native=14.2.1 installed successfully.
Requested changes:

  • gwindows ^1.4.3 (add)

Changes to dependency solution:

  • gwindows 1.4.3 (new)

Do you want to proceed?
[Y] Yes [N] No (default is Yes) y
Note: Deploying gwindows=1.4.3...
################################################################################################################# 100.0%
Note: installed successfully.

After that still on the alire prompt:
PS C:\projects\ada\first>alr edit

On GNAT Studio try to build first.adb (default starting code):

procedure First is
begin
   null;
end First;

with first.gpr:

with "config/first_config.gpr";
project First is

   for Source_Dirs use ("src/", "config/");
   for Object_Dir use "obj/" & First_Config.Build_Profile;
   for Create_Missing_Dirs use "True";
   for Exec_Dir use "bin";
   for Main use ("first.adb");

   package Compiler is
      for Default_Switches ("Ada") use First_Config.Ada_Compiler_Switches;
   end Compiler;

   package Binder is
      for Switches ("Ada") use ("-Es"); --  Symbolic traceback
   end Binder;

   package Install is
      for Artifacts (".") use ("share");
   end Install;

end First;

and with config/first_config.gpr:

--  Configuration for first generated by Alire
with "gnatcom.gpr";
with "gnatcom_tools.gpr";
with "gwindows.gpr";
with "gwindows_contrib.gpr";
with "gwindows_samples.gpr";
abstract project First_Config is
   Crate_Version := "0.1.0-dev";
   Crate_Name := "first";

   Alire_Host_OS := "windows";

   Alire_Host_Arch := "x86_64";

   Alire_Host_Distro := "msys2";
   Ada_Compiler_Switches := External_As_List ("ADAFLAGS", " ");
   Ada_Compiler_Switches := Ada_Compiler_Switches &
          (
            "-Og" -- Optimize for debug
           ,"-ffunction-sections" -- Separate ELF section for each function
           ,"-fdata-sections" -- Separate ELF section for each variable
           ,"-g" -- Generate debug info
           ,"-gnatwa" -- Enable all warnings
           ,"-gnatw.X" -- Disable warnings for No_Exception_Propagation
           ,"-gnatVa" -- All validity checks
           ,"-gnaty3" -- Specify indentation level of 3
           ,"-gnatya" -- Check attribute casing
           ,"-gnatyA" -- Use of array index numbers in array attributes
           ,"-gnatyB" -- Check Boolean operators
           ,"-gnatyb" -- Blanks not allowed at statement end
           ,"-gnatyc" -- Check comments
           ,"-gnaty-d" -- Disable check no DOS line terminators present
           ,"-gnatye" -- Check end/exit labels
           ,"-gnatyf" -- No form feeds or vertical tabs
           ,"-gnatyh" -- No horizontal tabs
           ,"-gnatyi" -- Check if-then layout
           ,"-gnatyI" -- check mode IN keywords
           ,"-gnatyk" -- Check keyword casing
           ,"-gnatyl" -- Check layout
           ,"-gnatym" -- Check maximum line length
           ,"-gnatyn" -- Check casing of entities in Standard
           ,"-gnatyO" -- Check that overriding subprograms are explicitly marked as such
           ,"-gnatyp" -- Check pragma casing
           ,"-gnatyr" -- Check identifier references casing
           ,"-gnatyS" -- Check no statements after THEN/ELSE
           ,"-gnatyt" -- Check token spacing
           ,"-gnatyu" -- Check unnecessary blank lines
           ,"-gnatyx" -- Check extra parentheses
           ,"-gnatW8" -- UTF-8 encoding for wide characters
          );

   type Build_Profile_Kind is ("release", "validation", "development");
   Build_Profile : Build_Profile_Kind := "development";

end First_Config;

ERROR: GWINDOWS_ALIRE_PREFIX is already defined as 'C:\Users\Fr\AppData\Local\alire\cache\builds\gwindows_1.4.3_a13ac6e3\c188d65c0579c77fb28997db480340aae525f29611384877a4de21ce0c8259db' but new value is 'C:\Users\Fr\AppData\Local\alire\cache\builds\gwindows_1.4.3_a13ac6e3\b71ae754e88b0efbb5001fe412a4279262979181a20a7dd7cfbb4747b8a7e265'
**

Image

**

Note:
The problem is not only with Gwindows package, but also with gtkada and others i've tried.
Building on powershell command prompt in alire work with: alr build
Tryng to install GNAT studio as administrator for all user(administrator) and for single user to evaluate possibile path environment conflicts, but no change.
With only toolchains installed GNAT Studio work without problem.

Thanks and regards,
Frank

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant