![]() |
|
Allegro headers part II |
Evert
Member #794
November 2000
![]() |
Quote: Who should I send patches to? Either to the mailinglist (check the Allegro website for instructions, you need to subscribe), or Allegro's sourceforge tracker (probably the best option). Quote: The autotools setup for 4.2 branch (almost) absolutelly requires renaming *.s ASM files to *.S It should be accepted since it is a really, really pure internal thing and if all the filenames in makefiles and file lists are renamed as well, nobody will notice, right?
Hmm. It seems a lot of hassle for something that may never see the light of (release) day (no offence). EDIT: I should point out, at least some of the developers (Peter, me, Elias?) get the development forum posts as e-mails as well, so in that sense you could already post the patch here and people should pick it up. Should, because for me all your posts seem to end up in my spambox. |
Matěj Týč
Member #9,863
June 2008
![]() |
Quote: ...all your posts seem to end up in my spambox.
Still in no offence mode, right? I attach the autofiles patch. Then the demo patch (it adds a possibility to define datafile location during compilation and it is backward compatible). It will not work due to asm files that need to be renamed. I already have a script that can generate the patch that svn renames those files and changes according filenames inside files at once. Nothing to worry about even more if you are not planning to release another 4.2 release. I will generate the patch after you apply the autofiles one since the Makefile.ams need some renaming as well.. And finally, there is no allegro_unsharable library now and it seems to work well... Again no issue to 4.3+ Comments are always welcomed, of course! --------------------------------------------------- |
Evert
Member #794
November 2000
![]() |
Quote: Still in no offence mode, right? Dead serious. I only saw this one because I checked here in between runs. Quote: I will generate the patch after you apply the autofiles one since the Makefile.ams need some renaming as well..
Any patch applied to SVN should leave the tree in a working state. Quote: And finally, there is no allegro_unsharable library now and it seems to work well... Did you test that on different architectures (32 and 64 bit)? Also when compiling with a magic main? On Linux and *BSD? |
Peter Wang
Member #23
April 2000
|
Just so we're clear, I will not accept any patch using automake. Even more so if it uses libtool.
|
Matěj Týč
Member #9,863
June 2008
![]() |
Thank you for your reply, Quote:
Any patch applied to SVN should leave the tree in a working state.
Existing things will remain untouched if you apply the patches I have sent. Even the old autotools support is not affected. The old configure.in and aclocal.m4 stay where they were. (only the new thing wouldn't work with ASM enabled) Isn't the requirement of "always having working copy really working" little bit exaggerated? On the other hand, I can work little bit more on those patches so that they are more mature and comply with the requirement. Therefore I suggest not to apply them now. Applying the rename patch first looks smarter anyway. The rename patch will (or at least really really should :-) leave everything in the same working state since only the filenames and records in all files are going to be changed. Quote: Did you test that on different architectures (32 and 64 bit)? Quote: Also when compiling with a magic main? On Linux and *BSD? I have tested it on 32bit Linux and Wine. AFAIK, the old autotools support did not support BSD and the new one supports mingw and Linux at this moment. What does 'compiling with a magic main' actually mean? I have used that magic main macro on Windows as well... Or is it something else? --------------------------------------------------- |
Evert
Member #794
November 2000
![]() |
Quote:
Existing things will remain untouched if you apply the patches I have sent. Even the old autotools support is not affected. The old configure.in and aclocal.m4 stay where they were. (only the new thing wouldn't work with ASM enabled) If existing builds are unaffected, so too will be OS X. Quote: Isn't the requirement of "always having working copy really working" little bit exaggerated?
No. No single commit should break the trunk. Of course it still happens now and then by accident. Quote: On the other hand, I can work little bit more on those patches so that they are more mature and comply with the requirement. Therefore I suggest not to apply them now. Fine. Quote: I have to admit that I don't exactly know what tests should my autotools support pass. It should build the library in a state that is ABI compatible with other 4.2 libraries. From what I recall, there are subtle differences between 32 bit and 64 bit AMD/Intel architectures. Not needing allegro-unsharable is nice, but make sure you really don't need it anywhere, ever. Quote: AFAIK, the old autotools support did not support BSD Since when? Quote: What does 'compiling with a magic main' actually mean? I have used that magic main macro on Windows as well... Or is it something else? It means you have a magic main, or in other words, END_OF_MAIN() actually does something. This is always the case on Windows and OS X, and it may be the case on *NIX. |
Matěj Týč
Member #9,863
June 2008
![]() |
Quote:
Just so we're clear, I will not accept any patch using automake....
Could you please explain why? --------------------------------------------------- |
Peter Wang
Member #23
April 2000
|
Perhaps. But I have enough bad experiences, especially with libtool which puts things in hidden directories and wants total control of your command line. When it breaks (and it does break) it's not easy to recover because it's not transparent. Not to mention, libtool is extremely slow. Automake is not necessary. Makefiles are easy to understand, automake just adds another layer of autogenerated crud that gets in the way whenever you want to make a change or do something unusual. Further, it's a maintenance issue. When you lose interest (and you will), who will maintain this? Everybody knows make, and we can manage autoconf well enough (not expertly, but well enough). It's just not on to require developers to work with build tools they despise. The primary build system for Allegro 5 will be CMake. Too bad if you don't like it. It's just a build system. End users deal with the build system roughly once per release. Developers have to deal with it every time they touch the code. Therefore, developer opinions win.
|
Matěj Týč
Member #9,863
June 2008
![]() |
Well, I hope that you are open for a discussion or to a possible change of opinion. Quote: libtool puts things in hidden directories This is true. But who cares. This is libtool's business. The libtool's 'supervising' of the compilation is also something that you don't have to worry about. Libtool means goodbye to AM_PATH_ALLEGRO and the only cross-platform goodbye to allegro-config. I think that getting rid of those two is worth something. Quote: libtool is extremely slow
It seems to be slow, but it is bash behind libtool that makes things slow Quote:
Makefiles are easy to understand, ...
Makefiles.ams are even easier to understand, really. I have found autoconf to be much more complex and hard to use right than automake (the automake manual has half size). Once you tame autoconf, automake is like a gift for the effort. Quote: The primary build system for Allegro 5 will be CMake. I would like to be able to cross compile with allegro. I can't see any better mean how to achieve this than autotools. I suggest that you keep your favourite build system as the main one and that you accept the autotoos one if it works and don't to worry about it. --------------------------------------------------- |
Evert
Member #794
November 2000
![]() |
Quote: the only cross-platform goodbye to allegro-config. allegro-config is used on *nix ad OS X (technically a UNIX too, but we'll make the distinction anyway) - in other words, everywhere except Windows and DOS. Your build system isn't that general. Besides, Quote: I think that getting rid of those two is worth something.
I don't see the point. Really. What's your problem with allegro-config anyway? Quote: I would like to be able to cross compile with allegro. I can't see any better mean how to achieve this than autotools.
Err... CMake? Quote: I suggest that you keep your favourite build system as the main one and that you accept the autotoos one if it works and don't to worry about it. That's the point he was trying to make: if it works now there is no guarantee it'll stay that way. Right now, whenever I make a change to the CMake build system, someone has to fix the SCons system to make sure they're still compatible. That's already a hassle. Can you really see someone taking on a third build system? What's stopping us from having a dozen others as well? |
Matěj Týč
Member #9,863
June 2008
![]() |
Quote: - in other words, everywhere except Windows and DOS. Your build system isn't that general. autotools build system is able to work on unixes, OSX and Windows (MSYS). It is certainly more general than allegro-config Quote:
Err... CMake?
By "cross-compile with allegro" means that you have a program on Linux that uses allegro and you want to cross compile the program's, let's say, Windows version (= this is something else than cross-compiling allegro itself) Autotools are a standard on unixes and any cross-platform-and-unix library should provide some support for them to make the above possible for its users. This is the reason why it makes sense to have autotools build system supported. The current support of autotools is not transparent and does not allow cross compilation. I don't know what is the advantage of having both scons and cmake though... --------------------------------------------------- |
Elias
Member #358
May 2000
|
Quote: By "cross-compile with allegro" means that you have a program on Linux that uses allegro and you want to cross compile its, let's say, Windows version. That's what everyone means, it works with Allegro 4.3.x makefiles as well as cmake in 4.9.x. -- |
Evert
Member #794
November 2000
![]() |
Quote: autotools build system is able to work on unixes, OSX and Windows (MSYS). I thought you said your build system didn't work on OS X? Quote: It is certainly more general than allegro-config allegro-config isn't a build system. It's a custom shell script that spits out compiler options on your current platform. It's as general as anyone wants it to be. That didn't answer my question though. Quote: By "cross-compile with allegro" means that you have a program on Linux that uses allegro and you want to cross compile its, let's say, Windows version. Of course that's what it means, what did you think I meant? Quote: Autotools are a standard on unixes
Yes. But for how much longer? Quote: any cross-platform-and-unix library should provide some support for them to make the above possible for its users. This is the reason why it makes sense to have autotools build system supported.
There's two things that need to be kept separate here for clarity: offering support for other packages that use autotools to work with Allegro and being able to compile Allegro itself through autotools. One does not imply the other. Personally, I like being able to do "./configure && make && sudo make install" more than doing "mkdir Build; cd Build; cmake .. && make && sudo make install" for a number of reasons, one of them being I'm not as familiar with CMake and have trouble finding what I need if things don't work as they should. However, it does seem easy to get into. At the end of the day it doesn't matter much either way, because it's just a build system. The important thing is it works and is maintainable. Quote: The current support of autotools is not transparent and does not allow cross compilation. The cross compilation instructions in the manual don't work? This is a real question, I know they worked years ago when I last tried it. Quote: I don't know what is the advantage of having both scons and cmake though...
Pretty much the same as having both CMake and autotools, I'd imagine. |
MiquelFire
Member #3,110
January 2003
![]() |
Please note, not everyone using Allegro on Windows will want to install MSYS. Outside of cross-compiling, autotools and Windows don't mix. Also, you need to deal with the MSVC users as well. You going to tell them to install MSYS just to make a VC project file? And these people may be the types who don't even know what a command prompt is. CMake seems to be the best tool for handling generating the make/project files on Windows from what I seen (there's qmake as well which is for Trolltect's QT BTW, it works nicely as well). --- |
Evert
Member #794
November 2000
![]() |
Quote: Please note, not everyone using Allegro on Windows will want to install MSYS. Outside of cross-compiling, autotools and Windows don't mix. Also, you need to deal with the MSVC users as well. You going to tell them to install MSYS just to make a VC project file? And these people may be the types who don't even know what a command prompt is. Well, that's another thing, but I don't think Matěj is suggesting that Windows users be forced to use autotools, just that they'd have the option. |
Matěj Týč
Member #9,863
June 2008
![]() |
Quote: What's your problem with allegro-config anyway?
I hope that this is your question that I have lost :-) Elias said: That's what everyone means, it works with Allegro 4.3.x makefiles as well as cmake in 4.9.x. I am sorry, but I don't understand. I can't see what allegro makefiles have to do with cross-compiling my program. Basically, the problem is: What should I tell to the linker? Quote: I thought you said your build system didn't work on OS X? It does not work now, but it has a good potential to work there. Quote: There's two things that need to be kept separate here for clarity: offering support for other packages that use autotools to work with Allegro and being able to compile Allegro itself through autotools. One does not imply the other.
You are right. One transition is significantly easier than the other one, though Quote: The cross compilation instructions in the manual don't work? I haven't found any specific cross-compiling instructions in allegro42 manual so far. I have found mingw instructions that mention cross-compilation, but no mention of autotools support there. Quote: Pretty much the same as having both CMake and autotools, I'd imagine. Well, maybe from your point of view. But distribution packagers will have much easier job with autotools. And you can also do 'make distcheck' that does the package without unnecessary files + lots of tests for you... The main question for me is whether automake + libtool can make it into the repository. I think that those tools should be given a chance on 4.2 and 4.3 branches. Then all of you can come and see whether it bites or not or whether it is really not maintainable. 2MiquelFire: Don't worry now, it will come in the second wave --------------------------------------------------- |
Elias
Member #358
May 2000
|
Quote: I am sorry, but I don't understand. I can't see what allegro makefiles have to do with cross-compiling my program. Basically, the problem is: What should I tell to the linker?
Well, true, we don't support any autotools-specific way to crosscompile your own games using Allegro, I didn't even know that was possible (and we don't even use autotools right now to cross-compile Allegro itself). (And who would use autotools to compile their game anyway? -- |
Matěj Týč
Member #9,863
June 2008
![]() |
Quote:
And who would use autotools to compile their game anyway?
Come on, I would use autotools even for hello world! --------------------------------------------------- |
SiegeLord
Member #7,827
October 2006
![]() |
Can't wait until an equally committed person comes along advocating Ant/Jam/QMake/Cook/others, so that Allegro will have not one, not two, but every single build system there is. CMake can cross-compile. CMake can make packages. Why not implement these features in CMake instead of adding a completely new build system for the very purpose of adding those features? "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
Thomas Fjellstrom
Member #476
June 2000
![]() |
Quote: Come on, I would use autotools even for hello world! I hope thats a joke. Autotools adds nearly a megabyte of overhead to any project its added to. Quote: Why not implement these features in CMake instead of adding a completely new build system for the very purpose of adding those features? The only feature the Cmake build setup doesn't have yet is proper cross compiling, but I don't think its that hard to setup, just tell it to make mingw make files, and set CC to the mingw cross compiler. If that doesn't work, it probably only needs a little bit of work. The one thing that I would like to see added to allegro is pkg-config support. That would give us instant support of more than one OpenSource IDE. Allegro would show up as a library in a list in the IDE that people can choose from, and it'd all "just work"&tm; -- |
Peter Wang
Member #23
April 2000
|
Quote: The only feature the Cmake build setup doesn't have yet is proper cross compiling, but I don't think its that hard to setup, just tell it to make mingw make files, and set CC to the mingw cross compiler. If that doesn't work, it probably only needs a little bit of work. The cross compiler support is there, but just requires one long-ish option to activate: cmake -DCMAKE_TOOLCHAIN_FILE=cmake/Toolchain-mingw.cmake . I'd integrate it better into the CMake build, but as far as I know, there are no standards for cross compilers. We have to know where the root of the cross compile environment is, e.g. "/usr/local/cross-tools", and the name of the C and C++ compilers, e.g. "i386-mingw-gcc". And of course the target system, e.g. "Windows". I could make them all options, but it's probably easier just to edit the Toolchain-mingw.cmake file. EDIT: actually, that would be too late. You really have to pass that on the command line.
|
SiegeLord
Member #7,827
October 2006
![]() |
Quote: The one thing that I would like to see added to allegro is pkg-config support. Here's how taglib does it (it's some KDE library). If we need more dependencies we can find paths to them via CMake functions for that I'd imagine. configure_file(${CMAKE_CURRENT_SOURCE_DIR}/taglib_c.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/taglib_c.pc ) #Later... INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/taglib_c.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) Where taglib_c.pc.cmake contains: prefix=${CMAKE_INSTALL_PREFIX} exec_prefix=${CMAKE_INSTALL_PREFIX} libdir=${LIB_INSTALL_DIR} includedir=${INCLUDE_INSTALL_DIR} Name: TagLib C Bindings Description: Audio meta-data library (C bindings) Requires: taglib Version: ${TAGLIB_LIB_MAJOR_VERSION}.${TAGLIB_LIB_MINOR_VERSION}.${TAGLIB_LIB_PATCH_VERSION} Libs: -L${LIB_INSTALL_DIR} -ltag_c Cflags: -I=${INCLUDE_INSTALL_DIR}/taglib
"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
Peter Wang
Member #23
April 2000
|
How would you choose profiling or debug libraries? More .pc files?
|
SiegeLord
Member #7,827
October 2006
![]() |
I'd imagine so, yes. I can't seem to find an example of such a library that has these different versions to confirm that though. "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
|
|