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

Problem of circular dependencies with xmlada #124

Closed thierry-FreeBSD closed 1 year ago

thierry-FreeBSD commented 1 year ago

Hello, gprbuild used to be in the FreeBSD ports tree; and I’m trying to resurrect it, but I’m facing a problem of circular dependencies:

During the build of gprbuild, it looks for xmlada and fails with this error:

gmake[1]: Entering directory '/usr/ports/devel/gprbuild/work/gprbuild-23.0.0'
gprbuild -p -m   -j4 -XBUILD=production  gprbuild.gpr -XLIBRARY_TYPE=static -XXMLADA_BUILD=static
gprbuild.gpr:19:06: imported project file "xmlada.gpr" not found
gpr.gpr:19:06: imported project file "xmlada" not found
gpr.gpr:19:06: imported by "/usr/ports/devel/gprbuild/work/gprbuild-23.0.0/gpr/gpr.gpr"
gpr.gpr:19:06: imported by "/usr/ports/devel/gprbuild/work/gprbuild-23.0.0/gprbuild.gpr"
gprbuild: "gprbuild.gpr" processing failed
gmake[1]: *** [Makefile:95: all] Error 5

What am I missing?

Fabien-Chouteau commented 1 year ago

You can boostrap gprbuild with the ./bootstrap.sh script.

$ ./bootstrap.sh --with-xmlada=<PATH TO XMLADA SOURCES> --with-kb=<PATH TO GPRCONFIG_KB> --build
$ ./bootstrap.sh --with-xmlada=<PATH TO XMLADA SOURCES> --with-kb=<PATH TO GPRCONFIG_KB> --prefix=<PATH TO INSTALL> --install

GPRconfig_KB sources are here: https://github.com/AdaCore/gprconfig_kb

thierry-FreeBSD commented 1 year ago

Yes, I did that! Actually I’m +/- following the steps described at https://blog.vacs.fr/vacs/blogs/post.html?post=2022/08/05/Ada-on-FreeBSD-13.1 , § "Build gprbuild", I’m at step "build again", and it fails at gmake all. Maybe this step is not mandatory and the program gprbuild build during bootstrap is sufficient?

Fabien-Chouteau commented 1 year ago

Then it has to do with gprbuild not being able to find xmlada.gpr, that will depend on where you installed it.

One solution is to add the path to xmlada.gpr in the environment variable GPR_PROJECT_PATH.

thierry-FreeBSD commented 1 year ago

The previous steps have been run successfully with --prefix=./bootstrap and several programs have been built:

$ ls -l bootstrap/bin
-rwxr-xr-x  1 thierry  wheel  15074608 15 déc.  16:32 gprbuild
-rwxr-xr-x  1 thierry  wheel  13211832 15 déc.  16:32 gprclean
-rwxr-xr-x  1 thierry  wheel  11306336 15 déc.  16:32 gprconfig
-rwxr-xr-x  1 thierry  wheel  12391704 15 déc.  16:32 gprinstall
-rwxr-xr-x  1 thierry  wheel  11468920 15 déc.  16:32 gprls
-rwxr-xr-x  1 thierry  wheel  12316624 15 déc.  16:32 gprname

but find . -name "xmlada*" does not return anything.

Fabien-Chouteau commented 1 year ago

Actually I’m +/- following the steps described at https://blog.vacs.fr/vacs/blogs/post.html?post=2022/08/05/Ada-on-FreeBSD-13.1 ,

You should probably comment over there because it seems like the procedure is either missing steps or details. You have to build and install xmlada with the bootstrap gprbuild before building the full gprbuild.