comp.lang.ada
 help / color / mirror / Atom feed
* error running openGL/Ada demo from GLOBE_3D using GNAT 2012
@ 2012-07-14  6:47 Nasser M. Abbasi
  2012-07-14 14:16 ` gautier_niouzes
  0 siblings, 1 reply; 14+ messages in thread
From: Nasser M. Abbasi @ 2012-07-14  6:47 UTC (permalink / raw)



has anyone managed to run the demos Ada openGL demos in GLOBE3D?

I downloaded the latest GLOBE_3D from

http://sourceforge.net/projects/globe3d/

then went to the demo folder, and build using the linux gpr
file there. All went OK:

>gnatmake -P globe_3d_gps_linux.gpr

Now, I am following the direction in the .html that comes in the
above tar file, and when I try a demo, I get an errors:

-------------------------
>./mini

Execution terminated by unhandled exception
Exception name: GLOBE_3D.TEXTURES.UNDEFINED_TEXTURE_NAME
Message:  Texture: [face1]
Call stack traceback locations:
0x80cad1b 0x80b3fc1 0x80b41a4 0x80b379d 0x804ce2d

----------------------
>./globe_3d_demo

Execution terminated by unhandled exception
Exception name: GLOBE_3D.TEXTURES.UNDEFINED_TEXTURE_NAME
Message:  Texture: [face1]
Call stack traceback locations:
0x81858eb 0x8191a23 0x8191e91 0x818f932 0x804cf41

-----------------------
>./g3dem_tb

--------------------[ Unhandled exception ]-----------------
  > Name of exception . . . . .: GLOBE_3D.TEXTURES.UNDEFINED_TEXTURE_NAME
  > Message for exception . . .:  Texture: [face1]
  > Trace-back of call stack:
0x08185A07 globe_3d.textures.texture_id at globe_3d-textures.adb:239
0x08191B3F globe_3d_demo.create_objects.basic_face at globe_3d_demo.adb:281
0x08191FAD globe_3d_demo.create_objects at globe_3d_demo.adb:299
0x0818FA4E globe_3d_demo at globe_3d_demo.adb:1111
0x0819D43D g3dem_tb at tb_wrap.adb:13
0x0804D05F main at b~g3dem_tb.adb:537

0x08185A07 0x08191B3F 0x08191FAD 0x0818FA4E 0x0819D43D 0x0804D05F

-----------------------------------

I am on linux mint,
>uname -a
Linux me-VirtualBox 3.2.0-23-generic #36-Ubuntu

using GNAT 2012.  I do not understand the above error.

The function in the above .adb file is this (which generated
the error)

globe_3d-textures.adb:239

--------------------------------------
function Texture_ID( name: String ) return Image_ID is
     up_name: constant String:= To_Upper(name);
   begin
     return Texture_Name_Mapping.Element(
             texture_2d_infos.map,
             Ada.Strings.Unbounded.To_Unbounded_String(Trim(up_name,both)));
   exception
     when Constraint_Error =>
       raise Undefined_texture_name with " Texture: [" & Trim(name,both) & ']';
   end Texture_ID;
-------------------------

It seems like a configuration issue? May be I need to set
an environment variable or path or something for it to work?

thanks,
--Nasser



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: error running openGL/Ada demo from GLOBE_3D using GNAT 2012
  2012-07-14  6:47 error running openGL/Ada demo from GLOBE_3D using GNAT 2012 Nasser M. Abbasi
@ 2012-07-14 14:16 ` gautier_niouzes
  2012-07-14 17:59   ` Nasser M. Abbasi
  0 siblings, 1 reply; 14+ messages in thread
From: gautier_niouzes @ 2012-07-14 14:16 UTC (permalink / raw)
  Cc: nma

Hi Nasser,

> It seems like a configuration issue? May be I need to set
> an environment variable or path or something for it to work?

Either (1) the archive file "g3demo_global_resources.zip" is not in the same directory as the "mini" executable, or for (2) some reason the file "face1.bmp" is no more in the mentioned archive. If the archive file is broken, you would get another message.

I have improved the diagnostics (on the globe_3d repository version), and for the case (1) you would get now:
Execution terminated by unhandled exception
Exception name: GLOBE_3D.DATA_FILE_NOT_FOUND
Message: g3demo_global_resources.zip

Hope this helps
Gautier



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: error running openGL/Ada demo from GLOBE_3D using GNAT 2012
  2012-07-14 14:16 ` gautier_niouzes
