Код | Installing Coro (5.372) Running [C:\Perl\bin\perl.exe C:\Perl\site\bin\cpanp-run-perl C:\DOCUME~1\Admin\ APPLIC~1\CPANPL~1\510~1.1\build\Coro-5.372\Makefile.PL]... Set up gcc environment - 3.4.5 (mingw-vista special r3) *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
*** Event not found, not build Event support.
*** EV not found, not build EV support.
Checking if your kit is complete... Looks good Warning: prerequisite Guard 0.5 not found.
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Coro has a number of configuration options. Due to its maturity, the defaults that Coro chooses are usually fine, so you can decide to skip these questions. Only if something went wrong you should select 'n' here and manually configure Coro, and, of course, report this to the maintainer :)
Skip further questions and use defaults (y/n)? [y]
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Coro can use a number of methods to implement coroutines at the C level. The default chosen is based on your current confguration and is correct in most cases, but you still can chose between these alternatives:
u The unix 'ucontext.h' functions are relatively new and not implemented or well-tested in older unices. They allow very fast coroutine creation and reasonably fast switching. They are, however, usually slower than the other alternatives due to an extra syscall done by swapcontext. And while nominally most portable (it's the only POSIX-standardised interface for coroutines), ucontext functions are, as usual, broken on most/all BSDs.
s If the ucontext functions are not working or you don't want to use them for other reasons you can try a workaround using setjmp/longjmp/sigaltstack (also standard unix functions). Coroutine creation is rather slow, but switching is very fast (often much faster than with the ucontext functions). Unfortunately, glibc-2.1 and below don't even feature a working sigaltstack. You cannot use this implementation if some other code uses SIGUSR2 or you plan to create coroutines from an alternative signal stack, as both are being used for coroutine creation.
a Handcoded assembly. This is the fastest and most compatible method, with the least side effects, if it works, that is. It has been tested on GNU/Linux x86 and x86_64 systems and should work on all x86/x86_64 systems using the SVR ELF ABI (it is also reported to be working on Strawberry Perl for Windows using MinGW). This is the recommended method on supported platforms. When it doesn't work, use another method, such as (s)etjmp/longjmp.
l GNU/Linux. Very old GNU/Linux systems (glibc-2.1 and below) need this hack. Since it is very linux-specific it is also quite fast and recommended even for newer versions; when it works, that is (currently x86 and a few others only. If it compiles, it's usually ok). Newer glibc versions (>= 2.5) stop working with this implementation however.
i IRIX. For some reason, SGI really does not like to follow POSIX (does that surprise you?), so this workaround might be needed (it's fast), although [s] and [u] should also work now.
w Microsoft Windows. Try this on Microsoft Windows when using Cygwin or the MSVC compilers (e.g. ActiveState Perl, but see "a" for Strawberry Perl), although, as there is no standard on how to do this under windows, different environments might work differently. Doh.
p Use pthread API. Try to avoid this option, it was only created to make a point about the programming language shootout. It is unlikely to work with perls that have windows process emulation enabled ("perl threads"). It is also likely the slowest method of implementing coroutines. It might work fine as a last resort, however, as the pthread API is slightly better tested than ucontext functions for example. Of course, not on BSDs, who usually have very broken pthread implementations.
Coro tries hard to come up with a suitable default for most systems, so pressing return at the prompt usually does the right thing. If you experience problems (e.g. make test fails) then you should experiment with this setting.
Use which implementation, <s>etjmp, <u>ctx, <a>sm, <i>rix, <l>inux, <w>indows or <p>threads? [w] w
Using windows-specific implementation
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Per-context stack size factor: Depending on your settings, Coro tries to share the C stacks is creates as much as possible, but sometimes it needs to allocate a new one. This setting controls the maximum size that gets allocated, and should not be set too high, as memory and address space still is wasted even if it's not fully used. The value entered will be multiplied by sizeof(long), which is usually 4 on 32-bit systems, and 8 on 64-bit systems.
A setting of 16384 (the default) therefore corresponds to a 64k..128k stack, which usually is ample space (you might even want to try 8192 or lower if your program creates many coroutines).
On systems supporting mmap and dynamic memory management, the actual memory usually gets allocated on demand, but with many large stacks you can still run out of address space on your typical 32 bit platform (not to forget the pagetables).
Some perls (mostly threaded ones and perl compiled under linux 2.6) and some programs (inefficient regexes can use a lot of stack space) may need much, much more: If Coro segfaults with weird backtraces (e.g. in a function prologue) or in t/10_bugs.t, you might want to increase this to 65536 or more.
The default should be fine, and can be changed at runtime with Coro::State::cctx_stacksize.
C stack size factor? [16384] 16384 using a stacksize of 16384 * sizeof(long)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Coro can optionally put a guard area before each stack segment: When the stack is too small and the access is not too far outside the stack (i.e. within the guard area), then the program will safely segfault instead of running into other data. The cost is some additional overhead with is usually negligible, and extra use of address space.
The guard area size currently needs to be specified in pages (typical pagesizes are 4k and 8k). The guard area is only enabled on a few hardcoded architectures and is ignored on others. The actual preprocessor expression disables this feature if:
!__i386 && !__x86_64 && !__powerpc && !__m68k && !__alpha && !__mips && !__sparc64
The default, as usual, should be just fine.
Number of guard pages (0 disables)? [4] 4
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Coro can tell valgrind about its stacks and so reduce spurious warnings where valgrind would otherwise complain about possible stack switches.
Enabling this does not incur noticable runtime or memory overhead, but it requires that you have the <valgrind/valgrind.h> header file available.
Valgrind support is completely optional, so disabling it is the safe choice.
Enable valgrind support (y/n)? [n] n
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Coro can use (or even trick) some perl functions into doing what it needs instead of relying on (some) of its own functions. This might increase chances that it compiles and works, but it could just as well result in memory leaks, crashes or silent data corruption. It certainly does result in slightly slower speed and higher memory consumption, though, so YOU SHOULD ENABLE THIS OPTION ONLY AS A LAST RESORT.
Prefer perl functions over coro functions (y/n)? [n] n
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Coro has experimental support for cloning states. This can be used to implement a scheme-like call/cc. However, this doesn't add to the expressiveness in general, and is likely perl-version specific (and perl 5.12 deliberately removed support for it). As such, it is disabled by default. Enable it when you want to play around with it, but note that it isn't supported, and unlikely ever will be. It exists mainly to prove that it could be done - if only it were useful for something.
Implement Coro::State->clone method (y/n)? [n] n
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Writing Makefile for Coro::State Writing Makefile for Coro
Module 'Coro' requires 'Guard' to be installed
If you don't wish to see this question anymore you can disable it by entering the following commands on the prompt: 's conf prereqs 1; s save'
1> Yes 2> No 3> Yes to all (for this module) 4> No to all (for this module)
Should I install this module? [1]: 3 [ERROR] Could not read C:\DOCUME~1\Admin\APPLIC~1\CPANPL~1\510~1.1\build\Guard-1 .021\META.yml: 'Parse::CPAN::Meta failed to classify line '{' at C:/Perl/site/li b/CPANPLUS/Dist.pm line 365 '
Running [C:\Perl\bin\perl.exe C:\Perl\site\bin\cpanp-run-perl C:\DOCUME~1\Admin\ APPLIC~1\CPANPL~1\510~1.1\build\Guard-1.021\Makefile.PL]... Set up gcc environment - 3.4.5 (mingw-vista special r3) Checking if your kit is complete... Looks good Writing Makefile for Guard Running [C:\Perl\site\bin\dmake.exe test]... C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t t/00_load.t .... ok t/01_scoped.t .. ok t/02_guard.t ... ok t/03_die.t ..... ok All tests successful. Files=4, Tests=33, 0 wallclock secs ( 0.03 usr + 0.05 sys = 0.08 CPU) Result: PASS Running [C:\Perl\site\bin\dmake.exe test]... C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t t/00_basic.t ...... ok t/01_process.t .... ok t/02_channel.t .... ok t/03_channel.t .... ok t/04_rwlock.t ..... ok t/05_specific.t ... ok t/06_prio.t ....... ok t/07_eval.t ....... ok t/08_join.t ....... ok t/10_bugs.t ....... ok t/11_deadlock.t ... skipped: (no reason given) t/12_exit.t ....... skipped: (no reason given) t/13_diewarn.t .... ok t/14_load.t ....... ok t/15_semaphore.t .. ok t/16_signal.t ..... ok t/17_rouse.t ...... ok t/18_winder.t ..... ok t/19_handle.t ..... skipped: Broken perl detected, skipping tests. All tests successful. Files=19, Tests=172, 3 wallclock secs ( 0.16 usr + 0.05 sys = 0.20 CPU) Result: PASS 'No tests defined for Coro::State extension.' *** Install log written to: C:\Documents and Settings\Admin\Application Data\.cpanplus\install-logs\Coro-5 .372-1305902908.log
Module 'Coro' installed successfully No errors installing all modules
|
Windows XP mingw perl 5.10
Добавлено через 3 минуты и 38 секунд
1. Для этого качаете mingw и устанавливаете его. после установки вам нужно добавить его в PATH. 2. Cкачиваете dmake. Разархивируете его куда нибудь и добавляете эту папку в PATH
3.Скачиваете модуль ExtUtils-FakeConfig и устанавливаете его. |