1

I'm porting a dynamic Ada library from Windows to CentOS 7 with the following options:

for Library_Kind use "dynamic";
for Library_Auto_Init use "False";
for Library_Interface use ("my_lib_interface");   

On Windows, gprbuild starts by compiling my_lib_interface and then proceeds to compile all the withed units. This means that if a file is present in Source_Dirs but it's not used by anyone, it will be ignored. On CentOS, gprbuild compiles every single file, apparently going in descending alphabetical order(?) and causing a compilation error, because there are files that should not be compiled (this is a big project and I do not have full control on the directories).

Why does gprbuild behave differently? Is there a way to obtain the Windows behaviour without excluding the unused source files from the project?

chameleon
  • 41
  • 5
  • 1
    Is there a chance that you use different versions of `gprbuild` on Windows and Linux? It could be a root of the problem. – thindil Dec 17 '21 at 08:31
  • 1
    On both Linux and Windows we use GPS 2017 as IDE, so the gprbuild version should be the same, but on centos we set gnat 2014 in the compiler path, because it is the latest 32-bit compiler distributed for Linux, maybe that's the problem. – chameleon Dec 17 '21 at 10:01
  • 2
    Hmm, maybe, if I remember correctly, `gprbuild` is related to the compiler not `GPS` itself. On Linux, then it may use the older version of `gprbuild`. – thindil Dec 18 '21 at 11:05
  • 1
    You're right, Linux is using the older version of gprbuild too, so now I'm trying to use the 2017 64-bit version with 32-bit switches and see if it works as expected, thank you. – chameleon Dec 23 '21 at 09:58

0 Answers0