Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Unable to activate the allegro system

This thread is locked; no one can reply to it. rss feed Print
Unable to activate the allegro system
Myrdos
Member #1,772
December 2001

I'm having some trouble running allegro programs under linux. I get the error:

Quote:

Fatal error: unable to activate the Allegro system
Unable to find a usable VT

I created an allegro.cfg file and added:

[system]
system = XWIN

The only effect this had was to shorten the error to:

Quote:

Fatal error: unable to activate the Allegro system

The crash seems to occur right when I call allegro_init(); This confuses me, because "Unable to find a usable VT" seems to imply it's trying to initialize graphics? Or what? Here's my program:

#include "allegro.h"

int main(int argc,
         char* argv[])
{
  allegro_init();

  return 0;
}//main
END_OF_MAIN()

The build doc for unix said:

On initialisation, Allegro will try to connect to an X server. If it can't find one, it will give up and try to use some different system driver instead (such as the Linux console).

This must be what is happening, because I originally got:

Quote:

Unable to open /dev/console: Permission denied

...until I ran chmod a+rw /dev/console

And the FINAL CLUE is:

Evert said:

"Right. Install the X11 development libraries, then reconfigure and recompile Allegro."

I've been searching for them here, any idea what their file name(s) might be?

I'm running Debian Linux Sarge, with kernel 2.4.27 Any help or ideas would be very appreciated!

__________________________________________________

Evert
Member #794
November 2000
avatar

I would expect to find x11-devel, but that's not listed. Maybe Debian uses different application names.
Doesn't Debian come with a graphical installer where you can just tell it to get some package? Or is Debian the one where you could do `apt-get x11-devel' from the commandline and it'd work?

CGamesPlay
Member #2,559
July 2002
avatar

x11-dev? xfree86-dev? I think debian uses "dev" rather than "devel" in any case.

Yes, debian uses apt, and that would work.

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>

Myrdos
Member #1,772
December 2001

After more searching, I found this:
http://packages.debian.org/testing/libs/liballegro4.1
Wow! It had never occurred to me that Debian might actually have an Allegro package. I mean, an OS with built-in Allegro support.8-)

I'm going to give it a shot with apt-get as soon as I get home.

__________________________________________________

Evert
Member #794
November 2000
avatar

Hehe... actually, all (major) Linux distributions ship with Allegro. :)

Myrdos
Member #1,772
December 2001

I had no idea Allegro was so widely accepted!

Anyways, after more confusion, I discovered that these are the actual packages that should be installed:
http://packages.debian.org/testing/libdevel/liballegro-dev
http://packages.debian.org/testing/doc/liballegro-doc
http://packages.debian.org/testing/utils/allegro-examples

And this is the command that will automagically retrieve and install them (as root):
apt-get install liballegro-dev liballegro-doc allegro-examples

I wonder if it would be worthwhile to add this information to the file page or the unix build doc? Might save Debian users a lot of hassle.

__________________________________________________

Elias
Member #358
May 2000

To compile Allegro for X11 from sources, you just need this:

apt-get install libx11-dev

And to use hardware cursor support, this:

apt-get install libxcursor-dev

And so on for other optional drivers, like sound drivers. If someone creates a list of devel packages needed for various distributions, we could add it to docs/build/unix.txt. Maybe I get around to doing it for Debian..

--
"Either help out or stop whining" - Evert

Myrdos
Member #1,772
December 2001

Quote:

If someone creates a list of devel packages needed for various distributions

I'm a newcomer to Debian, but I'm not sure if that's necessary? All Debian packages list any other packages they require to work properly. For example, liballegro-dev requires liballegro4.1, libx11-dev, libxext-dev, libxpm-dev, xlibs-static-dev and xlibs-static-pic.

You can get similar info for the other packages by clicking on the above links, but I believe that Debian handles all of this for you. When I did a 'man apt-get', I got:

Quote:

install is followed by one or more packages desired for installation. Each package is a package name, not a fully qualified filename (for instance, in a Debian GNU/Linux system, libc6 would be the argument provided, not libc6_1.9.6-2.deb) All packages required by the package(s) specified for installation will also be retrieved and installed.

I have yet to try this out though, because I already had all the required libs. But if my understanding is right, the only line a Debian user should ever have to run is:
apt-get install liballegro-dev liballegro-doc allegro-examples

[EDIT] Huzzah! Here's a log of an allegro install on my server machine:

