From: Earnie B. <ea...@us...> - 2013-02-22 03:50:54
|
On Thu, Feb 21, 2013 at 6:05 PM, Erwin Waterlander wrote: > Greg Chicares schreef, Op 21-2-2013 23:15: >> On 2013-02-20 22:06Z, Erwin Waterlander wrote: >> [...] >>> Configure hangs forever during this step: >>> >>> checking whether strstr works in linear time... >> According to this report, it can take several minutes: >> >> http://sourceware.org/ml/libc-alpha/2012-06/msg00772.html >> | > user 4m21.060s >> | >> | Yes, if an strstr implementation takes more than 4 minutes to search for >> | a 100000 byte long string in a 2000000 byte long string, it's quadratic >> | behaviour. >> >> That message also shows the source code, which contains this comment: >> >> | > | /* Failure to compile this test due to missing alarm is okay, >> | > | since all such platforms (mingw) also have quadratic strstr. */ >> | > | signal (SIGALRM, quit); >> >> The "mingw" comment wouldn't apply to MSYS, but perhaps MSYS's version >> of newlib has a strstr() that performs poorly on this test. >> >> You may wish to experiment with lower values of 'm' here: >> >> | > | size_t m = 1000000; >> | > | char *haystack = (char *) malloc (2 * m + 2); >> | > | char *needle = (char *) malloc (m + 2); >> >> If it works quickly with m=1000, and is noticeably slow with m=100000, >> then you could extrapolate how long m=1000000 would take...in order to >> guess whether the problem lies here, or elsewhere. I'm not set up to >> compile for MSYS, or I'd do it myself, sorry. >> > > Hi Greg, > > You solved the problem. The check was already running for three and a > half hours on my 2 year old desktop. By changing m to 1000 the test > finished in a second on my 6 year old laptop. Thanks! I remember the issue now. I thought this had been taken care of with updates to autoconf itself. I must be wrong. -- Earnie -- https://sites.google.com/site/earnieboyd |