Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-25-2012, 05:55 PM   #1
LQ Newbie
Registered: Oct 2012
Posts: 5

Rep: Reputation: Disabled
gnat-gpl-2011 install problem on ubuntu 12.04


I installed gnat-gpl-2011-i686-gnu-linux-libc2.3-bin.tar.gz on Ubuntu 10.10 and got it to operate. I plan to do most of my development on this system.

However the code I am developing is going to be running on a netbook (ACER Aspire One 722) and on ARM SBCs.

I downloaded the same package on 12.04 on the netbook and installed it without error.

In order to launch GPS you have to start a terminal, add /usr/gnat/bin to the PATH and then type the gps command.

The gps command is really a shell script that runs gps_exe in the same directory ( /usr/gnat/bin ). When I run gps, I get the following error message.

/usr/gnat/bin/gps: 61: exec: /usr/gnat/bin/gps_exe: not found

echo $PATH shows the path is correct and ls /usr/gnat/bin shows the executable and the script.

Anybody understand what is going on?
Old 10-26-2012, 02:05 PM   #2
Senior Member
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
Which shell you're running, and what is path of execution set for gps in it's script?
Also is there any link between /usr/gnat/bin/gps & /usr/gnat/bin/gps_exe executable files (check la -la /usr/gnat/bin/ once again)?
To me it sounds some pb with $PATH which is not updating. So once open a new terminal and test it again.
Old 10-29-2012, 10:51 PM   #3
LQ Newbie
Registered: Oct 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Tried your suggestion. See below.

Terminal is running bash shell. the complete sequence is shown below along with the "la" suggestion. I have no clue whats going on, hope this gives you a clue. Thanks for looking Mike.

mike@mike-netbook-ubuntu:~$ PATH=/usr/gnat/bin:$PATH; export PATH
mike@mike-netbook-ubuntu:~$ echo $PATH
mike@mike-netbook-ubuntu:~$ gps
/usr/gnat/bin/gps: 61: exec: /usr/gnat/bin/gps_exe: not found
mike@mike-netbook-ubuntu:~$ gps_exe
bash: /usr/gnat/bin/gps_exe: No such file or directory
mike@mike-netbook-ubuntu:~$ echo $PATH
mike@mike-netbook-ubuntu:~$ ls /usr/gnat/bin/gps_exe
mike@mike-netbook-ubuntu:~$ la -la /usr/gnat/bin
total 89836
drwxr-xr-x 2 mike mike 4096 Apr 19 2011 .
drwxr-xr-x 8 root root 4096 Oct 23 20:05 ..
-rwxr-xr-x 1 mike mike 562984 Apr 19 2011 addr2line
-rwxr-xr-x 3 mike mike 212740 Apr 19 2011 c++
-rwxr-xr-x 1 mike mike 561544 Apr 19 2011 c++filt
-rwxr-xr-x 1 mike mike 211108 Apr 19 2011 cpp
-rwxr-xr-x 1 mike mike 212740 Apr 19 2011 g++
-rwxr-xr-x 1 mike mike 209636 Apr 19 2011 gcc
-rwxr-xr-x 1 mike mike 16388 Apr 19 2011 gccbug
-rwxr-xr-x 1 mike mike 26432 Apr 19 2011 gcov
-rwxr-xr-x 1 mike mike 6077804 Apr 19 2011 gdb
-rwxr-xr-x 1 mike mike 188928 Apr 19 2011 gdbserver
-rwxr-xr-x 1 mike mike 1773408 Apr 19 2011 gnat
-rwxr-xr-x 1 mike mike 764692 Apr 19 2011 gnatbind
-rwxr-xr-x 1 mike mike 3022216 Apr 19 2011 gnatcheck
-rwxr-xr-x 1 mike mike 641632 Apr 19 2011 gnatchop
-rwxr-xr-x 1 mike mike 1670848 Apr 19 2011 gnatclean
-rwxr-xr-x 1 mike mike 2285128 Apr 19 2011 gnatelim
-rwxr-xr-x 1 mike mike 616032 Apr 19 2011 gnatfind
-rwxr-xr-x 1 mike mike 32143 Jul 29 2009
-rwxr-xr-x 1 mike mike 117664 Apr 19 2011 gnatkr
-rwxr-xr-x 1 mike mike 409952 Apr 19 2011 gnatlink
-rwxr-xr-x 1 mike mike 1296288 Apr 19 2011 gnatls
-rwxr-xr-x 1 mike mike 1904272 Apr 19 2011 gnatmake
-rwxr-xr-x 1 mike mike 1007760 Apr 19 2011 gnatmem
-rwxr-xr-x 1 mike mike 2459656 Apr 19 2011 gnatmetric
-rwxr-xr-x 1 mike mike 1418912 Apr 19 2011 gnatname
-rwxr-xr-x 1 mike mike 2518152 Apr 19 2011 gnatpp
-rwxr-xr-x 1 mike mike 1177440 Apr 19 2011 gnatprep
-rwxr-xr-x 1 mike mike 2309608 Apr 19 2011 gnatstub
-rwxr-xr-x 1 mike mike 615904 Apr 19 2011 gnatxref
-rwxr-xr-x 1 mike mike 2765560 Apr 19 2011 gprbuild
-rwxr-xr-x 1 mike mike 8128065 Apr 19 2011 gprbuild_debug
-rwxr-xr-x 1 mike mike 2543608 Apr 19 2011 gprclean
-rwxr-xr-x 1 mike mike 7360543 Apr 19 2011 gprclean_debug
-rwxr-xr-x 1 mike mike 2366904 Apr 19 2011 gprconfig
-rwxr-xr-x 1 mike mike 6396679 Apr 19 2011 gprconfig_debug
-rwxr-xr-x 1 mike mike 621320 Apr 19 2011 gprof
-rwxr-xr-x 1 mike mike 1381 Jan 13 2011 gps
-rwxr-xr-x 1 mike mike 25557060 Jan 13 2011 gps_exe
-rwxr-xr-x 3 mike mike 212740 Apr 19 2011 i686-pc-linux-gnu-c++
-rwxr-xr-x 3 mike mike 212740 Apr 19 2011 i686-pc-linux-gnu-g++
-rwxr-xr-x 1 mike mike 209636 Apr 19 2011 i686-pc-linux-gnu-gcc
-rwxr-xr-x 1 mike mike 209636 Apr 19 2011 i686-pc-linux-gnu-gcc-4.5.3
-rwxr-xr-x 1 mike mike 996200 Apr 19 2011 objdump
Old 10-30-2012, 08:10 AM   #4
Senior Member
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
Two things here, first, after adding /usr/gnat/bin to PATH variable, once invoke:
% which gps

It will show you the full path of gps in output, i.e. /usr/gnat/bin. If it is, then everything is OK upto this step.

Second, could you once open the /usr/gnat/bin/gps file and share it's output (not all content, but few lines near line 61? To do this, do:
% cat /usr/gnat/bin/gps | nl

Actually, it now seems some variable declaration or script writing issue, which bash isn't able to handle. Also check what's gps script's execution path, I mean what mentioned in the first line in cat /usr/gnat/bin/gps file.. Is it #!/bin/bash or #!/bin/sh etc or something else?
Old 11-09-2012, 01:12 PM   #5
LQ Newbie
Registered: Oct 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Dont understand %

Been out of commission for a while.

I created a post a while back with all the stuff below. However, I evidently did something wrong since I cant see it.

I don't understand the "%" operator in your last post.

I tried to use it, but only generated errors.

So here is the script, the creation of the full path name is spread around and it is not large so the whole thing is below.

# .gps_wrapper
# Copyright 2002-2010 AdaCore

prog=`basename $0`
root=`dirname $0`

## Run with "gps debug ..." to run under the debugger
if [ $debug = debug ]; then

# Get absolute directory and strip 'bin' directory to retrieve real root
root=`cd $root/..; pwd`



if [ -d $root/lib/gps ]; then

if [ -f $root/etc/fonts/fonts.conf ]; then

if [ -f /etc/fonts/fonts.conf ]; then
if grep '<cachedir>' /etc/fonts/fonts.conf > /dev/null 2>&1; then

if [ -f $root/etc/pango/pangorc ]; then

if [ -f $root/etc/gtk-2.0/gdk-pixbuf.loaders ]; then

if [ "$CHARSET" = "" ]; then
export CHARSET

if [ $debug = debug ]; then
gdb -args $root/bin/${prog}_exe "$@"
exec $root/bin/${prog}_exe "$@"

Question will the shell indicate none-printing characters in some fashion??
Old 11-11-2012, 03:45 PM   #6
LQ Newbie
Registered: Oct 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Problem created another way

Had an idea. I had created an "hello world" c program on my desk top 10.10 system.
I copied it into /usr/gnat/bin on the netbook 12.04 system and then tried to run it.
First I got a permissions error, which I fixed. Then when I tried to run it, I got the same file not found error.

I copied the project directory into my working directory and had the same thing happen as shown below.

One other thing I remembered which might somehow have something to do with this. Before loading this version of GANT/GPS, I accidently loaded and installed an older version that was a 32 bit version. I un-installed it but it might have left some sort of incompatibility around.

As if you can't tell, I am really thrashing around with this.

mike@mike-netbook-ubuntu:~/Mike/How_To/How_To_GNU/How_To_GNAT/How_To_Start_and_Operate_GNAT-GPS$ cd GPS_tutorial_project_etc
mike@mike-netbook-ubuntu:~/Mike/How_To/How_To_GNU/How_To_GNAT/How_To_Start_and_Operate_GNAT-GPS/GPS_tutorial_project_etc$ ls
auto.cgpr default.gpr hello libsimple_c.deps simple_C.d
b__simple_C.adb example hello.adb sample.gpr simple_c.gpr example.adb hello.ali simple_C simple_C.o
b__simple_C.ali example.ali hello.cswi simple_C.bexch
b__simple_C.o example.cswi hello.o simple_C.c
debug example.o libsimple_c.a simple_C.cswi
mike@mike-netbook-ubuntu:~/Mike/How_To/How_To_GNU/How_To_GNAT/How_To_Start_and_Operate_GNAT-GPS/GPS_tutorial_project_etc$ simple_C
bash: /usr/gnat/bin/simple_C: No such file or directory
mike@mike-netbook-ubuntu:~/Mike/How_To/How_To_GNU/How_To_GNAT/How_To_Start_and_Operate_GNAT-GPS/GPS_tutorial_project_etc$ ../GPS_tutorial_project_etc/simple_C
bash: ../GPS_tutorial_project_etc/simple_C: Permission denied
mike@mike-netbook-ubuntu:~/Mike/How_To/How_To_GNU/How_To_GNAT/How_To_Start_and_Operate_GNAT-GPS/GPS_tutorial_project_etc$ chmod a +x simple_C
chmod: invalid mode: `a'
Try `chmod --help' for more information.
mike@mike-netbook-ubuntu:~/Mike/How_To/How_To_GNU/How_To_GNAT/How_To_Start_and_Operate_GNAT-GPS/GPS_tutorial_project_etc$ chmod a+x simple_C
mike@mike-netbook-ubuntu:~/Mike/How_To/How_To_GNU/How_To_GNAT/How_To_Start_and_Operate_GNAT-GPS/GPS_tutorial_project_etc$ ../GPS_tutorial_project_etc/simple_C
bash: ../GPS_tutorial_project_etc/simple_C: No such file or directory
Old 11-18-2012, 12:00 AM   #7
LQ Newbie
Registered: Oct 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled

Problem was running 32 bit code on 64bit O/S.

I thought I loaded a 64 bit compiler onto 12.04 64 bit. I did not.

The error message "file not found" was not the executable file invoked by the script, it was a DLL loader that could not be found.

Is that a great error message or what?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Ubuntu Hardware Summit 2011 | ODM Ubuntu Portal LXer Syndicated Linux News 0 12-10-2011 08:50 AM
LXer: Ubuntu Server Survey 2011 -- How do You Ubuntu? LXer Syndicated Linux News 0 01-17-2011 09:10 PM
GCC Compile with GNAT BlackLabel Linux - Desktop 0 12-14-2006 01:22 PM
Where has GNAT (Ada 95) compiler gone? sorvad Linux - Desktop 1 11-17-2006 05:47 AM
GNAT GPL: GPS doesn't keep settings Randux Programming 1 03-02-2006 11:38 AM

All times are GMT -5. The time now is 12:47 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration