======================================
Known problems in GPRBUILD version 2.2
======================================

Copyright (C) 2014-2015, AdaCore

The following is a listing of known problems in releases 2.2.1 and 2.2.2.
Each entry contains a status line stating when the problem was fixed, and on
which release(s). In addition, any wavefront issued subsequent to the date
specified (in ISO format YYYY-MM-DD) also contains the fix. This can be used
to determine if a given release or wavefront has the fix identified in the
entry.

Note that older releases might or might not be affected by the problems listed
in this document.

Known problems fixed in 2.3.1 and above
---------------------------------------

KP-22-OB02-041 gprclean invalid switches not recognized

  Problem:    When gprbuild is invoked with a switch with several characters
              that starts with the character of a single character switch, such
              as -nobody or -reverse, the switch is not recognized as invalid
              and is taken as the single character switch.

  Status:     This was fixed in 2.3 on 2015-11-22

  Workaround: Avoid such switches.

KP-22-OA25-001 Relinking when nothing to bind

  Problem:    When there is Ada code, but there is nothing to bind
              (for example when the main is in C and has no Roots),
              gprbuild is always relinking, even though it is not necessary.

  Status:     This was fixed in 2.3 on 2015-10-29

  Workaround: Let gprbuild relink.

KP-22-OA16-060 Project modified by gprname may be unusable

  Problem:    When a project has very long literal strings as indexes of
              indexed attributes, the modified project generated by gprname
              may be unusable, because the literal string has been changed to
              a concatenated string expression.

  Status:     This was fixed in 2.3 on 2015-10-17

  Workaround: Avoid using very long indexes or edit the modified project.

KP-22-OA12-019 Wrong directory for relocated build tree

  Problem:    When the --relocate-build-tree option is used with a specified
              parameter, an incorrect path is used.

  Status:     This was fixed in 2.3 on 2015-10-12

  Workaround: Move to the build directory and call gprbuild without directory
              specified for --relocate-build-tree.

KP-22-O731-029 Crash when renaming a non existent package

  Problem:    In some circumstances, gprbuild crashes when renaming a package
              from an imported project where the package is not declared.

  Status:     This was fixed in 2.3 on 2015-07-31

  Workaround: Do not rename non existent packages.

KP-22-O709-013 gprinstall overwrite read only files

  Problem:    GPRinstall fails to install a project if some files are
              read only on the destination directory.

  Status:     This was fixed in 2.3 on 2015-07-13

  Workaround: Remove the read-only attribute manually.

KP-22-O702-010 gprinstall cut too long lines in generated project

  Problem:    GPRinstall do not properly write properly a second instance of
              the same project (build-name) containing lines whose length
              are above 1024 characters. This can happen with long set of
              arguments in Linker_Options attribute for example.

  Status:     This was fixed in 2.3 on 2015-07-13

  Workaround: Do not install multiple build-name for the same project or
              edit manually the generated project.

KP-22-O630-034 Source files deleted not detected by gprbuild

  Problem:    If sources in the closure of a main are deleted, but not the
              ALI sources or the object files, an invocation of gprbuild to
              build a main may still succeed.

  Status:     This was fixed in 2.3 on 2015-09-21

  Workaround: Delete the ALI file and the object file when deleting a source.

KP-22-O629-023 an attribute cannot be used as a case variable

  Problem:    The project manager was not detecting that an attribute was
              use illegally as a case variable in a case construction, causing
              crash in gprbuild.

  Status:     This was fixed in 2.3 on 2015-06-30

  Workaround: Do not use the attribute as the case variable. Instead use
              a variable that has the value of the attribute.

KP-22-O626-022 GPRslave may hang or crash.

  Problem:    A small race condition exists when multiple Wait_Completion
              tasks are used. This creates memory corruptions and may
              crash or freeze GPRslave.

  Status:     This was fixed in 2.3 on 2015-07-03

  Workaround: Launch gprslave with option --response-handler=1.

KP-22-O520-006 gprinstall issue with Exec_Dir in abstract projects

  Problem:    When an Exec_Dir attribute is defined in an abstract project
              gprinstall complains for a missing directory and stop processing
              the project tree.

  Status:     This was fixed in 2.3 on 2015-05-20

  Workaround: Create the missing directory manually.

KP-22-O511-004 libraries built several times with aggregate projects

  Problem:    When the same library project is in several project trees
              rooted at different aggregated projects from an aggregate
              project, the library may be built several times, which may
              leads to binding errors when using -jnn (simultaneous
              compilations/bindings/linkings).

  Status:     This was fixed in 2.3 on 2015-05-14

  Workaround: Avoid having the same library project in several project trees.

KP-22-O428-014 VxWorks6 with older compilers

  Problem:    When gprbuild is invoked in auto-configuration for a VxWorks
              target and a compiler with version 6.4.2 or older, building
              libraries and linking may fail as the archive builder cannot be
              found.

  Status:     This was fixed in 2.3 on 2015-05-21

  Workaround: Copy vxWorks ar (e.g. arppc) in GNAT's installation with
              the corresponding target prefix (e.g. powerpc-wrs-vxworks-ar).

