AdaCore / gprbuild

GPRbuild is an advanced build system designed to help automate the construction of multi-language systems.
Other
65 stars 21 forks source link

Installing on brand new linux installation fails #133

Closed MarioBlunk closed 1 year ago

MarioBlunk commented 1 year ago

First of all, thanks for all your valuable work. I tried the installation procedure as described in README.md an a new Linux system, that has no gprbuild installed. In section "Configuring" the command: $ make prefix=xxx SOURCE_DIR=/path/to/gprbuild/sources setup assumes there is already a gprbuild executable installed (like in /usr/local). The executable that resides in the build directory is not found. The user has to set the $PATH variable accordingly. I got this fixed for the moment. I run into further issues in section "Building and Installing" with the command: make all . The file "xmlada.gpr" can not be located in the build directory...

So I really recommend to test your installation instructions on a brand new system where gprbuild has not been installed before.

Thanks for your help.

landgraf commented 1 year ago

Have you checked "bootstrapping" section of the README.md file ?

t-14 commented 1 year ago

That's right, this is the section to start with on a pristine system. Alternatively, use alire to install gprbuild as a starting point...

MarioBlunk commented 1 year ago

It is not very polite to close an issue without giving the author time to reply. Of course did I start with the "bootstrapping" section of the README.md. Did you test your procedure on a pristine system ?

Fabien-Chouteau commented 1 year ago

Hi @MarioBlunk

$ make prefix=xxx SOURCE_DIR=/path/to/gprbuild/sources setup assumes there is already a gprbuild executable installed (like in /usr/local).

No it assumes the bootstrapped gprbuild and xmlada. See this line of the bootstrap section:

With this bootstrapped gprbuild, you can build XML/Ada and gprbuild as documented below.

The full procedure is:

# Get the sources
git clone https://github.com/AdaCore/gprconfig_kb
git clone https://github.com/AdaCore/xmlada
git clone https://github.com/AdaCore/gprbuild

# Bootstrap gprbuild
cd gprbuild
./bootstrap.sh --with-xmlada=../xmlada --with-kb=../gprconfig_kb --prefix=./bootstrap
export PATH=$PATH:$PWD/bootstrap/bin/ 

# Build xmlada
cd ../xmlada
./configure --prefix=$PWD/install
make all
make install
export GPR_PROJECT_PATH=$PWD/install/share/gpr/

# Build gprbuild
cd ../gprbuild
make all
make install

It is not very polite to close an issue without giving the author time to reply.

We did not mean to be impolite, this is part of our ticket handling procedure. Once we consider the answer to be complete we close the ticket. You still have the opportunity to ask further questions, just like you did, if need be.

MarioBlunk commented 1 year ago

Fabien, thanks for this valuable information. Please put all this steps into the readme.md file so that other people can use grpbuild without getting stuck. The readme file in the current state is of little use. I've put together an installation script (tested on OpenSuse Tumbleweed). See https://github.com/Blunk-electronic/ada_training/blob/master/install-gprbuild.sh It is a start for the moment to make things easier for less skilled people. Best, Mario