Re: [GiNaC-list] Results of GiNaC (& CLN) builds
Sheplyakov Alexei wrote:
You should definitely read this: http://www.catb.org/~esr/faqs/smart-questions.html
and this: http://www.chiark.greenend.org.uk/~sgtatham/bugs.html
WARNING! These pages *DO NOT HAVE ANYTHING TO DO* with GiNaC! They try to give an idea how to ask questions the smart way.
I had to do several fresh starts of ginac from .tar.bz2 to find out
a workable use of the patch. As usual, patch -p0 < where/the_patch/is
Thanks for the information. I appreciate the helpful comments and information. But I didn't think I was being stupid or rude, and even though the references are likely to be helpful, I am taken aback by the seemingly implicit "prickly-pear" attitude of those articles, and moreover, I think that the advice misses the point that the world of ideas and systems tends to be quite a bit more complicated than what the author presumes. Contrary to what the author seems to believe, I do not think there is a universal, "true", "right", "one-size-fits-all" way to ask questions. Lots and lots of things in computer systems routinely seem to be "broken" and I don't think it is necessarily due to the fault of "Microsoft Windows" or the saving grace of UNIX/Linux systems design. For example, there seems to be no "html" target in GiNaC Makefiles in spite of what the documentation seems to indicate. It's not just GiNaC. It seems to be quite frequent that documentation is often out of sync with actual systems development. So I suppose "stupid" questions would be inevitable. I suppose I could write a book about what's "wrong" with modern computer systems. But that's not my purpose. What I'd like to do is to understand the design philosophy as to why certain legacy practices and legacy designs seem to be needed. So I try to frame my questions in a way that will solve the most problems most effectively rather than to interminably nitpick a million and one questions in protracted, excruciating detail. Design schemes and philosophies matter. (But I also agree that examples and pertinent detail matters.) The "right" level of abstraction matters. But abstraction is an extremely fluid commodity. There is a lot of arbitrariness to it. And it often has the danger of leading to factional ideologies, flame wars, religious wars, and so on. There are lots of unanswered questions I have about GiNaC and its build process. Here are a few of the seemingly more important ones: Why is it necessary to specify the installation root directory at the time of running configure? Why can't that be done _simply_ at the actual time of doing the installation? Why is it necessary to use libtool? Is libtool a "fixed", universal product? Or is it simply something that is tailored specifically to the particular build process, in this case GiNaC's. Why is it necessary to compile each library module twice? (I suppose the idea is that two different versions are needed for the two different potential forms of the library: "static" and "shared". Is this true?) If a .dll version is not possible, can all the excess machinations be eliminated by declaring "--disable-shared" on the configure command line? Shouldn't a comment to this effect be put in the installation documentation so that mingw-users don't needlessly go through the excess machinations in the hopes of getting a .dll? There are probably other important questions that ought to be asked here, but the above are the more salient ones that come to mind. Sheplyakov Alexei wrote:
./configure && make && make check && make install
works just fine.
If you happen to know a standard, "legacy"(?) configuration of your system that GiNaC build is happy with, I would expect your results. But when systems have a horrendous variety of degrees of freedom for creative, alternative designs, it is amazing the build process works at all. In any case, I would think it important to design the general build process to be both robust and flexible. Maybe this is not the right place to ask this question, but it does seem to matter here the most (grep is such a common tool that I doubt if there is a specific, preferred forum for this): I have not been able to get (cygwin or any other) grep to do a routine, "recursive" sweep through _all_ subdirectories. I have only been able to get sweeps at only fixed depths by using, for example, "./*/*/*" for the filename specification. Can anyone explain how to get a complete recursive sweep through all subdirectories with grep? The documentation seems to be silent on precisely what's needed here. Examples would help.
Richard Haney wrote:
There are lots of unanswered questions I have about GiNaC and its build process. Here are a few of the seemingly more important ones:
Why is it necessary to specify the installation root directory at the time of running configure? Why can't that be done _simply_ at the actual time of doing the installation?
Because the trinity of configure / make / make install is standard with GNU tools and well-known by most people who take delight in the luxury of compiling their software from sources. ;-) We don't want to reinvent the wheel in an area where we aren't experts. Anyway, specifying --prefix at configuration time makes sense since in some cases it is necessary to insert the prefix into non-source files (e.g. manpages) and specifying the prefix at the make install step may be too late. For the purpose of copying files from the built-area into their final places you are right, of course. Actually, you *can* specify the prefix at the make install step by saying make install prefix=/path/to/whereever. Surprise! But all this is rather off-topic.
Why is it necessary to use libtool? Is libtool a "fixed", universal product? Or is it simply something that is tailored specifically to the particular build process, in this case GiNaC's.
<http://www.gnu.org/software/libtool/>
Why is it necessary to compile each library module twice? (I suppose the idea is that two different versions are needed for the two different potential forms of the library: "static" and "shared". Is this true?)
Yes, this is true.
If a .dll version is not possible, can all the excess machinations be eliminated by declaring "--disable-shared" on the configure command line?
Yes, it can.
Shouldn't a comment to this effect be put in the installation documentation so that mingw-users don't needlessly go through the excess machinations in the hopes of getting a .dll?
I'm not so sure. I am quite happy that the details of building libraries are factored out and maintained separately. Doesn't your configure output list a line like "checking whether the gcc linker supports shared libraries..."? If that answer at the end of that line is no and it still builds every object twice, then you may wish to report that as a bug to the libtool maintainers. Regards -richy. -- Richard B. Kreckel <http://www.ginac.de/~kreckel/>
On Wed, Jul 19, 2006 at 10:45:13PM +0200, Richard B. Kreckel wrote:
Anyway, specifying --prefix at configuration time makes sense since in some cases it is necessary to insert the prefix into non-source files (e.g. manpages) and specifying the prefix at the make install step may be too late. I think the main reason is SONAME versus file name issue. Most ELF linkers record the expected runtime location of the shared library internally. Libtool tries to hide linker guts from the programmer, to do this it needs to know $libdir.
For the purpose of copying files from the built-area into their final places you are right, of course. Actually, you *can* specify the prefix at the make install step by saying make install prefix=/path/to/whereever. Do you mean "make install DESTDIR=/some/weird/dir"?
Surprise! Indeed. Because *sometimes* moving shared library could break it (have you ever seen cryptic "don't forget to run libtool --finish" warning?).
I'm not so sure. I am quite happy that the details of building libraries are factored out and maintained separately. Doesn't your configure output list a line like "checking whether the gcc linker supports shared libraries..."?
The linker *does* support shared libraries.
If that answer at the end of that line is no and it still builds every object twice, then you may wish to report that as a bug to the libtool maintainers.
Unfortunatelly, brain-dead nature of win32 dlls (all library symbols *must* be resolved at the link time) requires non-trivial effort from the library programmer (every user-visible extern foo bar must have __declspec boilerplate). I don't think libtool maintainers can do anything about this... So I propose to document that shared libraries are not supported on MinGW. What about this patch? Index: INSTALL =================================================================== RCS file: /home/cvs/GiNaC/INSTALL,v retrieving revision 1.54 diff -u -r1.54 INSTALL --- INSTALL 19 Oct 2005 20:54:13 -0000 1.54 +++ INSTALL 20 Jul 2006 13:37:43 -0000 @@ -56,9 +56,8 @@ $ make check -The "configure" script (and "autogen.sh", which invokes "configure") can be -given a number of options to enable and disable various features. For a -complete list, type: +The "configure" script can be given a number of options to enable and +disable various features. For a complete list, type: $ ./configure --help @@ -113,3 +112,16 @@ Building GiNaC requires many standard header files. If you get a configure error complaining about such missing files your compiler and library are probably not up to date enough and it's no worth continuing. + + +PLATFORM-SPECIFIC ISSUES +======================== + +win32 (MinGW) +----- +GNU compiler and linker are *required* in order to compile GiNaC (you +can download them from <http://www.mingw.org>). Note that shared libraries +(DLLs) are *not supported* at the moment, so you might want to use +--disable-shared option to save compilation time. +To build ginsh modified version of GNU readline library is necessary. It +is available at <http://gnuwin32.sourceforge.net/packages/readline.htm>. -- All science is either physics or stamp collecting.
Sheplyakov Alexei wrote:
So I propose to document that shared libraries are not supported on MinGW. What about this patch?
Index: INSTALL =================================================================== [...] --- INSTALL 19 Oct 2005 20:54:13 -0000 1.54 +++ INSTALL 20 Jul 2006 13:37:43 -0000 [...] +To build ginsh modified version of GNU readline library is necessary. It +is available at <http://gnuwin32.sourceforge.net/packages/readline.htm>. [...]
I tried using the libreadline.a from downloaded binaries (the "all-but-source" package) given by the link http://gnuwin32.sourceforge.net/packages/readline.htm , but "-lreadline" in place of "-lreadline -ltermcap" is not sufficient to satisfy all references at link time. In fact, the reference page indicted way at the bottom of the page in not-quite-fine print that library libgw32c is also required; and clicking on the link provided leads to another page of information and a download link. To summarize, compiling and linking my simple test program required that I specify -lreadline , -lgw32c , -lole32 , -luuid, -lwsock32, and -lmsvcp60 . That second information page -- the page for libgw32c.a -- indicated that "standard" libraries libole32.a, libuuid.a, and libwsock32.a were required, but the need for libmsvcp60.a was not mentioned; that need was only discovered by "grep"ing in "C:/Dev-Cpp/lib" for one of the otherwise unresolved external references. These library specifications are a lot more than the two now required on the linker command line: "-lreadline -ltermcap" (or perhaps "-lreadline -lcurses"). This seems like a lot more complexity, and for what? To simply adhere more strictly to a legacy UNIX style? I guess that may make it easier to port new changes to Windows/cygwin/MinGW without having to add lots of complicated logic in conditional-compile preprocessor statements and/or add possibly other complicated logic in Makefiles. Is that true? I suppose that may translate into generally easier maintenance and fewer bugs. As far as I know, the only version of libreadline.a that will satisfy the _existing_ configure test for a usable readline function is the one I created by inserting the three termcap modules into the libreadline.a I built from source. Incidentally, I tried rebuilding ginsh with "C:/Program Files/GnuWin32/bin/readline5.dll" specified (quotes included or not) as part of the GINSH_LIBS value and got a linktime message: libtool: link: cannot find the library `' , but when I copied the .dll to "C:/Dev-Cpp/bin" and used "C:/Dev-Cpp/bin/readline5.dll" instead, there was no problem. "C:/Program Files/GnuWin32" is where the downloaded readline installer puts the installed package, but it seems that libtool probably chokes on the space in the pathname. So it seems that that modified readline ought to be moved or copied to some other location that doesn't have a space in its pathname. Note also that the downloaded binaries are for version 5.0, whereas the most recent stable, unmodified version as of June 19 is 5.1. Also, there seems to be no mention on the web page or in the downloaded files as to which version of MinGW gcc was used for compiling the packaged binaries. Richard Haney __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
participants (3)
-
Richard B. Kreckel
-
Richard Haney
-
varg@theor.jinr.ru