* Installing AdaSDL to a Debian system
@ 2017-03-27 6:19 LaeMing Ai
2017-03-27 7:43 ` Björn Lundin
` (3 more replies)
0 siblings, 4 replies; 11+ messages in thread
From: LaeMing Ai @ 2017-03-27 6:19 UTC (permalink / raw)
Hi,
I have GNAT+GPS installed on my Debian/Testing system via apt.
I have AdaSDL sources downloaded to a directory in my user space.
AdaSDL seems to have compiled fine following the included instructions - I have a .../build/gnat/gen/static.release/lib/ folder full of .ali files.
How do I get these into the GNAT build chain?
# sudo make SDL_PLATFORM=linux SDL_BUILD=static SDL_MODE=release DESTDIT=/usr/lib/gcc/x86_64-linux-gnu/6/ install
doesn't appear to work. Nothing shows up in the expected place.
I manually copied the .ali files and libsdlada.a across to
/usr/lib/gcc/x86_64-linux-gnu/6/adalib/
and the source .adb and .ads files across to
/usr/lib/gcc/x86_64-linux-gnu/6/adainclude/
....
-- Test code:
with SDL;
with SDL.Error;
with SDL.Events.Events;
with SDL.Events.Keyboards;
with SDL.Events.Joysticks;
with SDL.Inputs.Joysticks.Makers;
with SDL.Inputs.Joysticks.Game_Controllers;
with SDL.Events.Mice;
with SDL.Log;
with SDL.Video.Windows;
with SDL.Video.Windows.Makers;
with SDL.Video.Windows.Manager;
with SDL.Versions;
with System;
procedure Main is
begin
-- Insert code here.
null;
end Main;
....
results in:
gprbuild -d -P/home/laeming/adasdltest/test.gpr
gnatgcc -c main.adb
gprbind main.bexch
gnatbind main.ali
gnatgcc -c b__main.adb
gnatgcc main.o -o main
b__main.o: In function `ada_main__finalize_library':
b__main.adb:(.text+0x7): undefined reference to `sdl__inputs__joysticks__game_controllers_E'
b__main.adb:(.text+0x11): undefined reference to `sdl__inputs__joysticks__game_controllers_E'
b__main.adb:(.text+0x16): undefined reference to `sdl__inputs__joysticks__game_controllers__finalize_spec'
b__main.adb:(.text+0x1d): undefined reference to `sdl__inputs__joysticks_E'
b__main.adb:(.text+0x27): undefined reference to `sdl__inputs__joysticks_E'
b__main.adb:(.text+0x2c): undefined reference to `sdl__inputs__joysticks__finalize_spec'
b__main.adb:(.text+0x33): undefined reference to `sdl__video__windows_E'
b__main.adb:(.text+0x3d): undefined reference to `sdl__video__windows_E'
b__main.adb:(.text+0x42): undefined reference to `sdl__video__windows__finalize_spec'
b__main.adb:(.text+0x49): undefined reference to `sdl__video__surfaces_E'
b__main.adb:(.text+0x53): undefined reference to `sdl__video__surfaces_E'
b__main.adb:(.text+0x58): undefined reference to `sdl__video__surfaces__finalize_spec'
b__main.adb:(.text+0x5f): undefined reference to `sdl__video__palettes_E'
b__main.adb:(.text+0x69): undefined reference to `sdl__video__palettes_E'
b__main.adb:(.text+0x6e): undefined reference to `sdl__video__palettes__finalize_body'
b__main.adb:(.text+0x73): undefined reference to `sdl__video__palettes__finalize_spec'
b__main.adb:(.text+0x7a): undefined reference to `sdl__log_E'
b__main.adb:(.text+0x84): undefined reference to `sdl__log_E'
b__main.adb:(.text+0x89): undefined reference to `sdl__log__finalize_spec'
b__main.o: In function `adainit':
b__main.adb:(.text+0x3eb): undefined reference to `sdl_E'
b__main.adb:(.text+0x3f5): undefined reference to `sdl_E'
b__main.adb:(.text+0x3fc): undefined reference to `sdl__error_E'
b__main.adb:(.text+0x406): undefined reference to `sdl__error_E'
b__main.adb:(.text+0x40b): undefined reference to `sdl__log___elabs'
b__main.adb:(.text+0x412): undefined reference to `sdl__log_E'
b__main.adb:(.text+0x41c): undefined reference to `sdl__log_E'
b__main.adb:(.text+0x421): undefined reference to `sdl__versions___elabs'
b__main.adb:(.text+0x428): undefined reference to `sdl__versions_E'
b__main.adb:(.text+0x432): undefined reference to `sdl__versions_E'
b__main.adb:(.text+0x437): undefined reference to `sdl__video___elabs'
b__main.adb:(.text+0x43e): undefined reference to `sdl__video_E'
b__main.adb:(.text+0x448): undefined reference to `sdl__video_E'
b__main.adb:(.text+0x44d): undefined reference to `sdl__video__palettes___elabs'
b__main.adb:(.text+0x452): undefined reference to `sdl__video__palettes___elabb'
b__main.adb:(.text+0x459): undefined reference to `sdl__video__palettes_E'
b__main.adb:(.text+0x463): undefined reference to `sdl__video__palettes_E'
b__main.adb:(.text+0x468): undefined reference to `sdl__video__pixel_formats___elabs'
b__main.adb:(.text+0x46f): undefined reference to `sdl__video__pixel_formats_E'
b__main.adb:(.text+0x479): undefined reference to `sdl__video__pixel_formats_E'
b__main.adb:(.text+0x47e): undefined reference to `sdl__video__rectangles___elabs'
b__main.adb:(.text+0x485): undefined reference to `sdl__video__rectangles_E'
b__main.adb:(.text+0x48f): undefined reference to `sdl__video__rectangles_E'
b__main.adb:(.text+0x496): undefined reference to `sdl__video__displays_E'
b__main.adb:(.text+0x4a0): undefined reference to `sdl__video__displays_E'
b__main.adb:(.text+0x4a5): undefined reference to `sdl__video__surfaces___elabs'
b__main.adb:(.text+0x4ac): undefined reference to `sdl__video__surfaces_E'
b__main.adb:(.text+0x4b6): undefined reference to `sdl__video__surfaces_E'
b__main.adb:(.text+0x4bb): undefined reference to `sdl__video__windows___elabs'
b__main.adb:(.text+0x4c2): undefined reference to `sdl__video__windows_E'
b__main.adb:(.text+0x4cc): undefined reference to `sdl__video__windows_E'
b__main.adb:(.text+0x4d3): undefined reference to `sdl__events__joysticks_E'
b__main.adb:(.text+0x4dd): undefined reference to `sdl__events__joysticks_E'
b__main.adb:(.text+0x4e4): undefined reference to `sdl__events__joysticks__game_controllers_E'
b__main.adb:(.text+0x4ee): undefined reference to `sdl__events__joysticks__game_controllers_E'
b__main.adb:(.text+0x4f5): undefined reference to `sdl__events__keyboards_E'
b__main.adb:(.text+0x4ff): undefined reference to `sdl__events__keyboards_E'
b__main.adb:(.text+0x506): undefined reference to `sdl__events__events_E'
b__main.adb:(.text+0x510): undefined reference to `sdl__events__events_E'
b__main.adb:(.text+0x515): undefined reference to `sdl__inputs__joysticks___elabs'
b__main.adb:(.text+0x51c): undefined reference to `sdl__inputs__joysticks_E'
b__main.adb:(.text+0x526): undefined reference to `sdl__inputs__joysticks_E'
b__main.adb:(.text+0x52b): undefined reference to `sdl__inputs__joysticks__game_controllers___elabs'
b__main.adb:(.text+0x532): undefined reference to `sdl__inputs__joysticks__game_controllers_E'
b__main.adb:(.text+0x53c): undefined reference to `sdl__inputs__joysticks__game_controllers_E'
b__main.adb:(.text+0x543): undefined reference to `sdl__inputs__joysticks__makers_E'
b__main.adb:(.text+0x54d): undefined reference to `sdl__inputs__joysticks__makers_E'
b__main.adb:(.text+0x554): undefined reference to `sdl__video__windows__makers_E'
b__main.adb:(.text+0x55e): undefined reference to `sdl__video__windows__makers_E'
b__main.adb:(.text+0x565): undefined reference to `sdl__video__windows__manager_E'
b__main.adb:(.text+0x56f): undefined reference to `sdl__video__windows__manager_E'
collect2: error: ld returned 1 exit status
gprbuild: link of main.adb failed
[2017-03-27 17:14:00] process exited with status 4, elapsed time: 00.62s
Obviously I have missed something, likely because I ended up trying to do a manual install. Any help appreciated!
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Installing AdaSDL to a Debian system
2017-03-27 6:19 Installing AdaSDL to a Debian system LaeMing Ai
@ 2017-03-27 7:43 ` Björn Lundin
2017-03-27 8:07 ` Luke A. Guest
` (2 subsequent siblings)
3 siblings, 0 replies; 11+ messages in thread
From: Björn Lundin @ 2017-03-27 7:43 UTC (permalink / raw)
On 2017-03-27 08:19, LaeMing Ai wrote:
> results in:
>
> gprbuild -d -P/home/laeming/adasdltest/test.gpr
> gnatgcc -c main.adb
> gprbind main.bexch
> gnatbind main.ali
> gnatgcc -c b__main.adb
> gnatgcc main.o -o main
> b__main.o: In function `ada_main__finalize_library':
> b__main.adb:(.text+0x7): undefined reference to `sdl__inputs__joysticks__game_controllers_E'
> b__main.adb:(.text+0x11): undefined reference to `sdl__inputs__joysticks__game_controllers_E'
...
> collect2: error: ld returned 1 exit status
> gprbuild: link of main.adb failed
> [2017-03-27 17:14:00] process exited with status 4, elapsed time: 00.62s
>
>
> Obviously I have missed something, likely because I ended up trying to do a manual install. Any help appreciated!
>
you need -largs -lsdl
or a
package Linker is
for Default_Switches ("Ada") use ("-lsdl");
end Linker;
--
--
Björn
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Installing AdaSDL to a Debian system
2017-03-27 6:19 Installing AdaSDL to a Debian system LaeMing Ai
2017-03-27 7:43 ` Björn Lundin
@ 2017-03-27 8:07 ` Luke A. Guest
2017-04-02 6:39 ` LaeMing Ai
2017-04-05 8:32 ` LaeMing Ai
3 siblings, 0 replies; 11+ messages in thread
From: Luke A. Guest @ 2017-03-27 8:07 UTC (permalink / raw)
LaeMing Ai <laeming@exemail.com.au> wrote:
> Hi,
>
> I have GNAT+GPS installed on my Debian/Testing system via apt.
>
> I have AdaSDL sources downloaded to a directory in my user space.
>
> AdaSDL seems to have compiled fine following the included instructions -
> I have a .../build/gnat/gen/static.release/lib/ folder full of .ali files.
>
> How do I get these into the GNAT build chain?
>
> # sudo make SDL_PLATFORM=linux SDL_BUILD=static SDL_MODE=release
> DESTDIT=/usr/lib/gcc/x86_64-linux-gnu/6/ install
> given you haven't typo, I assume your using my bindings which is SDLAda,
> AdaSDL is some else's SDL 1.x bindings.
> doesn't appear to work. Nothing shows up in the expected place.
>
Above should be DESTDIR.
> Obviously I have missed something, likely because I ended up trying to do
> a manual install. Any help appreciated!
>
You need to execute sdl2-config --libs in back ticks on nix, I don't know
how you call that in windows, I can't remember.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Installing AdaSDL to a Debian system
2017-03-27 6:19 Installing AdaSDL to a Debian system LaeMing Ai
2017-03-27 7:43 ` Björn Lundin
2017-03-27 8:07 ` Luke A. Guest
@ 2017-04-02 6:39 ` LaeMing Ai
2017-04-02 8:15 ` Jeffrey R. Carter
2017-04-03 14:47 ` Lucretia
2017-04-05 8:32 ` LaeMing Ai
3 siblings, 2 replies; 11+ messages in thread
From: LaeMing Ai @ 2017-04-02 6:39 UTC (permalink / raw)
Thanks for assistance so far.
I ended up getting SDL working in C enough to realise it is still too high level for what I want to achieve anyway. :-/
Moving on to X11ada...
(oh for the days when video was just a block of RAM you had all to yourself! ;-)
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Installing AdaSDL to a Debian system
2017-04-02 6:39 ` LaeMing Ai
@ 2017-04-02 8:15 ` Jeffrey R. Carter
2017-04-03 7:01 ` LaeMing Ai
2017-04-03 14:47 ` Lucretia
1 sibling, 1 reply; 11+ messages in thread
From: Jeffrey R. Carter @ 2017-04-02 8:15 UTC (permalink / raw)
On 04/02/2017 08:39 AM, LaeMing Ai wrote:
>
> (oh for the days when video was just a block of RAM you had all to yourself! ;-)
Presumably it still is:
http://www.freedos.org/
--
Jeff Carter
"Saving keystrokes is the job of the text editor,
not the programming language."
Preben Randhol
64
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Installing AdaSDL to a Debian system
2017-04-02 8:15 ` Jeffrey R. Carter
@ 2017-04-03 7:01 ` LaeMing Ai
0 siblings, 0 replies; 11+ messages in thread
From: LaeMing Ai @ 2017-04-03 7:01 UTC (permalink / raw)
On Sunday, 2 April 2017 18:15:59 UTC+10, Jeffrey R. Carter wrote:
> On 04/02/2017 08:39 AM, LaeMing Ai wrote:
> >
> > (oh for the days when video was just a block of RAM you had all to yourself! ;-)
>
> Presumably it still is:
>
> http://www.freedos.org/
>
> --
> Jeff Carter
> "Saving keystrokes is the job of the text editor,
> not the programming language."
> Preben Randhol
> 64
Heh. Ironically(?) if I didn't want to keep X11 going to use the GPS IDE during development, I could just take over the raw Linux frame buffer.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Installing AdaSDL to a Debian system
2017-04-02 6:39 ` LaeMing Ai
2017-04-02 8:15 ` Jeffrey R. Carter
@ 2017-04-03 14:47 ` Lucretia
2017-04-04 2:44 ` LaeMing Ai
1 sibling, 1 reply; 11+ messages in thread
From: Lucretia @ 2017-04-03 14:47 UTC (permalink / raw)
On Sunday, 2 April 2017 07:39:10 UTC+1, LaeMing Ai wrote:
> Thanks for assistance so far.
>
> I ended up getting SDL working in C enough to realise it is still too high level for what I want to achieve anyway. :-/
>
> Moving on to X11ada...
You're not making any sense. If C is too high level, WTF are you posting on comp.lang.ada? Ada is a high level language with low level access to things. What I posted was a way to get at the pixel data in 1 and 2 dimensions, that is what you wanted.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Installing AdaSDL to a Debian system
2017-04-03 14:47 ` Lucretia
@ 2017-04-04 2:44 ` LaeMing Ai
2017-04-04 4:17 ` LaeMing Ai
0 siblings, 1 reply; 11+ messages in thread
From: LaeMing Ai @ 2017-04-04 2:44 UTC (permalink / raw)
On Tuesday, 4 April 2017 00:47:10 UTC+10, Lucretia wrote:
> On Sunday, 2 April 2017 07:39:10 UTC+1, LaeMing Ai wrote:
> > Thanks for assistance so far.
> >
> > I ended up getting SDL working in C enough to realise it is still too high level for what I want to achieve anyway. :-/
> >
> > Moving on to X11ada...
>
> You're not making any sense. If C is too high level, WTF are you posting on comp.lang.ada? Ada is a high level language with low level access to things. What I posted was a way to get at the pixel data in 1 and 2 dimensions, that is what you wanted.
SDL is too high level - doesn't seem to support raw pixel manipulation without excessive hoop-jumping.
C is portable machine code. I can write stuff in it when I have to, but am rather keen on using Ada where possible.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Installing AdaSDL to a Debian system
2017-04-04 2:44 ` LaeMing Ai
@ 2017-04-04 4:17 ` LaeMing Ai
2017-04-04 5:52 ` LaeMing Ai
0 siblings, 1 reply; 11+ messages in thread
From: LaeMing Ai @ 2017-04-04 4:17 UTC (permalink / raw)
I am now looking into directly writing to the Linux Framebuffer (either on a secondary monitor, on on a second cable into my primary so I can 'channel switch' between the dev environment and my program output).
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Installing AdaSDL to a Debian system
2017-04-04 4:17 ` LaeMing Ai
@ 2017-04-04 5:52 ` LaeMing Ai
0 siblings, 0 replies; 11+ messages in thread
From: LaeMing Ai @ 2017-04-04 5:52 UTC (permalink / raw)
Turns out what I want is one of these: http://doc.qt.io/qt-4.8/qvfb.html (Though obviously not in QT). I think I can munge a hardware-simulation of one together as per the above post.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Installing AdaSDL to a Debian system
2017-03-27 6:19 Installing AdaSDL to a Debian system LaeMing Ai
` (2 preceding siblings ...)
2017-04-02 6:39 ` LaeMing Ai
@ 2017-04-05 8:32 ` LaeMing Ai
3 siblings, 0 replies; 11+ messages in thread
From: LaeMing Ai @ 2017-04-05 8:32 UTC (permalink / raw)
I have done some thinking and some redesign and I am determined to have another go at SDL with Ada.
So far:
SDL itself is (AFAIK )installed:
# sdl2-config --libs
returns
-L/usr/lib/x86_64-linux-gnu -lSDL2
I (believe I have successfully) installed sdlada with this command line:
sudo make SDL_PLATFORM=linux SDL_BUILD=static SDL_MODE=release DESTDIR=/usr/lib/x86_64-linux-gnu/ada/adalib/ install
(Note: in the sdlada readme there is a typo: DESTDIR is DESTDIT)
It installs in the expected place: /usr/lib/x86_64-linux-gnu/ada/adalib/sdlada/ contains folders: 'include', 'lib' and 'share' and their contents.
The question now is... What next?
How do I tell GPS to use the installed libraries?
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2017-04-05 8:32 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-27 6:19 Installing AdaSDL to a Debian system LaeMing Ai
2017-03-27 7:43 ` Björn Lundin
2017-03-27 8:07 ` Luke A. Guest
2017-04-02 6:39 ` LaeMing Ai
2017-04-02 8:15 ` Jeffrey R. Carter
2017-04-03 7:01 ` LaeMing Ai
2017-04-03 14:47 ` Lucretia
2017-04-04 2:44 ` LaeMing Ai
2017-04-04 4:17 ` LaeMing Ai
2017-04-04 5:52 ` LaeMing Ai
2017-04-05 8:32 ` LaeMing Ai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox