Closed wnklmnn closed 3 years ago
Building gprbuild development source currently expects a newer version of gcc that includes https://github.com/gcc-mirror/gcc/commit/c70220382300ae326ad63fe54c5a32da202d1f13 in libgnat.
Possible fixes for you that don't require Ada knowledge include:
It depends what you're trying to accomplish.
If you need bootstrap only, you can use GNAT Community 2020 to do it.
Thanks for the fast responses. I'll try to add some context. I was trying to bootstrap gprbuild with nixos (with gcc .9.30) and stumbled upon my issue. So I tried the same step on my debian (with gc 8.3.0) machine and faced the same issue.
On debain i was able to bootstrap gprbuild after using a version of gprbuild without the mentioned commit. On nixos I additionally had to change to shebang in the bootstrap.sh to point to the correct location of bash. Unfortunately I still am unable to bootstrap fully.
For some reason it tries to use gprinstall located under exe/production
on bootstrap.sh I specified the prefix to be out
.
install flags: SHELL=/nix/store/a3fc4zqaiak11jks9zd579mz5v0li8bg-bash-4.4-p23/bin/bash install
exe/production/gprinstall -p -f --target=x86_64-unknown-linux-gnu --prefix=/nix/store/zkaq7gnyx24v5j229z8bzlgkj33a2gag-gnat-9.3.0/bin/.. -XBUILD=production --mode=usage --install-name=gprbuild \
-XINSTALL_MODE=nointernal gprbuild.gpr
/nix/store/a3fc4zqaiak11jks9zd579mz5v0li8bg-bash-4.4-p23/bin/bash: exe/production/gprinstall: No such file or directory
make: *** [Makefile:124: install] Error 127
note: keeping build directory '/tmp/nix-build-gprbuild.drv-3'
builder for '/nix/store/k660p0sxspydbl1fs450660ya68nvhid-gprbuild.drv' failed with exit code 2
cannot build derivation '/nix/store/3n2nq1j63kxfv6mxb6y5p024mn7xmwvm-gtkada.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/0i6v09sf1rc3ibmb63jhry8p5n1dxicf-gps.drv': 1 dependencies couldn't be built
error: build of '/nix/store/0i6v09sf1rc3ibmb63jhry8p5n1dxicf-gps.drv' failed
If I change this line in the Makefile INSTALLER=exe/$(BUILD)/$(LIB_INSTALLER)
to this INSTALLER=out/bin/$(LIB_INSTALLER)
I now run face the issue that gprbuild cant import the file xmlada.gpr.
installing
install flags: SHELL=/nix/store/a3fc4zqaiak11jks9zd579mz5v0li8bg-bash-4.4-p23/bin/bash install
out/bin/gprinstall -p -f --target=x86_64-unknown-linux-gnu --prefix=/nix/store/zkaq7gnyx24v5j229z8bzlgkj33a2gag-gnat-9.3.0/bin/.. -XBUILD=production --mode=usage --install-name=gprbuild \
-XINSTALL_MODE=nointernal gprbuild.gpr
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 "/build/gprbuild-11fbc51/gpr/gpr.gpr"
gpr.gpr:19:06: imported by "/build/gprbuild-11fbc51/gprbuild.gpr"
gprinstall: "gprbuild.gpr" processing failed
make: *** [Makefile:124: install] Error 4
builder for '/nix/store/biskh7zc3yqwp1rng6plg5cv971xd8jz-gprbuild.drv' failed with exit code 2
cannot build derivation '/nix/store/wsw5l27a5nxyr203072pb659d4mzm0zl-gtkada.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/i6p67a63pbl6ivgpbilqhpzcx0as29av-gps.drv': 1 dependencies couldn't be built
error: build of '/nix/store/i6p67a63pbl6ivgpbilqhpzcx0as29av-gps.drv' failed
At this point I run into a wall again. I suspect that there is something wrong with my nix-derivation. it would be greate if anyone has an idea what would resolve this.
But since this is rather Nix-specific I guess this gh-issue is not the right place :)
Edit: If anyone has access to nix these are my first step in creating the derivation.
Please see some pointers and commentary in Issue https://github.com/AdaCore/gprbuild/issues/83 from the last time NixOS people showed up that might be of some help.
Hi, I just tried to bootstrap gprbuild on my debian system and ran into the following issue:
This seems to be the commit that introduced the issue for me. https://github.com/AdaCore/gprbuild/commit/3740defff8806286c1391159497a3992ddf701ed
If I checkout the version befor this commt i was able to bootstrap succesfully.
I would fix this but I dont not know any ada :(