@ 2012-07-14 17:59   ` Nasser M. Abbasi
  2012-07-14 19:40     ` gautier_niouzes
  0 siblings, 1 reply; 14+ messages in thread
From: Nasser M. Abbasi @ 2012-07-14 17:59 UTC (permalink / raw)


On 7/14/2012 9:16 AM, gautier_niouzes@hotmail.com wrote:
> Hi Nasser,
>
>> It seems like a configuration issue? May be I need to set
>> an environment variable or path or something for it to work?
>
> Either (1) the archive file "g3demo_global_resources.zip" is not in
>the same directory as the "mini" executable, or for (2) some reason the
>file "face1.bmp" is no more in the mentioned archive. If the archive
>file is broken, you would get another message.
>
> I have improved the diagnostics (on the globe_3d repository version), and for the case (1) you would get now:
> Execution terminated by unhandled exception
> Exception name: GLOBE_3D.DATA_FILE_NOT_FOUND
> Message: g3demo_global_resources.zip
>
> Hope this helps
> Gautier
>


hi  Gautier;

2 issues:

1) I had unziped those file before (I did not know) when I unzip
files, I unzip them and delete the zip files).

I restored the zip files, and run mini and now I get this error

----------------------------
>ls -lrt *.zip
-rwxrwxrwx 1 me me 2133918 Jul 14 12:49 g3demo_global_resources.zip
-rwxrwxrwx 1 me me 1489595 Jul 14 12:49 g3demo_level_resources.zip
>./mini
OpenGL Warning: XGetVisualInfo returned 0 visuals for 0x9d00de0
OpenGL Warning: Retry with 0x8002 returned 0 visuals

Execution terminated by unhandled exception
Exception name: STORAGE_ERROR
Message: stack overflow or erroneous memory access
Call stack traceback locations:
0x811d74e
>
-------------------------

any idea please?

btw, the file Face.bmp is there, but it is Face.bmp and
not face.bmp (i.e. lower case). I am on linux. Does this
make a difference? could this be the problem now?

------------------------
>ls -lrt Face*.bmp
-rwxrwxrwx 1 me me 5174 Apr 25  2006 Face1.bmp
-rwxrwxrwx 1 me me 5174 Apr 25  2006 Face3.bmp
>pwd
/ada_related/globe_3d_release_15_aug_2011/GLOBE_3D/demo/g3demo_global_resources
>
------------------------------------

I am mainly now interested is using the open GL binding
in Ada, since I assume your openGL binding here is newer than the other
open GL Ada binding in  http://adaopengl.sourceforge.net/  ?

2)
FYI; When I used gnat2012 switch (changed .gpr and changed from
gnat05 to gnat2012) I get compiler error. So I changed back to
gnat05


>gnatmake -P globe_3d_gps_linux.gpr
gcc -c -gnat2012 -gnato -fstack-check -gnatwkmpz -fno-strict-aliasing
-g -gnatVa -gnatecdebug.pra -gnatyhiknp -I-
-gnatA /ada_related/globe_3d_release_15_aug_2011/GLOBE_3D/src/unzip/unzip.adb

gcc -c -gnat2012 -gnato -fstack-check -gnatwkmpz -fno-strict-aliasing
-g -gnatVa -gnatecdebug.pra -gnatyhiknp -I-
-gnatA /ada_related/globe_3d_release_15_aug_2011/GLOBE_3D/src/unzip/unzip-streams.adb
unzip-decompress.ads:45:29: reserved word "some" cannot be used as identifier
unzip-decompress.ads:45:29: reserved word "some" cannot be used as identifier
gnatmake: "/ada_related/globe_3d_release_15_aug_2011/GLOBE_3D/src/unzip/unzip.adb" compilation error
gnatmake: "/ada_related/globe_3d_release_15_aug_2011/GLOBE_3D/src/unzip/unzip-streams.adb" compilation error
>