1TheBox:~# apt-get update
2Get:1 http://security.debian.org testing/updates/main Packages [2541B]
3Get:2 http://security.debian.org testing/updates/main Release [111B]
4Get:3 ftp://mirror.cpsc.ucalgary.ca testing/main Packages [3145kB]
5Get:4 ftp://mirror.cpsc.ucalgary.ca testing/main Release [81B]
6Get:5 ftp://mirror.cpsc.ucalgary.ca testing/main Sources [1250kB]
7Get:6 ftp://mirror.cpsc.ucalgary.ca testing/main Release [83B]
8Fetched 4398kB in 15s (275kB/s)
9Reading Package Lists... Done
10Building Dependency Tree... Done
11TheBox:~# apt-get install liballegro-dev liballegro-doc allegro-examples
12Reading Package Lists... Done
13Building Dependency Tree... Done
14The following extra packages will be installed:
15 autoconf debconf debconf-i18n defoma dialog fontconfig liballegro4.1 libasound2 libc6 libc6-dev libdb1-compat libdb4.2
16 libexpat1 libfontconfig1 libfreetype6 libgdbm3 libice6 liblocale-gettext-perl libncursesw5 libnewt0.51 libpopt0 libsm6
17 libtext-charwidth-perl libtext-iconv-perl libtext-wrapi18n-perl libx11-6 libx11-dev libxext-dev libxext6 libxft1
18 libxi-dev libxi6 libxmu6 libxmuu1 libxp6 libxpm-dev libxpm4 libxrandr2 libxrender1 libxt6 libxtrap6 libxtst6 libxv-dev
19 libxv1 linux-kernel-headers locales perl perl-base perl-modules slang1a-utf8 ttf-bitstream-vera ucf whiptail x-dev
20 xfree86-common xlibs xlibs-data xlibs-static-dev xlibs-static-pic zlib1g zlib1g-dev
21The following packages will be REMOVED:
22 autoconf2.13 libnss-db
23The following NEW packages will be installed:
24 allegro-examples debconf-i18n defoma dialog fontconfig liballegro-dev liballegro-doc liballegro4.1 libasound2
25 libdb1-compat libdb4.2 libexpat1 libfontconfig1 libgdbm3 libice6 liblocale-gettext-perl libncursesw5 libnewt0.51 libsm6
26 libtext-charwidth-perl libtext-iconv-perl libtext-wrapi18n-perl libx11-6 libx11-dev libxext-dev libxext6 libxft1
27 libxi-dev libxi6 libxmu6 libxmuu1 libxp6 libxpm-dev libxpm4 libxrandr2 libxrender1 libxt6 libxtrap6 libxtst6 libxv-dev
28 libxv1 linux-kernel-headers slang1a-utf8 ttf-bitstream-vera ucf x-dev xlibs-data xlibs-static-dev xlibs-static-pic
29 zlib1g-dev
3014 packages upgraded, 50 newly installed, 2 to remove and 169 not upgraded.
31Need to get 34.9MB of archives. After unpacking 62.8MB will be used.
32Do you want to continue? [Y/n] Y
33Get:1 ftp://mirror.cpsc.ucalgary.ca testing/main libdb1-compat 2.1.3-7 [30.8kB]
34Get:2 ftp://mirror.cpsc.ucalgary.ca testing/main libc6-dev 2.3.2.ds1-18 [2531kB]
35Get:3 ftp://mirror.cpsc.ucalgary.ca testing/main linux-kernel-headers 2.5.999-test7-bk-16 [1377kB]
36Get:4 ftp://mirror.cpsc.ucalgary.ca testing/main locales 2.3.2.ds1-18 [3981kB]
37Get:5 ftp://mirror.cpsc.ucalgary.ca testing/main libc6 2.3.2.ds1-18 [4921kB]
38Get:6 ftp://mirror.cpsc.ucalgary.ca testing/main autoconf 2.59-8 [766kB]
39Get:7 ftp://mirror.cpsc.ucalgary.ca testing/main perl-modules 5.8.4-3 [2182kB]
40Get:8 ftp://mirror.cpsc.ucalgary.ca testing/main libdb4.2 4.2.52-17 [388kB]
41Get:9 ftp://mirror.cpsc.ucalgary.ca testing/main libgdbm3 1.8.3-2 [21.3kB]
42Get:10 ftp://mirror.cpsc.ucalgary.ca testing/main perl 5.8.4-3 [3238kB]
43Get:11 ftp://mirror.cpsc.ucalgary.ca testing/main perl-base 5.8.4-3 [747kB]
44Get:12 ftp://mirror.cpsc.ucalgary.ca testing/main liblocale-gettext-perl 1.01-17 [16.8kB]
45Get:13 ftp://mirror.cpsc.ucalgary.ca testing/main libtext-iconv-perl 1.2-3 [12.2kB]
46Get:14 ftp://mirror.cpsc.ucalgary.ca testing/main libtext-charwidth-perl 0.04-1 [11.0kB]
47Get:15 ftp://mirror.cpsc.ucalgary.ca testing/main libtext-wrapi18n-perl 0.06-1 [8442B]
48Get:16 ftp://mirror.cpsc.ucalgary.ca testing/main debconf-i18n 1.4.30.8 [84.6kB]
49Get:17 ftp://mirror.cpsc.ucalgary.ca testing/main slang1a-utf8 1.4.9dbs-8 [297kB]
50Get:18 ftp://mirror.cpsc.ucalgary.ca testing/main libnewt0.51 0.51.6-18 [57.0kB]
51Get:19 ftp://mirror.cpsc.ucalgary.ca testing/main libpopt0 1.7-5 [30.2kB]
52Get:20 ftp://mirror.cpsc.ucalgary.ca testing/main whiptail 0.51.6-18 [31.9kB]
53Get:21 ftp://mirror.cpsc.ucalgary.ca testing/main debconf 1.4.30.8 [99.7kB]
54Get:22 ftp://mirror.cpsc.ucalgary.ca testing/main zlib1g 1:1.2.2-1 [62.8kB]
55Get:23 ftp://mirror.cpsc.ucalgary.ca testing/main libncursesw5 5.4-4 [287kB]
56Get:24 ftp://mirror.cpsc.ucalgary.ca testing/main dialog 1.0-20040920-1 [178kB]
57Get:25 ftp://mirror.cpsc.ucalgary.ca testing/main libasound2 1.0.6-3 [301kB]
58Get:26 ftp://mirror.cpsc.ucalgary.ca testing/main xlibs 4.3.0.dfsg.1-8 [403kB]
59Get:27 ftp://mirror.cpsc.ucalgary.ca testing/main libice6 4.3.0.dfsg.1-8 [189kB]
60Get:28 ftp://mirror.cpsc.ucalgary.ca testing/main libsm6 4.3.0.dfsg.1-8 [167kB]
61Get:29 ftp://mirror.cpsc.ucalgary.ca testing/main libxext6 4.3.0.dfsg.1-8 [174kB]
62Get:30 ftp://mirror.cpsc.ucalgary.ca testing/main libexpat1 1.95.8-1 [59.5kB]
63Get:31 ftp://mirror.cpsc.ucalgary.ca testing/main libfreetype6 2.1.7-2.2 [363kB]
64Get:32 ftp://mirror.cpsc.ucalgary.ca testing/main defoma 0.11.8-0.1 [77.9kB]
65Get:33 ftp://mirror.cpsc.ucalgary.ca testing/main ucf 1.10 [34.9kB]
66Get:34 ftp://mirror.cpsc.ucalgary.ca testing/main ttf-bitstream-vera 1.10-3 [354kB]
67Get:35 ftp://mirror.cpsc.ucalgary.ca testing/main fontconfig 2.2.3-1 [59.9kB]
68Get:36 ftp://mirror.cpsc.ucalgary.ca testing/main libfontconfig1 2.2.3-1 [89.3kB]
69Get:37 ftp://mirror.cpsc.ucalgary.ca testing/main libxrender1 0.8.3-7 [25.1kB]
70Get:38 ftp://mirror.cpsc.ucalgary.ca testing/main libxft1 4.3.0.dfsg.1-8 [176kB]
71Get:39 ftp://mirror.cpsc.ucalgary.ca testing/main libxi6 4.3.0.dfsg.1-8 [165kB]
72Get:40 ftp://mirror.cpsc.ucalgary.ca testing/main libxt6 4.3.0.dfsg.1-8 [312kB]
73Get:41 ftp://mirror.cpsc.ucalgary.ca testing/main libxmu6 4.3.0.dfsg.1-8 [195kB]
74Get:42 ftp://mirror.cpsc.ucalgary.ca testing/main libxmuu1 4.3.0.dfsg.1-8 [157kB]
75Get:43 ftp://mirror.cpsc.ucalgary.ca testing/main libxp6 4.3.0.dfsg.1-8 [164kB]
76Get:44 ftp://mirror.cpsc.ucalgary.ca testing/main libxpm4 4.3.0.dfsg.1-8 [180kB]
77Get:45 ftp://mirror.cpsc.ucalgary.ca testing/main libxrandr2 4.3.0.dfsg.1-8 [157kB]
78Get:46 ftp://mirror.cpsc.ucalgary.ca testing/main libxtrap6 4.3.0.dfsg.1-8 [166kB]
79Get:47 ftp://mirror.cpsc.ucalgary.ca testing/main libxtst6 4.3.0.dfsg.1-8 [160kB]
80Get:48 ftp://mirror.cpsc.ucalgary.ca testing/main xlibs-data 4.3.0.dfsg.1-8 [891kB]
81Get:49 ftp://mirror.cpsc.ucalgary.ca testing/main xfree86-common 4.3.0.dfsg.1-8 [775kB]
82Get:50 ftp://mirror.cpsc.ucalgary.ca testing/main libx11-6 4.3.0.dfsg.1-8 [702kB]
83Get:51 ftp://mirror.cpsc.ucalgary.ca testing/main liballegro4.1 2:4.1.15-5 [447kB]
84Get:52 ftp://mirror.cpsc.ucalgary.ca testing/main allegro-examples 2:4.1.15-5 [333kB]
85Get:53 ftp://mirror.cpsc.ucalgary.ca testing/main x-dev 4.3.0.dfsg.1-8 [202kB]
86Get:54 ftp://mirror.cpsc.ucalgary.ca testing/main libxext-dev 4.3.0.dfsg.1-8 [232kB]
87Get:55 ftp://mirror.cpsc.ucalgary.ca testing/main libxi-dev 4.3.0.dfsg.1-8 [217kB]
88Get:56 ftp://mirror.cpsc.ucalgary.ca testing/main libxv1 4.3.0.dfsg.1-8 [158kB]
89Get:57 ftp://mirror.cpsc.ucalgary.ca testing/main libxv-dev 4.3.0.dfsg.1-8 [176kB]
90Get:58 ftp://mirror.cpsc.ucalgary.ca testing/main zlib1g-dev 1:1.2.2-1 [488kB]
91Get:59 ftp://mirror.cpsc.ucalgary.ca testing/main xlibs-static-dev 4.3.0.dfsg.1-8 [840kB]
92Get:60 ftp://mirror.cpsc.ucalgary.ca testing/main libx11-dev 4.3.0.dfsg.1-8 [1344kB]
93Get:61 ftp://mirror.cpsc.ucalgary.ca testing/main libxpm-dev 4.3.0.dfsg.1-8 [178kB]
94Get:62 ftp://mirror.cpsc.ucalgary.ca testing/main xlibs-static-pic 4.3.0.dfsg.1-8 [370kB]
95Get:63 ftp://mirror.cpsc.ucalgary.ca testing/main liballegro-dev 2:4.1.15-5 [808kB]
96Get:64 ftp://mirror.cpsc.ucalgary.ca testing/main liballegro-doc 2:4.1.15-5 [1241kB]
97Fetched 34.9MB in 2m35s (224kB/s)
98Preconfiguring packages ...
99Selecting previously deselected package libdb1-compat.
100(Reading database ... 16195 files and directories currently installed.)
101Unpacking libdb1-compat (from .../libdb1-compat_2.1.3-7_i386.deb) ...
102Replacing files in old package libc6 ...
103(Reading database ... 16198 files and directories currently installed.)
104Removing libnss-db ...
105(Reading database ... 16185 files and directories currently installed.)
106Preparing to replace libc6-dev 2.2.5-11.5 (using .../libc6-dev_2.3.2.ds1-18_i386.deb) ...
107Unpacking replacement libc6-dev ...
108Selecting previously deselected package linux-kernel-headers.
109Unpacking linux-kernel-headers (from .../linux-kernel-headers_2.5.999-test7-bk-16_i386.deb) ...
110Preparing to replace locales 2.2.5-11.5 (using .../locales_2.3.2.ds1-18_all.deb) ...
111Unpacking replacement locales ...
112Preparing to replace libc6 2.2.5-11.5 (using .../libc6_2.3.2.ds1-18_i386.deb) ...
113 
114Name Service Switch has changed in the C Library: pre-installation question.
115 
116Running programs may not be able to do NSS lookups until they are restarted.
117Some services can not accept all authentication after extracting glibc
118package into your system. This script automatically restarts some packages
119for example ssh or telnetd, but other packages for example xdm
120cannot restart because if it restarts automatically, then your X11 session
121is disconnected. So you have to logout and stop xdm; you have to
122restart all such services after upgrading glibc with your hands.
123Known packages that are needed to stop before installing glibc 2.3:
124 xdm kdm gdm postgresql xscreensaver
125 
126This script does not detect services which need to stop.
127If you want to stop upgrade for the present, please answer the below
128question as No.
129 
130Do you want to upgrade glibc? [Y/n] Y
131 
132Unpacking replacement libc6 ...
133Setting up libc6 (2.3.2.ds1-18) ...
134Checking for services that may need to be restarted...done.
135 
136Name Service Switch has changed in the C Library: post-installation question.
137Running programs may not be able to do NSS lookups until they are
138restarted (for services such as ssh, this can affect your ability to
139login).
140Note: restarting sshd/telnetd should not affect any existing connections.
141 
142The services detected are: inetd cron ssh exim
143 
144If other services begin to fail mysteriously after this upgrade,
145it may be necessary to restart them too. We strongly recommend
146you to reboot your machine to avoid the NSS related trouble.
147 
148Do you wish to Restart Services? [Y/n]

__________________________________________________

Elias
Member #358
May 2000

Yes, of course, as long as Sam Hovecar (or whatever was the maintainers name) fills in all the dependencies :) But he forgot libxcursor for 4.1.16 I believe.

--
"Either help out or stop whining" - Evert

Go to: