Package Details: gprbuild 2018-4

Git Clone URL: https://aur.archlinux.org/gprbuild.git (read-only)
Package Base: gprbuild
Description: Builder for multi-language systems
Upstream URL: https://github.com/AdaCore/gprbuild/
Licenses: GPL3
Conflicts: gprbuild-bootstrap=2018, gprbuild-bootstrap-git, gprbuild-git
Provides: gprbuild-bootstrap=2018
Submitter: None
Maintainer: charlie5
Last Packager: charlie5
Votes: 20
Popularity: 1.051141
First Submitted: 2010-02-03 13:25
Last Updated: 2018-09-12 00:39

Dependencies (2)

Required by (34)

Sources (3)

Latest Comments

1 2 3 Next › Last »

charlie5 commented on 2018-09-09 08:56

@gbabin Thanks for the tips, I will follow them up.

Having pkgname in the conflicts array seemed weird to me also. I was using some of the git versions as templates and that was done there.

And thank you for your 'thank you' :). I am (obviously) still a novice in PKGBUILD-foo and some of the the Ada package builds are a bit tricky :).

gbabin commented on 2018-09-09 08:39

@charlie5 you are correct

I had to build xmlada then libgpr then gprbuild.

You should change the dependency to depends=('libgpr>=2018'), then that would be automatic. The issue is the same for all gnatcoll/gpr/gps 2018 packages.

Also, do not add pkgname to the provides array, as it is done automatically.

Finally, it seems very weird to have the pkgname in the conflicts array.

Thank you for all the Ada-related packages !

charlie5 commented on 2018-09-09 08:05

hi gbabin ... can you try rebuilding and reinstalling xmlada.

gbabin commented on 2018-09-07 19:36

I have the following error when building this package:

==> Starting build()...
gprbuild -p -m   -j4 -XBUILD=production -R gprbuild.gpr -XLIBRARY_TYPE=relocatable -XXMLADA_BUILD=relocatable -cargs -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -largs -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now
Setup
   [mkdir]        object directory for project GPR
   [mkdir]        library directory for project GPR
   [mkdir]        object directory for project Gprbuild
   [mkdir]        exec directory for project Gprbuild
Compile
   [Ada]          gprconfig-main.adb
...
   [Ada]          gprls.adb
Build Libraries
   [gprlib]       gpr.lexch
   [link library] libgpr.so
Bind
   [gprbind]      gprconfig-main.bexch
   [Ada]          gprconfig-main.ali
   [gprbind]      gprbuild-main.bexch
   [gprbind]      gprclean-main.bexch
   [Ada]          gprbuild-main.ali
   [Ada]          gprclean-main.ali
   [gprbind]      gprinstall-main.bexch
   [Ada]          gprinstall-main.ali
error: "dom.ads" and "gprconfig-main.adb" compiled with different GNAT versions             +
error: "dom-core.adb" and "gprconfig-main.adb" compiled with different GNAT versions        + many similar errors
error: "sax.ads" and "gprconfig-main.adb" compiled with different GNAT versions             +
error: "sax-encodings.ads" and "gprconfig-main.adb" compiled with different GNAT versions   +
...
gprbind: invocation of gnatbind failed
...
error: "sax-state_machines.adb" must be compiled                                                     + many similar errors
error: ("/usr/lib/xmlada/xmlada_sax.relocatable/sax-state_machines.ali" is obsolete and read-only)   +
gprbind: invocation of gnatbind failed
   binding of gprconfig-main.adb failed
   binding of gprclean-main.adb failed
   binding of gprbuild-main.adb failed
   binding of gprinstall-main.adb failed
gprbuild: *** post compilation phase failed
make: *** [Makefile:103: build] Error 4

charlie5 commented on 2016-06-06 00:15

The obsolete 'Makefile.archy' file has been removed, along with all references to it. Should build ok now.

ids1024 commented on 2016-06-05 16:37

Makefile.archy needs to be added to the src array in the PKGBUILD.

charlie5 commented on 2016-06-01 09:32

Earnest,

Apologies for the delay. I've been waiting for GNAT GPL16 to emerge before tackling the archy Ada updates. (Also been a bit flat out.)


"... a malicious user can dump a gcc or clang script in some bin
directory prepended to PATH and gprbuild will blindly use it."

I didn't know of this problem. Thanks for pointing it out.


"... they're going to add a standalone static gprbuild binary
which should help bootstrapping in the 2016 release."

This they have done. You're 'whining' has done some good ! ... :) . Yes, it should help simplify things considerably.


"... my approach is to build gprbuild using the static gprbuild, which also builds xmlada ..."

I will try to do the same.


"... they've at least added checksums for their over-http downloads."

Again, this they have done :) .


Sincere thanks for your comments (and successful efforts to improve the Ada ecosystem). My impression is that AdaCore is largely resistant to outside influences, so your efforts are doubly appreciated.


cheers,
charlie5.




Earnest commented on 2016-05-15 12:53

I've tried working with upstream Adacore to fix this build system and it's
hopeless.

They refuse to move from Debianisms and employ very sketchy practices such as
rolling over PATH to find tools.

This NIH could be solved nicely by honouring de facto environments such as CC
but no, instead a malicious user can dump a gcc or clang script in some bin
directory prepended to PATH and gprbuild will blindly use it.

They also offer no way to bootstrap gprbuild (other build systems, such as
make, don't seem to suffer from this insanity). Up until now they've only
provided a static gprbuild as part of their giant 300+MiB download, although
thanks to my whining they're going to add a standalone static gprbuild binary
which should help bootstrapping in the 2016 release.

Speaking of bootstrapping, my approach is to build gprbuild using the static
gprbuild, which also builds xmlada (PKGBUILD: <https://ptpb.pw/UGfU/sh>). Then
this gprbuild is used to build xmlada (PKGBUILD: <https://ptpb.pw/Tk_k/sh>)
proper and then the final gprbuild (PKGBUILD: <https://ptpb.pw/YP6n/sh>
(incomplete)). At this point gprbuild will also provide gprbuild-bootstrap as
a virtual package so any subsequent rebuilds can use it instead of going
through the static one.

* https://github.com/AdaCore/gprbuild/issues/2
* https://github.com/AdaCore/xmlada/issues/1
* https://github.com/AdaCore/xmlada/issues/2

Hopefully this can help to verify the initial compiler wasn't malicious IIRC
<http://www.dwheeler.com/trusting-trust/> as Adacore do not sign their
downloads, although again thanks to my whining they've at least added checksums
for their over-http downloads.

Either way, Adacore is a miserable clusterfuck and the only way to make
gprbuild and the Ada library ecosystem work on non-Debian distributions is to
patch/fork gprbuild.

(Or hope people who write Ada software are wise enough to also provide
Makefiles, but fat chance of that happening.)

charlie5 commented on 2016-02-01 08:04

"Perhaps it would be better to patch gprbuild to change the path it uses?" ... a better option, yes.

In fact, the gcc/gnat/gprbuild and gnat_util (which requires full gcc-ada rebuild) is, err, tricky, to sort out. There are also later issues with gdb not recognising Ada exceptions (such as Constraint_Error) when you want to set break point on a given exception, perhaps due to the gcc/gnat runtime not being built with debug symbols attached (i guess).

I, err, sort of inherited this job (so am glad of any help/advice).

I will try it locally, of course.

ids1024 commented on 2016-02-01 05:48

Installing that package works, though it is imperfect.

Perhaps it would be better to patch gprbuild to change the path it uses? I haven't looked at how difficult that would be.