thanks,
--Nasser



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: error running openGL/Ada demo from GLOBE_3D using GNAT 2012
  2012-07-14 17:59   ` Nasser M. Abbasi
@ 2012-07-14 19:40     ` gautier_niouzes
  2012-07-14 19:56       ` Nasser M. Abbasi
  0 siblings, 1 reply; 14+ messages in thread
From: gautier_niouzes @ 2012-07-14 19:40 UTC (permalink / raw)
  Cc: nma

Le samedi 14 juillet 2012 19:59:09 UTC+2, Nasser M. Abbasi a écrit :

> hi  Gautier;
> 
> 2 issues:
> 
> 1) I had unziped those file before (I did not know) when I unzip
> files, I unzip them and delete the zip files).
> 
> I restored the zip files, and run mini and now I get this error
> 
> ----------------------------
> >ls -lrt *.zip
> -rwxrwxrwx 1 me me 2133918 Jul 14 12:49 g3demo_global_resources.zip
> -rwxrwxrwx 1 me me 1489595 Jul 14 12:49 g3demo_level_resources.zip
> >./mini
> OpenGL Warning: XGetVisualInfo returned 0 visuals for 0x9d00de0
> OpenGL Warning: Retry with 0x8002 returned 0 visuals
> 
> Execution terminated by unhandled exception
> Exception name: STORAGE_ERROR
> Message: stack overflow or erroneous memory access
> Call stack traceback locations:
> 0x811d74e
> >
> -------------------------
> 
> any idea please?

I have tested today latest changes on Windows 7 32 bit, Windows 7 64 bit, Ubuntu 10.04 32 bit without any issue.

> btw, the file Face.bmp is there, but it is Face.bmp and
> not face.bmp (i.e. lower case). I am on linux. Does this
> make a difference? could this be the problem now?

No, since the image files (and other data) are only read in the 2 Zip files, in a case-insensitive mode. At this stage the operating system has no control anymore on names and their case-[in]sensitiveness...
What happens when you run the Linux executable that is shipped with the whole stuff ? - I mean: ./globe3d_demo_linux ?

> ------------------------
> >ls -lrt Face*.bmp
> -rwxrwxrwx 1 me me 5174 Apr 25  2006 Face1.bmp
> -rwxrwxrwx 1 me me 5174 Apr 25  2006 Face3.bmp
> >pwd
> /ada_related/globe_3d_release_15_aug_2011/GLOBE_3D/demo/g3demo_global_resources
> >
> ------------------------------------
> 
> I am mainly now interested is using the open GL binding
> in Ada, since I assume your openGL binding here is newer than the other
> open GL Ada binding in  http://adaopengl.sourceforge.net/  ?

Sure. And it uses the modularity ([Gl.]Name) instead of glNAme of the flat macro-assembler model. And also uses name overloading, like Vector instead of glVector3i, for instance.

> 2)
> FYI; When I used gnat2012 switch (changed .gpr and changed from
> gnat05 to gnat2012) I get compiler error. So I changed back to
> gnat05
> 
> 
> >gnatmake -P globe_3d_gps_linux.gpr
> gcc -c -gnat2012 -gnato -fstack-check -gnatwkmpz -fno-strict-aliasing
> -g -gnatVa -gnatecdebug.pra -gnatyhiknp -I-
> -gnatA /ada_related/globe_3d_release_15_aug_2011/GLOBE_3D/src/unzip/unzip.adb
> 
> gcc -c -gnat2012 -gnato -fstack-check -gnatwkmpz -fno-strict-aliasing
> -g -gnatVa -gnatecdebug.pra -gnatyhiknp -I-
> -gnatA /ada_related/globe_3d_release_15_aug_2011/GLOBE_3D/src/unzip/unzip-streams.adb
> unzip-decompress.ads:45:29: reserved word "some" cannot be used as identifier
> unzip-decompress.ads:45:29: reserved word "some" cannot be used as identifier
> gnatmake: "/ada_related/globe_3d_release_15_aug_2011/GLOBE_3D/src/unzip/unzip.adb" compilation error
> gnatmake: "/ada_related/globe_3d_release_15_aug_2011/GLOBE_3D/src/unzip/unzip-streams.adb" compilation error
> >

Thanks for pointing that, I'll make the appropriate change!
Cheers
G.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: error running openGL/Ada demo from GLOBE_3D using GNAT 2012
  2012-07-14 19:40     ` gautier_niouzes
@ 2012-07-14 19:56       ` Nasser M. Abbasi
  2012-07-14 20:06         ` Nasser M. Abbasi
  0 siblings, 1 reply; 14+ messages in thread
From: Nasser M. Abbasi @ 2012-07-14 19:56 UTC (permalink / raw)


