Package Details: gnat-gps 2022-3

Git Clone URL: https://aur.archlinux.org/gnat-gps.git (read-only, click to copy)
Package Base: gnat-gps
Description: GNAT Programming Studio for Ada
Upstream URL: https://github.com/AdaCore/gps
Licenses: GPL
Submitter: None
Maintainer: charlie5 (xiretza)
Last Packager: charlie5
Votes: 22
Popularity: 0.000820
First Submitted: 2009-07-17 04:43 (UTC)
Last Updated: 2022-05-14 12:44 (UTC)

Pinned Comments

charlie5 commented on 2020-09-27 04:25 (UTC) (edited on 2020-12-22 10:48 (UTC) by charlie5)

Workaround for bad line numbering => Disable 'code folding' in preferences.

To enable 'Find All References' => Append 'GPS.LSP.ADA_SUPPORT=no' to ~/.gnatstudio/traces.cfg.

To enable ptrace in gdb => $ echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope.

A version of gcc-ada with Ada runtime exception symbols included is pending. Please visit https://bugs.archlinux.org/index.php?do=details&action=details.addvote&task_id=49895 and vote for a fix.

Latest Comments

krouziciorel commented on 2022-05-16 07:28 (UTC)

@charlie5

Gnat-gps is working with gcc-ada 12.1.0-1, but unfortunately after upgrading with my testing repository to gcc-ada 12.1.0-2 I see this long error message:


Unhandled Exception raised raised STORAGE_ERROR : s-intman.adb:136 explicit raise [/usr/lib/libgnarl-12.so] 0x62376d739b04 [/usr/lib/libc.so.6] 0x62376d0a38de [/usr/lib/libpython2.7.so.1.0] 0x62376ee38e0e new_threadstate.lto_priv.0 at pystate.c:201 0x62376eda078d PyGILState_Ensure.cold at pystate.c:604 [/usr/lib/libgnatcoll_python.so.0] 0x6237735e5e3c 0x6237736023d2 0x37f93da95f 0x37f8d16115 0x37f93d928d [/usr/lib/libc.so.6] 0x62376d08e28e 0x62376d08e348 0x37f93d9303 0xfffffffffffffffe

Unhandled Exception raised raised PROGRAM_ERROR : finalize/adjust raised exception [/usr/lib/libgnarl-12.so] 0x62376d743f26 [/usr/lib/libgnat-12.so] 0x62376d40b1e5 0x62376d40cacd 0x62376d40c84a 0x62376d62004b [/usr/lib/libgcc_s.so.1] 0x62376d2889ba _Unwind_ForcedUnwind_Phase2 at unwind.inc:171 0x62376d28928b _Unwind_Resume at unwind.inc:244 0x37f8d161f8 0x37f93d928d [/usr/lib/libc.so.6] 0x62376d08e28e 0x62376d08e348 0x37f93d9303 0xfffffffffffffffe

Unhandled Exception raised raised PROGRAM_ERROR : finalize/adjust raised exception [/lib64/ld-linux-x86-64.so.2] 0x6237759e3cfc [/usr/lib/libc.so.6] 0x62376d0a5ef3 0x62376d0a606e [/usr/lib/libgnat-12.so] 0x62376d61c93c 0x62376d40b313 0x62376d40cacd 0x62376d40c84a 0x62376d62004b [/usr/lib/libgcc_s.so.1] 0x62376d2889ba _Unwind_ForcedUnwind_Phase2 at unwind.inc:171 0x62376d28900e _Unwind_ForcedUnwind at unwind.inc:218 [/usr/lib/libgnat-12.so] 0x62376d40c7f6 0x62376d40c80b [/usr/lib/libgnarl-12.so] 0x62376d743f26 [/usr/lib/libgnat-12.so] 0x62376d40b1e5 0x62376d40cacd 0x62376d40c84a 0x62376d62004b [/usr/lib/libgcc_s.so.1] 0x62376d2889ba _Unwind_ForcedUnwind_Phase2 at unwind.inc:171 0x62376d28928b _Unwind_Resume at unwind.inc:244 0x37f8d161f8 0x37f93d928d [/usr/lib/libc.so.6] 0x62376d08e28e 0x62376d08e348 0x37f93d9303 0xfffffffffffffffe


I will switch back to the stable gcc version, it's strange that such a small update would generate so many errors. However, in Arch linux we have to take these problems into account. Many thanks to updating all necessary packages.

krouziciorel commented on 2022-05-13 18:43 (UTC)

@charlie5

This is excellent work, yes, more Ada PKGBUILDs need to be updated, I had tested and sucessfully compiled:

adacurses ada-libfswatch ahven alire aunit fswatch gnatcol* gnatmem gnatsymbolize gprbuild gprbuild-bootstrap gtkada ini_file_manager langkit libadalang libadalang-tools libvss sdlada sphinxcontrib-adadomain xmlada

This time I am unable to compile:

ada_language_server ada_sockets ada_spawn ada-web-server florist gnat-gps gnat_util inotify-ada

After weekend I will continue with my tests.

I'm very happy that you are preparing all the necessary packages for Arch Linux, for other distributions the developer in this perfect language is dependent on translation from source code or the use of a graphical installer from Ada Core. I am really looking forward to the new version of Ada 2022.

charlie5 commented on 2022-05-12 12:02 (UTC)

@krouziciorel

I'm working on the gnat-gps package stack atm. 'gprbuild-bootstrap' and 'xmlada' are done. 'libgpr' is in progress. Next is 'gprbuild' proper.

krouziciorel commented on 2022-05-12 11:38 (UTC)

@charlie5

Thank you very much for the quick reply, I thought AdaCore would have to respond to the new gcc version. The important thing is that the gnatmake and gprbuild utilities are working. When the new Libre community edition comes out and the PKGBUILDs are updated I will test it right away.

charlie5 commented on 2022-05-11 11:55 (UTC)

@krouziciorel

Thanks for the heads-up re gcc 12.1.

The new libre community edition should be out in a week or so. That is when the ada packages are usually updated. I should be able to start having a look into the new updates this weekend, with luck.

krouziciorel commented on 2022-05-11 11:23 (UTC)

Gnatmake is OK, but had problem with gprbuild command, the message about missing libgnarl-11.so library is here too. The simple solution is copy and rename libgnarl-12.so and libgnat-12.so in /usr/lib to libgnarl-11.so and libgnat-11.so.

Gnat Studio is still not working (there is problem for example with xmlada or gtkada too, gcc 12.1 and gcc-ada 12.1 are not fully compatible with more current PKGBUILDS):

gnatstudio: symbol lookup error: /usr/lib/libgtkada.so.18.0w: undefined symbol: system__img_real__image_floating_point

but I can use another editor or IDE and compile all ADA programs.

krouziciorel commented on 2022-05-09 06:52 (UTC)

Nice morning, during the weekend the gcc package in Arch was updated to version 12.1, which according to the changelog supports the upcoming Ada 2022 standard. However, PKGBUILD will need to be updated (and others PKGBUILDs too), Gnat Studio reports this error when trying to run or recompile:

gnatstudio: error while loading shared libraries: libgnarl-11.so

Fortunately, gnatmake is fully functional, so other IDEs can be used for now, e.g. VSCodium.

krouziciorel commented on 2022-02-07 19:39 (UTC) (edited on 2022-02-08 09:27 (UTC) by krouziciorel)

08-02-2022 - Many thanks for the quick fix, gnat-gps package is working now.

Please examine my error - this day there are upgraded versions of alire, langkit, libadalang, libadalang-tools and libvss and installed without any problem in my system. The only problem package is gnat-gps, when I try to upgrade, I see this error:


Setup

[mkdir] object directory for project Common

[mkdir] object directory for project GNATCOLL_Extras

[mkdir] object directory for project libclang

[mkdir] object directory for project LAL_Core

[mkdir] object directory for project GPS_LSP_Client

[mkdir] object directory for project Memory_Usage

[mkdir] object directory for project Toolchains

[mkdir] object directory for project VCS2

[mkdir] object directory for project Valgrind

Compile

[Ada] gps-main.adb

[C] python_support_gtk.c

[C] gtksupport.c

[C] gtkada_terminal.c

gps-main.adb:173:06: file "vss-json-streams.ads" not found

gps-main.adb:173:06: "GPS.MAIN (body)" depends on "GPS.LSP_MODULE (spec)"

gps-main.adb:173:06: "GPS.LSP_MODULE (spec)" depends on "LSP.TYPES (spec)"

gps-main.adb:173:06: "LSP.TYPES (spec)" depends on "LSP.JSON_STREAMS (spec)"

gps-main.adb:173:06: "LSP.JSON_STREAMS (spec)" depends on "VSS.JSON.STREAMS (spec)"

compilation of gps-main.adb failed

gprbuild: *** compilation phase failed

make[1]: *** [Makefile:46: all] Chyba 4

make[1]: Opouští se adresář „/home/wanbli/.cache/yay/gnat-gps/src/gnatstudio- 22.0/gnatstudio“

make: *** [Makefile:21: all] Chyba 2

==> ERROR: Error in build().


I thing there is problem in outdated gtkada package, but I am not sure, can you please try to install new versions of these packages?

charlie5 commented on 2022-01-14 08:04 (UTC)

@Armag67 I don't really know. The sooner the better though :).

Armag67 commented on 2022-01-13 21:17 (UTC)

Hello charlie5,

Now it works again fine. Do you know when gnat-gps will fully transition to Python 3 and drop all Python 2 dependencies?

charlie5 commented on 2022-01-12 13:23 (UTC)

@Armag67 Thanks for the heads up. Should build now.

Armag67 commented on 2022-01-10 13:48 (UTC)

Hello,

Since last shift to python 3.10, gnat-gps is broken:

gnatstudio: error while loading shared libraries: libpython3.9.so.1.0: cannot open shared object file: No such file or directory

even trying to rebuild fails, /usr/bin/ld doesn't find -lpython3.9

charlie5 commented on 2021-11-18 03:40 (UTC)

Hi @DHouck,

The PKGBUILD does in fact build the gps binary from the adacore gitub source. The tarball I host on github only contains the gps 'assets' which are taken from the ada libre community edition. The assets end up in /usr/share/gnatstudio. This was required because the assets in the github version did not work, whilst the assets from the community edition did. The problems were mostly related to python2/3 mismatches.

Any improvements to the PKGBUILD would be very welcome. GPS has been notoriously difficult to build for many years. Using the assets tarball is admittedly ugly but was really the only practical way. So, yes, very interested in any helpful patches.

Regards.

DHouck commented on 2021-11-17 13:31 (UTC)

Iʼm sorry for my tone. I was suspicious because this is an AUR package (not even named with a -bin suffix) which downloads a binary I couldnʼt find the source of, and I try to at least somewhat audit AUR packages before installing them, but thatʼs no excuse for my aggression.

As for building it myself, Iʼll try editing the PKGBUILD to incorporate the suggested change in https://github.com/AdaCore/gps/issues/98 and see how it goes. If that doesnʼt work, Iʼll probably at least want to try changing it to use the scripts at https://github.com/AdaCore/gnat_community_install_script.

If I manage that (presumably only the second one will work right), would you be interested in a patch to the PKGBUILD to help other people who try to verify AUR packages seem safe before installing?

charlie5 commented on 2021-11-17 10:51 (UTC)

@DHouck

"Why does this package require a binary file from a repository you personally manage on GitHub, instead of packages from the AdaCore GitHub organization or website?".

In a nutshell, version (python-2/3 and dependent ada libs) mismatches. By all means, try building it yourself.

You can get an 'official' binary of gnatstudio from the ada libre site.

https://community.download.adacore.com/v1/f3a99d283f7b3d07293b2e1d07de00e31e332325?filename=gnat-2021-20210519-x86_64-linux-bin&rand=841

I wish you good luck and better tact in the future.

DHouck commented on 2021-11-17 07:07 (UTC)

Why does this package require a binary file from a repository you personally manage on GitHub, instead of packages from the AdaCore GitHub organization or website? How do you get a copy of gnatstudio from more official sources?

charlie5 commented on 2020-11-20 14:15 (UTC) (edited on 2020-11-23 11:08 (UTC) by charlie5)

@ccorn

Good to hear :) ... Thanks again for the suggested pip2 approach and also for all the testing you have done.

Regards.

ccorn commented on 2020-11-19 23:37 (UTC)

@charlie5: Works like a charm!

And thanks for adding the extra test: Without it, pip2 would detect an existing sphinx installation, but using it would need the un-renaming symlink (as before). I should have thought of that myself.

I have tested your PKGBUILD in chroot builds both with and without preinstalled python2-sphinx package. The resulting package file lists are the same, and the documentation looks OK. All lights green here.

charlie5 commented on 2020-11-19 15:15 (UTC)

@ccorn

I've applied your mods and tested on an arch OS where python2-sphinx is already installed via pacman and also on a bare bones arch OS w/o pacman install of python2-sphinx.

Would you be able to take a look at the new PKGBUILD and perhaps test it in a chroot environment and let me know of any probs ?

Cheers.

charlie5 commented on 2020-11-17 16:43 (UTC)

@ccorn

Thanks for the alternative method. It looks very good. And cheers for clearing up my python2-gobject2 confusion. I'll try to add your mods in tomorrow.

Regards.

ccorn commented on 2020-11-17 03:03 (UTC)

@charlie5: Same runtime behavior here:

On my system, python2-gobject is needed else gnatstudio crashes with an > 'ImportError: No module named gi' error message.

But when building in a chroot, python2-gobject2 is needed, otherwise the following fatal error occurs:

/build/gnat-gps/src/gps-21.0w-20200427-15496-src/gnatcoll_extras/src/python_support_gtk.c:19:10: fatal error: 'pygobject.h' file not found

In my checkout, I have now added both to depends.

ccorn commented on 2020-11-17 02:11 (UTC) (edited on 2020-11-17 02:11 (UTC) by ccorn)

Because of the signature issue and the hassle of having to specify fallback packages, I have tried another approach: Just using

  export PYTHONUSERBASE="$srcdir/.local"
  export PATH="$srcdir/.local/bin:$PATH"
  pip2 install --user --cache-dir "$startdir/.cache/pip2" sphinx

This works both in chroot and local builds without unduly affecting the host system while still using persistent caching to avoid repeated downloads. It needs python2-pip in makedepends however.

I have checked that the file list of the resulting package is the same as in the previous revision, including documentation.

Here is the diff to the PKGBUILD:

diff --git a/PKGBUILD b/PKGBUILD
index ecf9ba1..c9d7fd9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -18,7 +18,7 @@ depends=("clang" "libadalang"
          "gnome-icon-theme" "gnome-icon-theme-extras" "gnome-icon-theme-symbolic" 
          "python2-gobject2")
 optdepends=('python2-jedi')
-makedepends=('gprbuild' 'texlive-latexextra' 'graphviz')
+makedepends=('gprbuild' 'texlive-latexextra' 'graphviz' 'python2-pip')

 _gps_version=21.0w-20200427-15496
 _gps_checksum=bfa68dd61a9288c79e9c08676878cac95e0fe628
