Menu

#7 Confusion about install locations

None
closed
None
1
2019-11-20
2017-01-17
No

I'm a bit confused about the installation directories.
setup.tcl offers an INSTALLROOT defaulting to /opt/tash but that does not seem to be used upon make install. Instead, the installation seems to go to the setup.tcl defined prefix, which is determined using the location of gnatls. This means that if my gnatls is /usr/bin/gnatls, prefix will be /usr, and tash.gpr gets installed to /usr/lib/gnat.
However, my gnatls -v gives the following:

GNATLS 4.6
Copyright (C) 1997-2010, Free Software Foundation, Inc.
[...]
Project Search Path:
   <Current_Directory>
   /usr/share/ada/adainclude/

Hmm...

Discussion

  • Simon Wright

    Simon Wright - 2017-01-29

    I think it might be about time to get rid of setup.tcl (I can't use the GUI version on my 13-inch Macbook Pro, because the font size doesn't appear to be (easily?) changeable, so the window extends below the bottom of the screen, and I can't click on the Save button :-)

    That said, your problem arises from the file system layout adopted by Debian, which doesn't match up to the one used by GNAT on other platforms (or GNAT GPL). More power to Ludo and friends, a shame that AdaCore couldn't follow their lead (I think they came first). See makefile:49.

    Does your GNAT include gprinstall? If so, it could be worth investing time to train it to install on Debian systems.

    If not, could just work from the gnatls output.

    Is your system rather old? haven't we gone past GCC 4.6?

     
  • Oliver Kellogg

    Oliver Kellogg - 2017-01-31

    Is your system rather old? haven't we gone past GCC 4.6?

    Good point. It seems that newer GNATs do have prefix/lib/gnat as one of their project search paths.

    I tried gnatls -v with GPL-2014 (i686) installed in /opt/gnat/gpl,

    Project Search Path:
       <Current_Directory>
       /opt/gnat/gpl/i686-pc-linux-gnu/lib/gnat
       /opt/gnat/gpl/i686-pc-linux-gnu/share/gpr
       /opt/gnat/gpl/share/gpr
       /opt/gnat/gpl/lib/gnat
    

    and with the system FSF-GNAT that comes with OpenSuSE Tumbleweed (x86_64),

    Project Search Path:
       <Current_Directory>
       /usr/x86_64-suse-linux/lib/gnat
       /usr/x86_64-suse-linux/share/gpr
       /usr/share/gpr
       /usr/lib/gnat
    

    Under Linux, the command

    gnatls -v | tail -2 | head -1
    

    could retrieve the best matching project path, only that the gcc-4.6 based compiler gives the deviating location /usr/share/ada/adainclude/.
    I have no idea how this could be handled in Windows.

     
  • Simon Wright

    Simon Wright - 2017-02-18

    I just updated the repo; main changes in [77e800].

    setup.tcl is shortened (I've left out the items that can't be changed), and now detects whether the compiler is a Debian standard (i.e. /etc/debian_version exists and the prefix is /usr), and installs GPRs where the Debian standard compiler expects, i.e. $prefix/share/ada/adainclude/. In all other cases, it'll be $prefix/lib/gnat/.

    My only Linux setup is Debian jessie (in a VM), so I may well have missed something. If it's OK, we'll go for a release.

    By the way, make install now uses gprinstall.

     

    Related

    Commit: [77e800]

  • Simon Wright

    Simon Wright - 2017-02-18
    • status: open --> pending
    • assigned_to: Simon Wright
     
  • Oliver Kellogg

    Oliver Kellogg - 2017-02-19

    I just updated the repo; main changes in [77e800].

    Thanks for that.

    My only Linux setup is Debian jessie (in a VM), so I may well have missed something.
    If it's OK, we'll go for a release.

    Tried it on my OpenSuSE Tumbleweed and make install went well (OT: had to patch up a gprbuild bug which I happened to run into.)

     

    Related

    Commit: [77e800]

  • Simon Wright

    Simon Wright - 2019-11-20
    • status: pending --> closed
     
  • Simon Wright

    Simon Wright - 2019-11-20

    Fixed in release 20191120.

     

Anonymous
Anonymous

Add attachments
Cancel