![]() |
|
Compiling Allegro 4.9.12 is making me crazy! |
Dario ff
Member #10,065
August 2008
![]() |
Having no Internet at home has made a lot of things really difficult to me, but compiling Allegro 4.9.12 is giving me a REALLY hard time. Why does it need so much freaking libraries?? After some days of investigating, I could compile it with most of the addons, but some of them are not working right at all. I use a Mingw toolbox compiler. I was wondering if any of you, the nice people of a.cc, could please direct me in which particular version of the following libraries I need to make Allegro 4.9.12 work right. The addons I lack are: Freetype: I compiled it, but for some reason, when trying to compile Allegro, it says some variables that Freetype should include are undeclared. Which version to use? Libogg or Vorbis: I don´t know which one is causing the trouble. I got both of them compiled, and Allegro compilation throws no error at all, but I can´t load any OGG files(even the demo does not work). Libflac: Same problem that I had with Freetype. Undeclared identifiers The ones I need urgently are the first two. The rest of the library is working great, and I´m really happy with it. Allegro 4.2 API was the lord of conflicts when trying to combine it with something else TranslatorHack 2010, a human translation chain in a.cc. |
Thomas Fjellstrom
Member #476
June 2000
![]() |
I would suggest you not bother, and just grab the latest binaries off of http://www.allegro5.org If you're hell bent on compiling yourself, try the latest allegro 4.9, it should be somewhat easier to get built. -- |
MiquelFire
Member #3,110
January 2003
![]() |
Note: With OGG, Allegro's CMake is not setup to ask for libogg's include directory, so nothing OGG related will work if you don't put all the libraries stuff in one directory (and for making it easier to deal with CMake finding stuff, in the include path before you run CMake, though I'm not sure how to do that with MinGW) You're using FreeType 2? If not, then there's the issue. Otherwise I have not advice on this. --- |
axilmar
Member #1,204
April 2001
|
I think the real question is why the A5 devs made A5 so complicated...they could have simply included all the code and create one simple library to use. Is it 'library size'? nope, it is not. In this day and age, it does not matter if a library is a few hundred KBs more than usual. Is it 'ease of use'? nope, it is not. A4 is a hell of a lot more easier to use (not the API, the library; the A5 API is superior in every way). Is it 'bloat'? nope, it is not. A4 includes a ton of 'add ons', but no one (that I know of) ever complained about them. If you don't like A4 extra things, then don't use them. A5 should have been the same. Is there any real reason why drawing primitive is an add on? there is not. Is there any real reason why audio is an add on? again, there is not. As if games don't need sound...one might say that the A5 audio add on could be easily replaced with other add ons. I would say to them that it would hurt nobody to have the add on in the library, and if someone did not want to use it, then he would not have to do so. Same goes with all the other 'add ons', which provide essential functionality in reality... Anyway, enough ranting. In the end, I guess I should be grateful that there is Allegro (which I am)... |
Thomas Fjellstrom
Member #476
June 2000
![]() |
It's been explained time and time again. If you refuse to pay attention, we can't really help with that. edit: And lets put it this way: If all of the current a5 functionality was built into allegro, it would be harder to build and use, not easier. -- |
axilmar
Member #1,204
April 2001
|
Thomas Fjellstrom said: It's been explained time and time again. If you refuse to pay attention, we can't really help with that. Personally I was not persuaded. They talked about bloat, increased library size, ease of use etc none of which are valid excuses. Quote: If all of the current a5 functionality was built into allegro, it would be harder to build and use, not easier.
Please explain to us why. For example, in this thread, they present the following reasons for the add ons: 1) bloat. The word itself is meaningless. Bloat in what? library size? it does not matter in this day and age. Bloat for the programmer? a well-organized documentation alleviates that. So bloat it is not. 2) "Pulling in external dependencies is another". Yeap, it is left on us A5 users to pull in the extra dependencies. 3) "Modularity: we try to not use too many library internals inside addons, which improves understandability, maintainability and confirms our designs". The developers of the library put the burden on the users of the library. 4) "You can choose to not use any addon that you feel is inadequate, e.g. some people require a more advanced audio library than we provide". Nothing stops people from using another sound library, if so desired. 5) "Also, we like to trip up newbies" i.e. "I run out of excuses, I might say something silly to cover up the lame excuses for the A5 add ons". So far, not a single valid argument in favor of addons. Perhaps there are other issues (licensing, for example), that I am unaware of. Please enlighten us. |
Thomas Fjellstrom
Member #476
June 2000
![]() |
Sigh. Do you choose to ignore points that are inconvenient to you? The two main points for Allegro are licensing, and "bloat" but not in the way that you choose to understand it. Splitting things off into addons makes it so you aren't forced into linking to ALL of allegro's dependencies. Why link to libraries you aren't going to use? Imagine if all of the image and audio codec addons were built into allegro with no way to disable support, as you seem to suggest is "better" for everyone. Everyone would be forced to link to ogg, vorbis, flac, png, zlib, libjpeg, and several other libraries. EVEN if they never used any of those formats. Right now, you are free to choose which you want to link to. more choice is better than less choice imo. In fact in the past two releases, the image and acodec libs were split up even further to facilitate finer grained linking. For a while acodec and iio (before it was renamed to a5_image) forced linking to all of the dependencies found at compile time. It was decided that that was highly annoying, and not a good idea. And no, "linking" would not have properly removed the dependencies due to vtables used to make al_load_bitmap, and al_load_sample, all of the addon's main functions would always be included, much like how in a4, the linker can't remove much of the core functions, all of the vtables have a hard dependency on them. -- |
SiegeLord
Member #7,827
October 2006
![]() |
Are you complaining about addons, or external dependencies? To begin, Allegro 4 also had addons (AllegroGL, alogg, aljpeg(sp?) the truetype one, etc), and those also require dependencies. The only difference is that they weren't bundled with A4 and are bundled with A4.9, making them easier to obtain (single download) and more likely to function (API changes are fixed by the people who make those API changes). Overall, the convenience to the user and the addon developer is increased relative to A4. Then, there's the linkage issues... I honestly don't mind it. I set up my IDE to link the proper addons (or perhaps make a CMakeLists.txt thing) and forget about it. Again, this is unchanged from A4. Perhaps we could make it better by making addons be a part of the core library, but there's really no point. Once A4.9 stabilizes (or even now!) we could make templates for projects for the various IDE's if it's so desired. In terms of addon proliferation (you mentioned the primitives addon) then yeah, perhaps you have a point. It takes you 15 more seconds to write in the addon library in the link line. I don't see the major issue here. Maybe some addons shouldn't be addons, but it's a purely syntactical issue... there are no real practical differences in terms of ease of use. So, overall, things have improved relative to A4 in terms of library usage. "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
William Labbett
Member #4,486
March 2004
![]() |
I compiled allegro 4.9.15 last night using Matt Smiths wiki article. Having done it before a few times helps but this time it was easier than ever. Initially CMake looked scary because I'd never heard of it and the program icon looks like it might be a application for a nuclear power generator and also I compiled libpng and zlib myself the first time. But building those libs isn't necessary as I found out on Matt Smiths page. I would say however that I think the page could be improved (more newb-proof) by explaining that for MinGW users, after downloading dx9mgw.zip, you have to copy all the files in the include directory and lib directory to the respective directories in one's MinGW directory.
|
axilmar
Member #1,204
April 2001
|
Thomas Fjellstrom said: Sigh. Do you choose to ignore points that are inconvenient to you? I've never done that. Quote: The two main points for Allegro are licensing I already said: axilmar said: Perhaps there are other issues (licensing, for example) I don't have the time to dig into the licensing issues, but I don't think it's a problem. Since Allegro is open source, the delicate flavor of open source that Allegro is can be changed to fit with the open source licenses of the libraries it uses. Thomas Fjellstrom said: Splitting things off into addons makes it so you aren't forced into linking to ALL of allegro's dependencies. Why link to libraries you aren't going to use? Imagine if all of the image and audio codec addons were built into allegro with no way to disable support, as you seem to suggest is "better" for everyone. Everyone would be forced to link to ogg, vorbis, flac, png, zlib, libjpeg, and several other libraries. EVEN if they never used any of those formats. I still don't see the problem. Please tell me where the problem is with linking to those libraries. Is it a matter of memory usage? where exactly is the bloat? Is the problem to specify linking with the given libraries? big deal. From what I know so far, Allegro 4 provides a linker options string, so all you have to do is do the same with A5. I agree that some people will not want to link with said libraries, but 95% of Allegro users will do want to link with those libraries. So by providing the libs as addons, you are doing a service to the 5% of the A5 users that will choose to use other libs, while the 95% of the users will have to suffer through it. Quote: Right now, you are free to choose which you want to link to. more choice is better than less choice imo. I agree, but I don't see how if these addons are part of the library limits your choices. You can still link with any lib you want. Quote: It was decided that that was highly annoying, and not a good idea. Please justify your argument with some facts. Quote: And no, "linking" would not have properly removed the dependencies due to vtables used to make al_load_bitmap, and al_load_sample, all of the addon's main functions would always be included, much like how in a4, the linker can't remove much of the core functions, all of the vtables have a hard dependency on them. A few KBs more in the link tables of the process is a negligible overhead. SiegeLord said: To begin, Allegro 4 also had addons (AllegroGL, alogg, aljpeg(sp?) the truetype one, etc), and those also require dependencies. The only difference is that they weren't bundled with A4 and are bundled with A4.9, making them easier to obtain (single download) and more likely to function (API changes are fixed by the people who make those API changes). No, it's not the same. With plain A4 and no addons, I have audio, color, font (not truetype), image I/O, filesystem and drawing support out of the box. With A5, I don't have those functions out of the box. Each time I want to make a simple test program in order to learn A5, I will have to specify over and over the same libraries. It also makes the building process difficult. It's not a coincidence that many people have problems with building A5. Quote: I set up my IDE to link the proper addons (or perhaps make a CMakeLists.txt thing) and forget about it. You have to do it again and again though for every new project. It's not "forget about it". Quote: we could make templates for projects for the various IDE's if it's so desired That doesn't solve the compilation issues. At least there are some people offering a precompiled A5 lib with all the addons compiled into them. Quote: In terms of addon proliferation (you mentioned the primitives addon) then yeah, perhaps you have a point. Is there a point to not be able to draw with a multimedia library? I don't think there is. Quote: It takes you 15 more seconds to write in the addon library in the link line. No, it takes a lot more than that. It's not one addon, there are at least 4 addons that will be used again and again in every project. There are also issues when moving things around and tidying up the files, updating libs etc. Quote: So, overall, things have improved relative to A4 in terms of library usage. No. With A4, you simply had to link with alleg.lib and all the desired functionality was present for 99% of cases. With A5, you have to spent time configuring your project, choosing addons, remembering those lib names, including the right files, etc. |
alethiophile
Member #9,349
December 2007
![]() |
I don't know about you, but I use A5 (on the compilation/include files level) exactly as I used A4, except with maybe four extra libraries in the link line and four extra headers in a global include. I don't call that a lot of overhead. And A5 is much nicer to use compared to A4. -- |
SiegeLord
Member #7,827
October 2006
![]() |
axilmar said: With A4, you simply had to link with alleg.lib and all the desired functionality was present for 99% of cases. That's very subjective. For me the functionality of playing OGG's and loading PNG's is always the desired functionality, that I would not be able to get in A4 without hunting down the off-site addons, not so in A4.9. In terms of linkage, the processes are identical. You do have a point if you only wanted to play WAV files and load TGA images though. Maybe A4.9 requires a little bit more effort to set up versus A4, making it unsuitable for something like Minorhack (very maybe, as it takes me less than a minute to start up a simple A4.9 application from scratch). For anything longer, you will want to be using the modern file formats with A4.9 allows you to use with ease (relative to A4) and the initial set up cost will be negligible to the time saved from using the superior API. Perhaps it would please you to modify the allegro5-config script to have an 'all' option, that links all the possible addons? That'll remove all your linking complaints Even if we don't, you can make them yourself "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
Elias
Member #358
May 2000
|
I still want to add a cmake option to create a single library containing all enabled "addons"... it should make linking really simple. -- |
Thomas Fjellstrom
Member #476
June 2000
![]() |
Elias said: I still want to add a cmake option to create a single library containing all enabled "addons"... it should make linking really simple. It'll also make incompatible libraries afaik. Do you REALLY want to support that? People will come in and complain about it. axilmar said: A few KBs more in the link tables of the process is a negligible overhead. Its more like a few hundred KB of extra memory and dlls. Once you link to a lib, you are forced to ship it. Do you want to ship your game with 12 DLLs you're not going to use at all? -- |
Peter Wang
Member #23
April 2000
|
Elias said: I still want to add a cmake option to create a single library containing all enabled "addons"... it should make linking really simple. Linking already is simple, if you are using pkg-config: `pkg-config --libs <top_level_addon>` automatically pulls in all Allegro dependencies and external dependencies. If you don't like that, you can list each of the Allegro libraries on the same line. It's no worse than `allegro-config --libs`. Which leaves Windows. Remind me: on Windows if you link with Allegro will it pull in all of the external dependencies as well? Otherwise combining everything into one big library will be a bigger pain. Whether your program requires native dialogs, FLAC, or PhysicsFS, you will be forced to link against their external dependencies. Am I wrong? And as Thomas says the libraries will be incompatible so the combined library must be statically linked.
|
MiquelFire
Member #3,110
January 2003
![]() |
Windows, you have to do the work that pkg-config or allegro-config would do for you. Static linking is a pain because of this. --- |
Thomas Fjellstrom
Member #476
June 2000
![]() |
Miquel Burns said: Static linking is a pain because of this. Allegro could be made to link itself directly to its dependencies, avoiding most of the work for the user. But it would be a strictly static allegro, depending in static versions of all of its dependencies (other than the core windows dlls that WON'T static link no matter how hard you try)[1][2] References
-- |
axilmar
Member #1,204
April 2001
|
alethiophile said: I don't know about you, but I use A5 (on the compilation/include files level) exactly as I used A4, except with maybe four extra libraries in the link line and four extra headers in a global include. I don't call that a lot of overhead. And A5 is much nicer to use compared to A4. If you remember the lib and include names by heart, then it's ok I suppose. SiegeLord said:
Perhaps it would please you to modify the allegro5-config script to have an 'all' option, that links all the possible addons? That'll remove all your linking complaints It would certainly be good to have an 'all' option, especially since Allegro attracts a lot of inexperienced people. Thomas Fjellstrom said: Its more like a few hundred KB of extra memory and dlls. Once you link to a lib, you are forced to ship it. Do you want to ship your game with 12 DLLs you're not going to use at all? No, but simple things should be kept simple. I like the option mentioned above by Siegelord, and I think that's the best way to go. |
Thomas Fjellstrom
Member #476
June 2000
![]() |
You will be forced to use static allegro, and most likely, all of its addon's dependencies static as well. That won't make it easier to use (dynamic libs link to their dependencies, static libs don't, and shouldn't under most circumstances). axilmar said: It would certainly be good to have an 'all' option, especially since Allegro attracts a lot of inexperienced people. Note that that script is deprecated, and afaik, pkg-config does not work on windows (not that allegro*-config ever did). Quote: No, but simple things should be kept simple. It is quite simple. If you want the functions provided by a lib, you need to link to it. -- |
axilmar
Member #1,204
April 2001
|
Thomas Fjellstrom said: Note that that script is deprecated, and afaik, pkg-config does not work on windows (not that allegro*-config ever did). Then another way should be found to achieve the same result. Quote: It is quite simple. If you want the functions provided by a lib, you need to link to it. Indeed. But it is even simpler to have the most-often used functionality in one library. |
|