On 7/14/2012 2:40 PM, gautier_niouzes@hotmail.com wrote:
> Le samedi 14 juillet 2012 19:59:09 UTC+2, Nasser M. Abbasi a �crit :

> What happens when you run the Linux executable that is shipped with the
>whole stuff ? - I mean: ./globe3d_demo_linux ?

That is what I tried first time I downloaded the software, before
doing anything, but I get this error

-------------------------
>./globe_3d_demo_linux
./globe_3d_demo_linux: error while loading shared libraries: libgnat-4.4.so.1: cannot open shared object file: No such file or directory
>
-----------------------

THat is why I build things. I am using GNAT2012 on linux, not the earlier
gnat version. i.e. I downloaded gnat2012 from Libre and installed it.

>echo $LD_LIBRARY_PATH
/usr/lib/atlas-base/:/usr/lib/atlas-base/atlas/
>echo $LIBRARY_PATH
/usr/lib/i386-linux-gnu/
>which gnatmake
/usr/gnat/bin/gnatmake
>gnatmake -v

GNATMAKE GPL 2012 (20120509)

>sudo updatedb
[sudo] password for me:
>locate libgnat.so
/usr/gnat/lib/gcc/i686-pc-linux-gnu/4.5.4/rts-native/adalib/libgnat.so
/usr/lib/gcc/i686-linux-gnu/4.6/rts-native/adalib/libgnat.so
/usr/lib/i386-linux-gnu/libgnat.so
>

All my other gnatmake commands on my toy Ada programs compile
and run with no problem, so I assume all the paths and
env. variables I need to use Ada are ok as is, or do
you think I need a different env. variable in addition to
what I have to make your above program run?

thanks

--Nasser



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: error running openGL/Ada demo from GLOBE_3D using GNAT 2012
  2012-07-14 19:56       ` Nasser M. Abbasi
@ 2012-07-14 20:06         ` Nasser M. Abbasi
  2012-07-14 20:59           ` gautier_niouzes
  0 siblings, 1 reply; 14+ messages in thread
From: Nasser M. Abbasi @ 2012-07-14 20:06 UTC (permalink / raw)


On 7/14/2012 2:56 PM, Nasser M. Abbasi wrote:

> -------------------------
>> ./globe_3d_demo_linux
> ./globe_3d_demo_linux: error while loading shared libraries: libgnat-4.4.so.1: cannot open shared object file: No such file or directory
>>
> -----------------------
>
> THat is why I build things. I am using GNAT2012 on linux, not the earlier

Ok, this what I tried now, since the shared library linked to by your
program is different, I made a sym link. Now it runs, but a new error
comes up:

----------------------
>cd /usr/lib/i386-linux-gnu/
>ls -lrt libgnat*
-rw-r--r-- 1 root root 3073728 May  3 12:35 libgnat-4.6.so.1
lrwxrwxrwx 1 root root      16 May  3 12:36 libgnat-4.6.so -> libgnat-4.6.so.1

>sudo ln -s libgnat-4.6.so.1 libgnat-4.4.so.1
>ls -lrt libgnat*
-rw-r--r-- 1 root root 3073728 May  3 12:35 libgnat-4.6.so.1
lrwxrwxrwx 1 root root      16 May  3 12:36 libgnat-4.6.so -> libgnat-4.6.so.1
lrwxrwxrwx 1 root root      16 Jul 14 15:00 libgnat-4.4.so.1 -> libgnat-4.6.so.1
-------------------------

and run the demo again, now I get this error

------------------------------
>./globe_3d_demo_linux
./globe_3d_demo_linux: Symbol `system__restrictions__run_time_restrictions' has different size in shared object, consider re-linking
./globe_3d_demo_linux: Symbol `ada__strings__unbounded__unbounded_stringT' has different size in shared object, consider re-linking
./globe_3d_demo_linux: symbol lookup error: ./globe_3d_demo_linux: undefined symbol: __gnat_eh_personality
>
----------------------------------

btw, would it not be better to have those prebuild demo examples in the
distribution demo/ folder be build as static instead of shared? so
that to eliminate the shared library being different on each system.

I am no expert on this, but something to consider.

That is why I was trying to build the demo files myself. But
due to that texture error, can't run them.

thanks.
--Nasser




^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: error running openGL/Ada demo from GLOBE_3D using GNAT 2012
  2012-07-14 20:06         ` Nasser M. Abbasi
@ 2012-07-14 20:59           ` gautier_niouzes
  2012-07-14 21:29             ` Nasser M. Abbasi
  2012-07-15  3:44             ` Nasser M. Abbasi
  0 siblings, 2 replies; 14+ messages in thread
From: gautier_niouzes @ 2012-07-14 20:59 UTC (permalink / raw)
  Cc: nma

Nasser:

> btw, would it not be better to have those prebuild demo examples in the
> distribution demo/ folder be build as static instead of shared? so
> that to eliminate the shared library being different on each system.

I could not agree more! These are kind of things I am learning progressively, like the advantage of -static, on another project. Also kind of annoyances you don't know on less refined systems (I am used to a clunky, commercial one called Windows).

> I am no expert on this, but something to consider.

Absolutely, it solved lots of problems on that other project.

> That is why I was trying to build the demo files myself. But
> due to that texture error, can't run them.

I'm afraid you went past any problem with texture loading if you get that message (your post after having restored the .zip files):
 
"
OpenGL Warning: XGetVisualInfo returned 0 visuals for 0x9d00de0
OpenGL Warning: Retry with 0x8002 returned 0 visuals

Execution terminated by unhandled exception
Exception name: STORAGE_ERROR
Message: stack overflow or erroneous memory access
Call stack traceback locations:
0x811d74e 
"

It looks like an OpenGL issue with your Linux installation.
Perhaps a plain Ubuntu would help ? Everything fine with other OpenGL-based software ?...
G.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: error running openGL/Ada demo from GLOBE_3D using GNAT 2012
  2012-07-14 20:59           ` gautier_niouzes
@ 2012-07-14 21:29             ` Nasser M. Abbasi
  2012-07-15  3:44             ` Nasser M. Abbasi
  1 sibling, 0 replies; 14+ messages in thread
From: Nasser M. Abbasi @ 2012-07-14 21:29 UTC (permalink / raw)


On 7/14/2012 3:59 PM, gautier_niouzes@hotmail.com wrote:
> Nasser:

> It looks like an OpenGL issue with your Linux installation.
> Perhaps a plain Ubuntu would help ? Everything fine with other OpenGL-based software ?...
> G.
>

I am following instructions in

      GLOBE_3D/globe_3d_info.html

where it says

"As a prerequisite, you need the following libraries to
be installed: FreeGLUT, Xi, Xext, Xmu"

I have all of these. Instructions doe not give specific versions,
so I made sure all these libraries are on my linux system
(they must be, else it will not link)

Btw, there is no "FreeGLUT" library. There is freeglu3 .deb
package, which I have installed. It supplied /usr/lib/libglut.so

I have libGL.so, libGLU.so, libglut.so, libX11.so,
libXi.so, libXmu.so, libXext.so and libm.so

If there are more specific instructions as what versions
of libraries one needs, that would be better. For me to just
keep trying different linux distro and different libraries
by random in the hope it works, is not very productive way to
build something.

regards,
--Nasser









^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: error running openGL/Ada demo from GLOBE_3D using GNAT 2012
  2012-07-14 20:59           ` gautier_niouzes
  2012-07-14 21:29             ` Nasser M. Abbasi
@ 2012-07-15  3:44             ` Nasser M. Abbasi
  2012-07-15  5:14               ` gautier_niouzes
  1 sibling, 1 reply; 14+ messages in thread
From: Nasser M. Abbasi @ 2012-07-15  3:44 UTC (permalink / raw)


On 7/14/2012 3:59 PM, gautier_niouzes@hotmail.com wrote:

> I'm afraid you went past any problem with texture loading if you get that message (your post after having restored the .zip files):
>
> "
> OpenGL Warning: XGetVisualInfo returned 0 visuals for 0x9d00de0
> OpenGL Warning: Retry with 0x8002 returned 0 visuals
>
...
> It looks like an OpenGL issue with your Linux installation.

what constitute openGL?  i.e. which libraries make up what is called
'openGL' ?

I am used to seeing an architecture diagram for applications, as
building blocks, so I know what depends on what, and what libraries
make up what block in the diagram. The apps at the top, and blocks
below it, and such.

If I understand more the architecture used here, I might be able
to figure what is the problem with this binding in terms of
mismatched libraries.

Right now, I just have lots .so's that I installed from packages. But
I really do not know which of these is openGL and which is what. And
I do not know what versions. I just use linux mint package manager
to install things. I assume it knows the correct versions to install.

> Perhaps a plain Ubuntu would help ? Everything fine with other OpenGL-based software ?...

DO you have an example of what other openGL I can try? I never done openGL
before.

I do run your demos on windows, and they run with no problem. But
not on Linux mint as you can see.

regards,
--Nasser



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: error running openGL/Ada demo from GLOBE_3D using GNAT 2012
  2012-07-15  3:44             ` Nasser M. Abbasi
@ 2012-07-15  5:14               ` gautier_niouzes
  2012-07-15  5:54                 ` Nasser M. Abbasi
  0 siblings, 1 reply; 14+ messages in thread
From: gautier_niouzes @ 2012-07-15  5:14 UTC (permalink / raw)
  Cc: nma

> what constitute openGL?  i.e. which libraries make up what is called
> 'openGL' ?

http://en.wikipedia.org/wiki/OpenGL
http://www.opengl.org/

Obviously the needed libraries are installed, otherwise you would not have an executable. And it doesn't seem to have unresolved symbols in shared objects when startting mini.
Now from the error message:

"OpenGL Warning: XGetVisualInfo returned 0 visuals"

it seems OpenGL doesn't find any device to display on.
The back-end of OpenGL is dependent on your OS and your graphics hardware and virtualization layers.
Like most graphics-related issues, these are difficult ones.
By googling the above message, it seems correlated to VirtualBox and its configuration.

No clue of any other OpenGL example / test for Linux. Anyone ?...

G.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: error running openGL/Ada demo from GLOBE_3D using GNAT 2012
  2012-07-15  5:14               ` gautier_niouzes
@ 2012-07-15  5:54                 ` Nasser M. Abbasi
  2012-07-16  2:11                   ` gautier_niouzes
  0 siblings, 1 reply; 14+ messages in thread
From: Nasser M. Abbasi @ 2012-07-15  5:54 UTC (permalink / raw)


On 7/15/2012 12:14 AM, gautier_niouzes@hotmail.com wrote:
>> what constitute openGL?  i.e. which libraries make up what is called
>> 'openGL' ?
>
> http://en.wikipedia.org/wiki/OpenGL
> http://www.opengl.org/
>
> Obviously the needed libraries are installed, otherwise you
>  would not have an executable. And it doesn't seem to have unresolved
>symbols in shared objects when startting mini.

Sure, I know that, and I said before the link was fine.

> Now from the error message:
>
> "OpenGL Warning: XGetVisualInfo returned 0 visuals"
>
....
> By googling the above message, it seems correlated to VirtualBox and its configuration.
>

Ok, some good news, and some not good news. First, the good news.

Yes. the display issue was VBox issue with. I googled and find a solution. The
command to start the demo is

>LIBGL_ALWAYS_INDIRECT=1 ./mini

here is a screen shot, it is comes up OK:

http://12000.org/tmp/071512/globe3d.png

I found this solution at this page

https://forums.virtualbox.org/viewtopic.php?f=3&t=30964

by poster called scottku. (down the page) It seems the above disable
harxware acceleration. And that fixed the problem.

Now the bad news :) For the other demo, globe_3d_demo_linux, the
above trick does not work. The error is a build error. Even
though I did gnatclean few times and rebuild things again
and again.

>LIBGL_ALWAYS_INDIRECT=1 ./globe_3d_demo_linux

./globe_3d_demo_linux: Symbol `system__restrictions__run_time_restrictions' has different size in shared object, consider re-linking

./globe_3d_demo_linux: Symbol `ada__strings__unbounded__unbounded_stringT' has different size in shared object, consider re-linking

./globe_3d_demo_linux: symbol lookup error: ./globe_3d_demo_linux: undefined symbol: __gnat_eh_personality

I do not know why mini demo works OK, but not this one. So, I think
there is still a library issue here?

I am using your gpr with no changes to it (i.e. gnat05).

Thanks for your help. May be some progress was made.
  
At least now, I can try to make a small Ada openGL program myself
to see how it works.

regards,
--Nasser



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: error running openGL/Ada demo from GLOBE_3D using GNAT 2012
  2012-07-15  5:54                 ` Nasser M. Abbasi
@ 2012-07-16  2:11                   ` gautier_niouzes
  2012-07-16  2:21                     ` Nasser M. Abbasi
  0 siblings, 1 reply; 14+ messages in thread
From: gautier_niouzes @ 2012-07-16  2:11 UTC (permalink / raw)
  Cc: nma

Hi Nasser!

> Now the bad news :) For the other demo, globe_3d_demo_linux, the
> above trick does not work. The error is a build error. Even
> though I did gnatclean few times and rebuild things again
> and again.
> 
> >LIBGL_ALWAYS_INDIRECT=1 ./globe_3d_demo_linux
> 
> ./globe_3d_demo_linux: Symbol `system__restrictions__run_time_restrictions' has different size in shared object, consider re-linking
> 
> ./globe_3d_demo_linux: Symbol `ada__strings__unbounded__unbounded_stringT' has different size in shared object, consider re-linking
> 
> ./globe_3d_demo_linux: symbol lookup error: ./globe_3d_demo_linux: undefined symbol: __gnat_eh_personality
> 
> I do not know why mini demo works OK, but not this one. So, I think
> there is still a library issue here?

The executable freshly built is called "globe_3d_demo".
Unless you've renamed it, "globe_3d_demo_linux" is still the old 2011 file with fragile shared object linking :-) .

NB: the .gpr for next release has now "-static", so you would not get this message in a similar situation.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: error running openGL/Ada demo from GLOBE_3D using GNAT 2012
  2012-07-16  2:11                   ` gautier_niouzes
@ 2012-07-16  2:21                     ` Nasser M. Abbasi
  2012-07-16  9:07                       ` gautier_niouzes
  0 siblings, 1 reply; 14+ messages in thread
From: Nasser M. Abbasi @ 2012-07-16  2:21 UTC (permalink / raw)


On 7/15/2012 9:11 PM, gautier_niouzes@hotmail.com wrote:

> The executable freshly built is called "globe_3d_demo".
> Unless you've renamed it, "globe_3d_demo_linux" is still the
>old 2011 file with fragile shared object linking :-) .
>

Yep, that was it! I was running the linux executable, as I assumed that
is what is being build, being on linux.

You might want to change the .gpr so that when it builds the demos, it
still makes a  _linux version of the demos and _win version (when on windows)
just to be consistent with the orginal file names as they came with the
package.

But now both demos are working ok on Linux. Thanks for your help.

> NB: the .gpr for next release has now "-static", so you would not
>get this message in a similar situation.
>

Yes, static build would be better. thanks.

--Nasser
  





^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: error running openGL/Ada demo from GLOBE_3D using GNAT 2012
  2012-07-16  2:21                     ` Nasser M. Abbasi
@ 2012-07-16  9:07                       ` gautier_niouzes
  0 siblings, 0 replies; 14+ messages in thread
From: gautier_niouzes @ 2012-07-16  9:07 UTC (permalink / raw)
  Cc: nma

Le lundi 16 juillet 2012 04:21:51 UTC+2, Nasser M. Abbasi a écrit :

> You might want to change the .gpr so that when it builds the demos, it
> still makes a  _linux version of the demos and _win version (when on windows)
> just to be consistent with the orginal file names as they came with the
> package.

I do. It is an excellent idea. How can I do that, in order to have "globe_3d_demo" -> "globe_3d_demo_linux" ? With a "-o" build (gnatmake) option it would give the same name to all executables, I guess. Well, I could have only one "main" for the "Small" build scenario which is there for shipping anyway.

> But now both demos are working ok on Linux. Thanks for your help.

You are welcome, and sorry for the confusion(s).
Gautier



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2012-07-22 23:27 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-14  6:47 error running openGL/Ada demo from GLOBE_3D using GNAT 2012 Nasser M. Abbasi
2012-07-14 14:16 ` gautier_niouzes
2012-07-14 17:59   ` Nasser M. Abbasi
2012-07-14 19:40     ` gautier_niouzes
2012-07-14 19:56       ` Nasser M. Abbasi
2012-07-14 20:06         ` Nasser M. Abbasi
2012-07-14 20:59           ` gautier_niouzes
2012-07-14 21:29             ` Nasser M. Abbasi
2012-07-15  3:44             ` Nasser M. Abbasi
2012-07-15  5:14               ` gautier_niouzes
2012-07-15  5:54                 ` Nasser M. Abbasi
2012-07-16  2:11                   ` gautier_niouzes
2012-07-16  2:21                     ` Nasser M. Abbasi
2012-07-16  9:07                       ` gautier_niouzes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox