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

Problems compiling 0.9.0: "array aggregate using () is an obsolescent syntax" #155

Open
ghost opened this issue Aug 10, 2023 · 2 comments
Open

Comments

@ghost
Copy link

ghost commented Aug 10, 2023

Hello,

I am trying to compile 0.9.0 on FreeBSD-14, however, the build will fail at some random point without -j0, or reliably on gl-algebra.ads with -j0.

gprbuild --version returns:

GPRBUILD Pro 18.0w (19940713) (x86_64-portbld-freebsd14.0)

gnat --version returns:

GNAT 12.2.0 20220819 (release) -=> GNAT [FreeBSD64]

After extracting the tarball, cd to the working directory, and:

gprbuild -j0 -p -gnat2012 -XMode=release -XWindows_System=x11 -P ./opengl/opengl.gpr

Results in the following log:

(cd /tmp/openglada/net/fafnir/git/freebsd/ports/main/graphics/openglada/work/OpenGLAda-0.9.0/ &&  /usr/bin/env gprbuild -j0 -p -XMode=release -XWindows_System=x11 -P ./opengl/opengl.gpr )
Setup
   [mkdir]        object directory for project OpenGL
   [mkdir]        library directory for project OpenGL
Compile
   [ada]          gl-api-subprogram_reference.adb
   [ada]          gl-cgl.ads
   [ada]          gl-api-mac_os_x.adb
   [ada]          gl-api-shorts.ads
   [ada]          gl-api.ads
   [ada]          gl-api-singles.ads
   [ada]          gl-load_function_pointers.adb
   [ada]          gl-api-doubles.ads
   [ada]          gl-api-ints.ads
   [ada]          gl-api-uints.ads
   [ada]          gl-objects-framebuffers.adb
   [ada]          gl-fixed-textures.adb
   [ada]          gl-vectors.adb
   [ada]          gl-debug.adb
   [ada]          gl-uniforms.adb
   [ada]          gl-immediate.adb
   [ada]          gl-objects-textures-targets.adb
   [ada]          gl-objects.adb
   [ada]          gl-fixed.adb
   [ada]          gl-objects-queries.adb
   [ada]          gl-enums.ads
   [ada]          gl-objects-programs.adb
   [ada]          gl-low_level-enums.ads
   [ada]          gl-algebra.adb
   [ada]          gl-errors.adb
   [ada]          gl-framebuffer.adb
   [ada]          gl-enums-getter.adb
   [ada]          gl-raster.adb
   [ada]          gl-objects-buffers.adb
   [ada]          gl.adb
   [ada]          gl-files.adb
   [ada]          gl-objects-textures-with_3d_loader.adb
   [ada]          gl-pixels.adb
gl-algebra.ads:109:62: warning: array aggregate using () is an obsolescent syntax, use [] instead [-gnatwj]
gl-algebra.ads:111:62: warning: array aggregate using () is an obsolescent syntax, use [] instead [-gnatwj]
gl-algebra.ads:113:62: warning: array aggregate using () is an obsolescent syntax, use [] instead [-gnatwj]

   compilation of gl-algebra.adb failed

gprbuild: *** compilation phase failed
*** Error code 4

Stop.
make: stopped in /net/fafnir/git/freebsd/ports/main/graphics/openglada

Thanks.

@flyx
Copy link
Owner

flyx commented Aug 11, 2023

[] is an Ada 202x feature and I'm surprised that GNAT complains here with -gnat2012 when the new standard hasn't even been formally finalized yet. See here for a brief description of the new syntax.

You can probably fix this by replacing (others => <>) with [others => <>] in the referenced file. This project is unmaintained so I won't do anything about it, more so since not everyone is at the newest compiler version and fixing this for you will probably break it for someone else. I don't know what the GNAT folks were thinking.

@ghost
Copy link
Author

ghost commented Aug 11, 2023

Thanks, I will have see about patching locally.

The introduction of a new operator into Ada makes no sense, for a system that is meant to facilitate a consistent read, it creates additional mental load, and is probably the result of particular fads that influence the GNAT folks. As an Ada newbie, it is fucking stupid.

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