KP-22-O403-014 static library not installed with --mode=dev

  Problem:    When --mode=dev is explicitly specified on the gprinstall
              command line for a library project nothing gets installed.

  Status:     This was fixed in 2.3 on 2015-04-03

  Workaround: Do not set explicitly the --mode=dev, let the default value.

KP-22-O312-038 VxWorks 653 2.4.x and 2.5

  Problem:    gprconfig is not able to detect ccppc and ccpentium on these
              versions, for target ppc-vx653 and x86-vx653. Note that this
              does not affect e500v2-vx653.

  Status:     This was fixed in 2.3 on 2015-04-20

  Workaround: Create an entry in the knowledge base for these two compilers.
              GCC-WRS653-PPC and GCC-WRS653-X86 from gprbuild 2.3 can be
              a good starting point for that.

KP-22-O302-010 gprbuild distributed won't exit after ctrl-c

  Problem:    When interrupting a distributed build with a ctrl-c signal,
              gprbuild may not exit and freeze.

  Status:     This was fixed in 2.3 on 2015-03-19

  Workaround: Do not interrupt the build or do not build in distributed mode.

KP-22-O129-033 gprclean does not always remove .lexch file

  Problem:    On Windows and Darwin, when the name of a shared library
              includes uppercase letter, gprclean does not delete the library
              exchange file (.lexch).

  Status:     This was fixed in 2.3 on 2015-01-29

  Workaround: Delete manually the .lexch file.

KP-22-O122-017 Reference to variable in missing predefined project

  Problem:    When a project imports a predefined project and refers to a
              variable in this imported project, gprbuild may fail before
              being able to update the project path and finding the predefined
              project during its second parsing.

  Status:     This was fixed in 2.3 on 2015-01-22

  Workaround: Put the directory of the predefined project in GPR_PROJECT_PATH.

KP-22-O113-051 Wrong configuration project file with gprconfig interactive

  Problem:    When gprconfig is invoked interactively and there are several
              runtimes with XML files for compilers on the path, all these
              XML files are taken into account and the resulting configuration
              project file may be incorrect or even illegal.

  Status:     This was fixed in 2.3 on 2015-01-14

  Workaround: Invoke gprconfig in batch mode.

KP-22-O107-015 Freeze of GPRbuild in distributed mode.

  Problem:    After hard-killing a GPRbuild distributed compilation it
              may happen that the GPRslave is not properly notified and
              does not release the client. This in turn make it impossible
              for the same client to connect to the slave.

  Status:     This was fixed in 2.3 on 2015-01-11

  Workaround: Do not hard-kill (ctrl-c) a GPRbuild distributed compilation.

KP-22-NC17-037 No warnings in project files if no errors

  Problem:    When gprbuild is invoked without -q and there are warnings
              during parsing of the project files, but no errors, the
              warnings are not displayed.

  Status:     This was fixed in 2.3 on 2014-12-17

  Workaround: None needed, as there is no error here, just a display problem.

KP-22-NC10-018 GPRbuild distributed recompile all sources

  Problem:    When a project is using a global configuration pragmas file
              (using -gnatec option or with Global_Configuration_Pragmas
              project's attribute) GPRbuild in distributed mode will always
              recompile all sources

  Status:     This was fixed in 2.3 on 2014-12-11

  Workaround: Do not use the distributed compilation mode for such projects.

KP-22-NA16-016 aggregate project, extended projects and sources not compiled

  Problem:    When an aggregate project aggregated two project trees and the
              same project is in both tree and is extended in at least one of
              the two trees, immediate sources of the project may not be
              properly compiled in both trees.

  Status:     This was fixed in 2.3 on 2014-11-25

  Workaround: Invoke gprbuild on the two different project trees.

KP-22-N612-010 Unable to link with very long object file paths

  Problem:    When object file paths are very long (more than 1_000 character
              long), linking an executable may fail.

  Status:     This was fixed in 2.3 on 2015-10-05

  Workaround: Reduce the length of object file paths, for example using shorter
              directory names.

Known problems fixed in 2.2.2 and above
---------------------------------------

KP-22-O331-001 cannot link encapsulated libraries on Windows

  Problem:    On Windows encapsulated libraries may fail to link
              due to unresolved symbols for OS dependent libraries.

  Status:     This was fixed in 2.3 on 2015-04-01
              This was fixed in 2.2.2 on 2015-05-27

  Workaround: Use a Library_Options attribute and specify manually the
              static GNAT run-time and the required libraries after.

KP-22-O116-019 Reference to missing predefined imported project

  Problem:    When a project imports a predefined project and refers to this
              imported project, gprbuild may fail before being able to
              update the project path and finding the predefined project
              during its second parsing.

  Status:     This was fixed in 2.3 on 2015-01-19
              This was fixed in 2.2.2 on 2015-05-27

  Workaround: Put the directory of the predefined project in GPR_PROJECT_PATH.

KP-22-NC05-016 References from incomplete withs

  Problem:    When a project file references an attribute, a variable or
              a package from an imported project that has not yet be found
              before the project search path has been updated, an error is
              reported and no processing is done by gprbuild.

  Status:     This was fixed in 2.3 on 2014-12-08
              This was fixed in 2.2.2 on 2015-05-28

  Workaround: Set the project search path so that the imported project will be
              found, before invoking gprbuild.