@@ -49,6 +49,13 @@ sha1sums=("$_gps_checksum"

 prepare()
 {
+  # Install python2 packages that cannot be auto-installed via makedepends.
+  # Note that exports made here are visible in build() and package() as well.
+  # Use a persistent but package-specific download cache.
+  export PYTHONUSERBASE="$srcdir/.local"
+  export PATH="$srcdir/.local/bin:$PATH"
+  pip2 install --user --cache-dir "$startdir/.cache/pip2" sphinx
+
   cd "$srcdir/gps-$_gps_version-src"

   patch -p1 < "$srcdir/0002-Ignore-absence-of-version-number-in-user_guide.patch"
@@ -57,23 +64,13 @@ prepare()
   patch -p1 < "$srcdir/0005-Fix-recursive-make-in-docs.patch"

   # Force use of python2
-  rm -fr temp_bin
-  mkdir  temp_bin
-  ln -s /usr/bin/python2        temp_bin/python
-  ln -s /usr/bin/python2-config temp_bin/python-config
-  ln -s /usr/bin/sphinx-build2  temp_bin/sphinx-build
+  # Destination directory already populated by pip2 install
+  ln -sfT /usr/bin/python2        "$srcdir/.local/bin/python"
+  ln -sfT /usr/bin/python2-config "$srcdir/.local/bin/python-config"

   # Link libadalang-tools and ada_language_server into the GPS source tree
   ln -sf "$srcdir/libadalang-tools-$_laltools_ver-src" "$srcdir/gps-$_gps_version-src/laltools"
   ln -sf "$srcdir/als-$_als_ver-src"                   "$srcdir/gps-$_gps_version-src/ada_language_server"
-
-  # Install missing (obsolete) python2 packages from archives.
-  sudo pacman -U https://archive.archlinux.org/packages/p/python2-babel/python2-babel-2.8.0-5-any.pkg.tar.zst
-  sudo pacman -U https://archive.archlinux.org/packages/p/python2-imagesize/python2-imagesize-1.2.0-1-any.pkg.tar.xz
-  sudo pacman -U https://archive.archlinux.org/packages/p/python2-snowballstemmer/python2-snowballstemmer-2.0.0-3-any.pkg.tar.xz
-  sudo pacman -U https://archive.archlinux.org/packages/p/python2-sphinx-alabaster-theme/python2-sphinx-alabaster-theme-0.7.12-3-any.pkg.tar.xz
-  sudo pacman -U https://archive.archlinux.org/packages/p/python2-sphinxcontrib-websupport/python2-sphinxcontrib-websupport-1.1.2-3-any.pkg.tar.xz
-  sudo pacman -U https://archive.archlinux.org/packages/p/python2-sphinx/python2-sphinx-1.8.5-5-any.pkg.tar.zst
 }


@@ -83,9 +80,6 @@ build()

   export OS=unix

-  # Force use of python2
-  export PATH="$srcdir/gps-$_gps_version-src/temp_bin:$PATH"
-
   ./configure --prefix=/usr

   # the release tarball contains a bunch of sphinx build artefacts
@@ -105,9 +99,6 @@ package()

   export OS=unix

-  # Force use of python2
-  export PATH="$srcdir/gps-$_gps_version/temp_bin:$PATH"
-
   make DESTDIR="$pkgdir/" install

   # Add the desktop config.

charlie5 commented on 2020-11-16 23:57 (UTC)

Hi again @xiretza

I just noticed you've replaced python2-gobject with python2-gobject2. On my system, python2-gobject is needed else gnatstudio crashes with an 'ImportError: No module named gi' error message.

Also, I have built and ran gps without python2-gobject2 being needed.

charlie5 commented on 2020-11-16 22:51 (UTC)

Hi @xiretza ... thanks for bumping up the package version.

charlie5 commented on 2020-11-16 22:47 (UTC) (edited on 2020-11-16 22:48 (UTC) by charlie5)

Hi @Armag67

You need to ...

$ sudo rm /var/cache/pacman/pkg/python2-imagesize-1.2.0-1-any.pkg.tar.xz

$ sudo rm /var/cache/pacman/pkg/python2-imagesize-1.2.0-1-any.pkg.tar.xz.sig

The same applies to several other obsolete python2 packages, which will show the same error message (so delete those also).

For the other problem, perhaps try pacaur or pikaur started in a terminal.

Armag67 commented on 2020-11-16 21:29 (UTC) (edited on 2020-11-16 22:38 (UTC) by Armag67)

Hello, With today's update on Manjaro, pamac returns:

sudo: un terminal est requis pour lire le mot de passe; utilisez soit l'option -S pour lire depuis l'entrée standard ou configurez un outil askpass de demande de mot de passe
==> ERREUR : Une erreur s’est produite dans prepare().
    Abandon…

and:

git clone https://aur.archlinux.org/gnat-gps.git
cd gnat-gps
makepkg -si

after identification returns:

erreur : '/var/cache/pacman/pkg/python2-imagesize-1.2.0-1-any.pkg.tar.xz': paquet pour lequel la signature requise est manquante
==> ERREUR : Une erreur s’est produite dans prepare().
    Abandon…

I will try to modify PKGBUILD.

After marking as comment these lines for the Python2 modules already up to date on my box:

  # sudo pacman -U https://archive.archlinux.org/packages/p/python2-imagesize/python2-imagesize-1.2.0-1-any.pkg.tar.xz
  # sudo pacman -U https://archive.archlinux.org/packages/p/python2-snowballstemmer/python2-snowballstemmer-2.0.0-3-any.pkg.tar.xz
  # sudo pacman -U https://archive.archlinux.org/packages/p/python2-sphinx-alabaster-theme/python2-sphinx-alabaster-theme-0.7.12-3-any.pkg.tar.xz
  # sudo pacman -U https://archive.archlinux.org/packages/p/python2-sphinxcontrib-websupport/python2-sphinxcontrib-websupport-1.1.2-3-any.pkg.tar.xz
  # sudo pacman -U https://archive.archlinux.org/packages/p/python2-sphinx/python2-sphinx-1.8.5-5-any.pkg.tar.zst

It seems to work, keep our fingers crossed...

IT WORKS!

charlie5 commented on 2020-11-16 17:44 (UTC)

@ccorn I've updated package to install the missing python2 packages from the archives. Thanks for letting us know of the problem.

charlie5 commented on 2020-11-16 17:43 (UTC)

@mindbound perhaps try rebuilding the gnatcoll-python package.

ccorn commented on 2020-11-15 05:20 (UTC)

gnat-gps needs a rebuild because of a libclang.so version update.

Problem: python2-sphinx and some of its dependencies seem to be no longer available from the standard repos. I had to supply the following packages from the pacman cache:

python2-babel-2.8.0-4-any.pkg.tar.zst
python2-imagesize-1.2.0-1-any.pkg.tar.xz
python2-snowballstemmer-2.0.0-3-any.pkg.tar.xz
python2-sphinx-1.8.5-5-any.pkg.tar.zst
python2-sphinx-alabaster-theme-0.7.12-3-any.pkg.tar.xz
python2-sphinxcontrib-websupport-1.1.2-3-any.pkg.tar.xz

mindbound commented on 2020-11-12 06:01 (UTC) (edited on 2020-11-12 06:01 (UTC) by mindbound)

When trying to compile gnatcoll-bindings, I get the following errors (whether building the package by hand as suggested below or not):

/usr/bin/ld: /path/to/gnatcoll-bindings/src/gnatcoll-bindings-20.0-20191009-1B2EA-src/python/obj/relocatable/python_support.o: warning: relocation against `init_user_module' in read-only section `.text'
/usr/bin/ld: /path/to/gnatcoll-bindings/src/gnatcoll-bindings-20.0-20191009-1B2EA-src/python/obj/relocatable/python_support.o: relocation R_X86_64_PC32 against symbol `init_user_module' can not be used when making a shared object; recompile with -fPIC

Please advise.

xiretza commented on 2020-10-13 13:05 (UTC)

@ccorn: Ah, thanks! It's now merged upstream, I just forgot to git rm it.

ccorn commented on 2020-10-13 11:54 (UTC)

What about 0001-Use-GPR.Sinput.Reference_Name.patch? It is currently unused, but still checked in.

charlie5 commented on 2020-10-13 04:33 (UTC)

@xiretza : :) No worries. You do excellent work ! Much appreciated.

xiretza commented on 2020-10-12 14:59 (UTC)

@charlie5: sorry for reverting your commit, but there were more things wrong with it than just the gobject dependency. It was a lot simpler to revert and redo it than to pick out the things that would still be useful.

Tested this in a clean chroot, should build fine now including docs.

ccorn commented on 2020-10-12 03:29 (UTC)

Chroot build failed today due to missing pygobject.h. I had to replace the dependency python2-gobject with python2-gobject2.

charlie5 commented on 2020-09-27 04:25 (UTC) (edited on 2020-12-22 10:48 (UTC) by charlie5)

Workaround for bad line numbering => Disable 'code folding' in preferences.

To enable 'Find All References' => Append 'GPS.LSP.ADA_SUPPORT=no' to ~/.gnatstudio/traces.cfg.

To enable ptrace in gdb => $ echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope.

A version of gcc-ada with Ada runtime exception symbols included is pending. Please visit https://bugs.archlinux.org/index.php?do=details&action=details.addvote&task_id=49895 and vote for a fix.

xiretza commented on 2020-07-25 11:10 (UTC)

@ManfredGahr: if you can reproduce the issue in a clean chroot, *please* send me all the data you can gather (snapshot of the chroot, `.src.tar.gz`, build logs, ...) and I will get right on it. But as it stands right now, I really don't have the time or interest to try to reproduce this on some dirtied system, investigate it, and then patch it.

ManfredGahr commented on 2020-07-13 13:09 (UTC)

Hello xiretza, I don't think I have a broken distribution, on my 2 Arch Linux x86_64 machines I also have to edit the _gpr_opts in gnatcoll-bindings' PKGBUILD.

One is a freshly installed (2 months old, updated weekly, no AUR packages that aren't needed for gnat-gps) VMWare image, the other is my notebook, which has also been updated frequently for the last 4 years.

I'm pretty confident that there are more users, who just don't complain and edit their PKGBUILD, just as I did until I read your answer from 2020-06-09 today, because I was wondering why this hasn't been fixed yet.

Armag67 commented on 2020-06-11 00:18 (UTC)

Hello xiretza,

Now gnat-gps 2020-3 works after rebuilding all his dependencies and building gnatcoll-python2 with Th3Fanbus's advices. But it was a pain in the ass... ;=)

Armag67 commented on 2020-06-10 15:27 (UTC)

Ok xiretza,

But I don't think my distro is broken, last week I have successfully rebuilt gnat-gps (2020-1) and all his dependencies and it works now like a charm.

Now, for upgrade its dependency gnatcoll-python to gnatcoll-python2 (required to upgrade gnat-gps to 2020-2) I did:

git clone https://aur.archlinux.org/gnatcoll-bindings.git

cd gnatcoll-bindings

env LC_ALL=C makepkg -si

End of the traceback:

...
Build Libraries
   [gprlib]       gnatcoll_python.lexch
   [link library] libgnatcoll_python.so
/usr/bin/ld: /home/h2/Installs/git/gnatcoll-bindings/src/gnatcoll-bindings-20.0-20191009-1B2EA-src/python/obj/relocatable/python_support.o: relocation R_X86_64_PC32 against symbol `init_user_module' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
gprlib: /usr/bin/gcc execution error
gprbuild: could not build library for project gnatcoll_python
process failed with status: 4
==> ERROR: A failure occurred in build().
    Aborting...

I am considering to follow the Th3Fanbus advice to modify _gpr_opts in PKGBUILD from _gpr_opts="-R -cargs $CFLAGS -largs $LDFLAGS" to _gpr_opts="-R -cargs -fPIC $CFLAGS -largs -fPIC $LDFLAGS".

I can also live a few weeks with the 2020-1 version of gnat-gps...

xiretza commented on 2020-06-09 14:14 (UTC) (edited on 2020-06-09 14:24 (UTC) by xiretza)

@Armag67: again, I will not be trying to fix problems with broken distros (none of which have any privilege to be supported by the Arch User Repository), so stop wasting my time. As a general tip when trying to get help from the relevant sources though: run your programs with env LC_ALL=C [prog], attempting to manually translate errors is absolutely useless because they can't be searched for.

Armag67 commented on 2020-06-09 13:52 (UTC) (edited on 2020-06-09 13:54 (UTC) by Armag67)

Hello,

The stable Manjaro distribution is 15 days behind Archlinux. As soon as gcc and gcc-ada were updated to version 10.1.0-2, I was able to update gnat-gps.

I uninstalled all its dependencies (gnatcoll-*, gtkada, gprbuild, gnatcoll-core, libgpr) except xmlada which I rebuilt, then I rebuilt them and reinstalled in the right order, and finally Gnat Studio works correctly.

But now I'm struggling to upgrade gnat-gps from the 2020-1 to the 2020-2 version. I can't build the gnatcoll-python2 (2020-3) dependency which should replace gnatcoll-python (2020-1).

It throws this traceback (in french):

/usr/bin/ld: /home/h2/Installs/git/gnatcoll-bindings/src/gnatcoll-bindings-20.0-20191009-1B2EA-src/python/obj/relocatable/python_support.o: réadressage R_X86_64_PC32 vers symbole « init_user_module » ne peut pas être utilisé en créant un objet partagé; recompilez avec -fPIC
/usr/bin/ld : échec de l'édition de liens finale : mauvaise valeur
collect2: erreur: ld a retourné le statut de sortie 1
gprlib: /usr/bin/gcc execution error
gprbuild: could not build library for project gnatcoll_python
process failed with status: 4
==> ERREUR : Une erreur s’est produite dans build().
    Abandon…

which should be in English:

/usr/bin/ld: /home/h2/Installs/git/gnatcoll-bindings/src/gnatcoll-bindings-20.0-20191009-1B2EA-src/python/obj/relocatable/python_support.o: relocation R_X86_64_PC32 against undefined symbol `init_user_module' can not be used when making a shared object; recompile with -fPIC

/usr/bin/ld: final link failed: Bad value

collect2: error: ld returned 1 exit status

My binutils are at the 2.34-5 version

trescott2000 commented on 2020-04-24 21:34 (UTC) (edited on 2020-04-24 21:36 (UTC) by trescott2000)

Why is python2-jedi required?

I was able to build and install without python2-jedi (package does not exist anymore).

Armag67 commented on 2019-06-26 15:46 (UTC)

Hi charlie 5, Have you seen my post about my gprbuild troubles to build? https://aur.archlinux.org/packages/gprbuild/

charlie5 commented on 2019-06-24 22:38 (UTC)

Hi @gbabin,

I've just added a desktop config file.

gbabin commented on 2019-06-23 10:35 (UTC)

Thank you charlie5 for all the GNAT/GPS packages.

Could you please add a .desktop file to this package to launch GPS?

charlie5 commented on 2019-06-23 06:27 (UTC)

hi @troisqua,

I'm not sure of the best place to look for new features, atm.

The openGL support is missing from gtkada. I'd like to see it supported again as i enjoy doing a bit of GL. Perhaps when things quieten down a bit, i might have a look at it.

troisqua commented on 2019-06-22 18:20 (UTC)

Hi Charlie5,

You don't have to apologize. I really appreciate your work. By the way, I can't find what are the new features of the 2019 version. Do you plan to fix the problem of opengl support which can't be installed via this package ?

charlie5 commented on 2019-06-21 06:19 (UTC)

hi @troisqua,

I apologise for the broken installation. I added version requirements for dependencies to most of the ada packages, which proved a mistake.

I'm doing the 2019 ada package updates atm and hope to have them ready by the end of this weekend.

troisqua commented on 2019-06-21 06:03 (UTC)

Hello,

The update of gcc 8.3 to gcc 9.1 broke my installation. I tried to recompile but could not achieve because some packages expected versions of gcc <= 8.3.

My workaround was to prevent gcc from being updated in pacman.conf, reinstall gcc 8.3 and recompile everything (but it broke updates of firefox which I also had to recompile with gcc 8.3)

Armag67 commented on 2019-04-06 13:06 (UTC) (edited on 2019-04-06 13:14 (UTC) by Armag67)

Thanks charlie5! After two hours of build on my laptop, it works fine.

charlie5 commented on 2019-04-05 13:39 (UTC)

Hi Armag67,

A re-build/install should fix the problem.

I'll bump up the package version tomorrow.

Thanks for the heads up.

Armag67 commented on 2019-04-04 20:51 (UTC)

Hello,

libclang.so.7 has been updated to libclang.so.8 last week on my box. Now gps claims the older version of the library at launch (gps: error while loading shared libraries: libclang.so.7: cannot open shared object file: No such file or directory).

Even if i make a symlink libclang.so.7 to libclang.so.8 in the /usr/lib/ directory, gps throw at launch the error message: gps: /usr/lib/libclang.so.7: version `LLVM_7' not found (required by gps).

Thank's to take a look.

gbabin commented on 2018-09-14 17:25 (UTC)

The package pep8 has been renamed pycodestyle in 2016. A pull-request is already awaiting review upstream: https://github.com/AdaCore/gps/pull/26. The package python2-pycodestyle already exists in the communityrepository.

You could use a patch while waiting for the change upstream.

charlie5 commented on 2018-09-13 08:34 (UTC)

Hi gbabin,

You are right. I've been unable to locate a pep8 package for python2, however :(.

gbabin commented on 2018-09-12 18:25 (UTC)

The build succeeds for me, thank you for making GPS available !

However, when it stars, there is the following error:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/share/gps/plug-ins/pep8_integration.py", line 9, in <module>
    import pep8
ImportError: No module named pep8

I think that it comes from the fact that python2 is looking for pep8 whereas the package depends on python-pep8, which is a Python 3 package.

GaryScottMartin commented on 2018-08-09 13:31 (UTC) (edited on 2018-08-09 13:40 (UTC) by GaryScottMartin)

The build fails for me:

configure: ------------- Summary for GPS -------------------- configure: GNATcoll: configure: Xml/Ada: with_xmlada configure: use ADA_PROJECT_PATH to find xmlada.gpr configure: -------------------------------------------------- configure: creating ./config.status config.status: creating shared.gpr config.status: creating Makefile config.status: creating docs/Makefile config.status: creating common/core/src/config.ads config.status: creating common/expect/Makefile config.status: creating common/common.gpr config.status: creating share/support/core/protocols.py config.status: creating osx_bundle/Makefile config.status: creating osx_bundle/scripts/install.py config.status: creating docs/gps-welcome.html config.status: creating docs/gps-welcome-public.html make -C gps default make[1]: Entering directory '/tmp/yaourt-tmp-gary/aur-gnat-gps/src/gps-gpl-2017-src/gps' cd ../kernel/src; python hooks.py cd ../kernel/generated; gnatcoll_db2ada -api=GPS.Kernel.Properties.Database -adacreate -dbmodel=../src/properties_schema.txt /bin/sh: gnatcoll_db2ada: command not found make[1]: *** [Makefile:43: all] Error 127 make[1]: Leaving directory '/tmp/yaourt-tmp-gary/aur-gnat-gps/src/gps-gpl-2017-src/gps' make: *** [Makefile:21: all] Error 2 ==> ERROR: A failure occurred in build(). Aborting... ==> ERROR: Makepkg was unable to build gnat-gps. ==> Restart building gnat-gps ? [y/N] ==> --------------------------------- ==>

Palladinium commented on 2017-07-26 03:16 (UTC)

When running gps, I get the following error, as well as many more python import errors in the messages window: Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: No module named gi Installing python2-gobject changes the error to the following instead: ImportError: could not import gobject (could not find _PyGObject_API object) GPS is mostly unusable and many actions fail, sometimes crashing the whole program. For instance, on every startup I get the following error: Traceback (most recent call last): File "/usr/share/gps/support/core/tip_of_the_day.py", line 616, in on_gps_started messages = GPS.MDI.get("Messages").pywidget() GPS.Unexpected_Exception: unexpected internal exception raised STORAGE_ERROR : s-intman.adb:136 explicit raise Call stack traceback locations: 0x7fec219e0467 0x7fec22a3b7de 0x7fec2ab0d538 0x7fec2ab0d8c1 0x7fec2a8ec434 0x7fec2a8ed903 0x7fec22d34c09 0x7fec22d8f4c3 0x7fec22cfc69c 0x7fec22d5a0e1 0x7fec2a8f8d4e 0x7fec2a8f9ef8 0x7fec29be73c1 0x56508287bc3e 0x5650815a521b 0x7fec277134d7 0x7fec230da8c3 0x7fec230dac86 0x7fec230dad1a 0x7fec2369672b 0x56508157c863 0x5650815ca500 0x7fec20e864c8 0x565081574e78 0xfffffffffffffffe

Sithspawn commented on 2017-06-05 12:08 (UTC)

Getting a build error (Manjaro): ====== Building relocatable libraries ====== gprbuild -R -p -m -j2 -XLIBRARY_TYPE=relocatable -XGnatcoll_Build=Production -XXMLADA_BUILD=relocatable -Pgnatcoll_full -cargs -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -largs -Wl,-O1,--sort-common,--as-needed,-z,relro Setup [mkdir] object directory for project GnatColl [mkdir] library directory for project GnatColl [mkdir] object directory for project GnatColl_Python [mkdir] library directory for project GnatColl_Python [mkdir] object directory for project GnatColl_Postgres [mkdir] library directory for project GnatColl_Postgres [mkdir] object directory for project GnatColl_Sqlite [mkdir] library directory for project GnatColl_Sqlite [mkdir] object directory for project GnatColl_Gmp [mkdir] library directory for project GnatColl_Gmp [mkdir] object directory for project GnatColl_Readline [mkdir] library directory for project GnatColl_Readline [mkdir] object directory for project GnatColl_Iconv [mkdir] library directory for project GnatColl_Iconv [mkdir] object directory for project GnatColl_Xref [mkdir] library directory for project GnatColl_Xref Compile [Ada] gnatcoll-xref-database.adb [Ada] gnatcoll-xref-database_names.ads gnatcoll-storage_pools-headers.adb:117:49: unrecognized attribute "Finalization_Size" gnatcoll-storage_pools-headers.adb:117:49: unrecognized attribute "Finalization_Size" compilation of gnatcoll-xref-database_names.ads failed compilation of gnatcoll-xref-database.adb failed gprbuild: *** compilation phase failed make: *** [Makefile:51: build_library_type/relocatable] Error 4 Would this be due to underlying compiler version in Manjaro since it is a quite new Ada feature? (6.3.1)

charlie5 commented on 2016-10-03 17:06 (UTC)

Should/when anyone have problems setting breakpoints on ada runtime exceptions (constraint_error/etc) in GPS (or GDB, in general), then please see this ... https://bugs.archlinux.org/task/49895 Fix, in nutshell, is ... # abs $ mkdir ~/gcc-build $ cp /var/abs/core/gcc/PKGBUILD ~/gcc-build $ cd ~/gcc-build $ <edit PKGBUILD> ... replace options=('staticlibs' '!emptydirs') with options=('staticlibs' '!emptydirs' '!strip') ... in package_gcc-ada() $ makepkg $ sudo pacman -U *.xz

aphirst commented on 2016-06-09 17:37 (UTC)

library directory "/tmp/yaourt-tmp-adam/aur-gnat-gps/src/gps-gpl-2016-src/templates_parser/lib" created for project templates_parser widgets.gpr:14:55: unknown variable "Gtk_Include" gprbuild: "gps" processing failed Makefile:42: recipe for target 'all' failed make[1]: *** [all] Error 4 make[1]: Leaving directory '/tmp/yaourt-tmp-adam/aur-gnat-gps/src/gps-gpl-2016-src/gps' Makefile:21: recipe for target 'all' failed make: *** [all] Error 2

charlie5 commented on 2015-10-04 07:24 (UTC)

Hi ovidiu, I think the problem is a missing dependency. I will test properly soon, but in the meantime if you add "gnat_util" to the 'depends' line, as in ... depends=("gcc-ada" "xmlada" "gtkada" "gprbuild" "gnat_util" "python2" "python2-pep8" "python2-jedi" "python2-gobject") ... I suspect it may help. If it does fix the problem, could you please let me know ? Regards.

ferion commented on 2015-10-04 00:49 (UTC)

for some reason it fails to compile at the building static libraries stage library directory "/date/AUR/tmp/gnat-gps/src/gnatcoll-gpl-2015-src/src/lib/readline/static" created for project gnatcoll_readline object directory "/date/AUR/tmp/gnat-gps/src/gnatcoll-gpl-2015-src/src/obj/gmp/static" created for project gnatcoll_gmp library directory "/date/AUR/tmp/gnat-gps/src/gnatcoll-gpl-2015-src/src/lib/gmp/static" created for project gnatcoll_gmp gnatcoll.gpr:35:10: unknown file "xutil.ads" gnatcoll.gpr:35:23: unknown file "xutil.adb" gnatcoll.gpr:35:36: unknown file "xsnamest.adb" gprbuild: "gnatcoll_build" processing failed Makefile:26: recipe for target 'build_library_type/static' failed make[2]: *** [build_library_type/static] Error 4 make[2]: Leaving directory '/date/AUR/tmp/gnat-gps/src/gnatcoll-gpl-2015-src' Makefile:30: recipe for target 'all' failed make[1]: *** [all] Error 2 make[1]: Leaving directory '/date/AUR/tmp/gnat-gps/src/gps-6.1.1-src/gps' Makefile:18: recipe for target 'all' failed make: *** [all] Error 2 ==> ERROR: A failure occurred in build(). Aborting...

charlie5 commented on 2015-09-04 15:15 (UTC)

Just corrected the md5sum for 'patch-Makefile.in'. Hope that was the issue.

Armag67 commented on 2015-09-04 13:17 (UTC)

Now "patch-docs-Makefile.in" fails md5sum validation...

charlie5 commented on 2015-09-04 08:12 (UTC)

Hok, should be fixed now. Problem was that python2 was being used but python3 libs were being linked. Thanks for reporting the problem. I initially made the package w/o python3 installed. Since I now have python3 installed, I would have hit the same problem the next time I tried to build GPS.

charlie5 commented on 2015-08-30 10:28 (UTC)

I'm pretty sure the problem is related to python3 being installed. I'll try to test it tonight and get back to you. I understand your frustration and apologise. 'gnat_util' and 'gps' are the 2 slowest pkgs to build in the Ada collection.

Armag67 commented on 2015-08-28 23:20 (UTC)

Without gnat_util installed, gnat-gps compilation fail after a few minutes with a three missing files message (xutil.ads, xutil.adb & xsnamest.adb). After long hours to install gnat_util, ten more hours of gnat-gps compilation (on my old box) fail with the error message : /tmp/yaourt-tmp-h2/aur-gnat-gps/src/gps-6.1.1-src/gnatlib/src/lib/python/static/libgnatcoll_python.a(python_support.o): dans la fonction « ada_PyUnicode_AsEncodedString »: /tmp/yaourt-tmp-h2/aur-gnat-gps/src/gps-6.1.1-src/gnatlib/src/python/python_support.c:380: référence indéfinie vers « PyUnicodeUCS4_AsEncodedString » /tmp/yaourt-tmp-h2/aur-gnat-gps/src/gps-6.1.1-src/gnatlib/src/lib/python/static/libgnatcoll_python.a(python_support.o): dans la fonction « ada_PyUnicode_FromString »: /tmp/yaourt-tmp-h2/aur-gnat-gps/src/gps-6.1.1-src/gnatlib/src/python/python_support.c:390: référence indéfinie vers « PyUnicodeUCS4_FromString » /tmp/yaourt-tmp-h2/aur-gnat-gps/src/gps-6.1.1-src/gnatlib/src/lib/python/static/libgnatcoll_python.a(gnatcoll-python.o): dans la fonction « gnatcoll__python__pyfile_fromstring »: gnatcoll-python.adb:(.text+0x1a4e): référence indéfinie vers « PyFile_FromString » collect2: erreur: ld a retourné 1 code d'état d'exécution gprbuild: link of gps-main.adb failed I have declared plenty of tmpfs and swapfile (~5 Gio for each). The issue is not there.

kaptoxic commented on 2014-11-10 06:37 (UTC)

Update to 2014 please

Sietse commented on 2014-10-03 14:28 (UTC)

oenone, did you have a chance to look into this?

JPlaroche commented on 2013-11-07 17:50 (UTC)

bonjour, la compillation ne fonctionne pas merci de mettre à jour hello, does not operate the compillation I want to study for my retirement ADA thank you

commented on 2013-05-25 15:08 (UTC)

sorry, arch doesn't want to install via hyper-v, so i can't update right now. will do as soon as arch runs again.

Sietse commented on 2013-04-11 12:42 (UTC)

Hey, Your package is outdated and fails with the latest python update. Please look into this, thanks!

commented on 2012-05-26 12:37 (UTC)

should be fixed now. Be aware that you have to recompile the ada libraries if gcc-ada gets updated.

commented on 2012-05-06 04:33 (UTC)

got a error gcc -c -g -g -O1 -gnata -gnatVa -gnatQ -gnatygO -gnatwaCJe -gnat05 toolchains.adb toolchains-parsers.ads:197:10: current instance must be a limited type gprbuild: *** compilation phase failed make[1]: *** [all] Error 4 make[1]: Leaving directory `/home/kujo/gnat-gps/src/gps-5.0.1-src/gps' make: *** [default] Error 2 ==> ERROR: A failure occurred in build(). Aborting...

titiwu commented on 2012-03-28 17:22 (UTC)

I added a .desktop file to your PKGBUILD Maybe you could add it. It's found here: https://github.com/titiwu/nxt-ada-robot/tree/master/other/gnat-gps

titiwu commented on 2012-02-05 18:11 (UTC)

Works great now! Thank you!

commented on 2012-02-03 20:41 (UTC)

sorry, i forgot to add the patch to the PKGBUILD / source-tarball. That line in the PKGBUILD was redundant, so i removed it, too.

titiwu commented on 2012-02-03 20:08 (UTC)

The build() gives an error because it cannot find "*.patch". (cp $startdir/*.patch $srcdir fails) Is there a source file missing?

commented on 2012-02-01 20:28 (UTC)

thanks, changed it

Larso commented on 2012-02-01 20:06 (UTC)

builddepends -> makedepends in PKGBUILD, otherwise nawk isn't be detected as a dependency.

commented on 2012-01-27 21:53 (UTC)

the problem exists with GtkAda and I will fix it there. Any project using GtkAda will fail to link.

titiwu commented on 2012-01-18 20:02 (UTC)

I managed to compile the package. However it required adding "-lX11" and "-Xrender" as compiler flags. I added them to the target flags in the configure-file, but there is shurly a better/cleaner place.

titiwu commented on 2012-01-18 18:54 (UTC)

When compiling, I get an error (on x86-64) gcc gps-main.o /usr/bin/ld: /usr/lib/gtkada/static//libgtkada.a(misc.o): undefined reference to symbol 'XWarpPointer' /usr/bin/ld: note: 'XWarpPointer' is defined in DSO /usr/lib/libX11.so.6 so try adding it to the linker command line /usr/lib/libX11.so.6: could not read symbols: Invalid operation export LDFLAGS="$LDFLAGS -lX11" did not help. I also found that FreeBSD has a package compiled from source http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/gps/ but that didn't help me. Do you have any ideas how to fix this? Thanks for creating this package!

Georgios commented on 2011-10-16 17:32 (UTC)

Beware! This package does not yet support x86 ! Also an icon needs to be added to the applications menu. I hope to resolve this soon.

Georgios commented on 2011-10-16 17:31 (UTC)

Thank you vnoel. This helped a lot. It is a hard to build package though .

vnoel commented on 2011-07-26 09:41 (UTC)

Hi, The latest version of GPS is available here: http://sourceforge.net/projects/gnat-gpl/files/2011/