Installing Event::Lib in CitrusPerl install on Mac OS X 10.7 - perl

I'm working on a Perl project that requires Event::Lib. I'm on MacOS 10.7, and am running Citrus Perl instead of the system Perl. I installed libevent from source and it compiled fine. But, when I go to install Event::Lib, I run into some errors:
cp Lib/Event/Lib.pm blib/lib/Event/Lib.pm
Skip blib/lib/Event/Lib.pm (unchanged)
/Users/username/code/CitrusPerl/bin/perl /Users/username/code/CitrusPerl/lib/ExtUtils/xsubpp -typemap /Users/username/code/CitrusPerl/lib/ExtUtils/typemap -typemap typemap Lib.xs > Lib.xsc && mv Lib.xsc Lib.c
gcc -c -I/usr/local/include -fno-common -DPERL_DARWIN -no-cpp-precomp -arch i386 -B/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/gcc -B/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/lib/gcc -isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks -mmacosx-version-min=10.6 -DUSE_SITECUSTOMIZE -Duselargefiles -DPERL_RELOCATABLE_INCPUSH -fno-merge-constants -fno-strict-aliasing -pipe -fstack-protector -O3 -DVERSION=\"1.03\" -DXS_VERSION=\"1.03\" "-I/Users/username/code/CitrusPerl/lib/CORE" -DHAVE_CONFIG_H Lib.c
Lib.xs: In function ‘boot_Event__Lib’:
Lib.xs:275: error: ‘LOG_LEVEL’ undeclared (first use in this function)
Lib.xs:275: error: (Each undeclared identifier is reported only once
Lib.xs:275: error: for each function it appears in.)
make: *** [Lib.o] Error 1
Does anyone have any ideas on what to try next?
EDIT: After attempting some 'o conf' options:
cpan[1]> o conf makepl_arg "INC=-I/usr/local/include LIBS=-L/usr/local/lib -levent"
makepl_arg [INC=-I/usr/local/include LIBS=-L/usr/local/lib -levent]
Your /Users/username/code/CitrusPerl/vendor/lib/CPAN/Config.pm file
is not writable. I will attempt to write your configuration to
/Users/username/.cpan/CPAN/MyConfig.pm instead.
Old configuration file /Users/username/.cpan/CPAN/MyConfig.pm
moved to /Users/username/.cpan/CPAN/MyConfig.pm.bak
commit: wrote '/Users/username/.cpan/CPAN/MyConfig.pm'
cpan[2]> install Event::Lib
Reading '/Users/username/code/CitrusPerl/cpan/Metadata'
Database was generated on Thu, 07 Feb 2013 21:53:02 GMT
Fetching with LWP:
http://www.perl.org/CPAN/authors/01mailrc.txt.gz
Reading '/Users/username/code/CitrusPerl/cpan/sources/authors/01mailrc.txt.gz'
............................................................................DONE
Fetching with LWP:
http://www.perl.org/CPAN/modules/02packages.details.txt.gz
Reading '/Users/username/code/CitrusPerl/cpan/sources/modules/02packages.details.txt.gz'
Database was generated on Thu, 14 Feb 2013 15:41:03 GMT
............................................................................DONE
Fetching with LWP:
http://www.perl.org/CPAN/modules/03modlist.data.gz
Reading '/Users/username/code/CitrusPerl/cpan/sources/modules/03modlist.data.gz'
............................................................................DONE
Writing /Users/username/code/CitrusPerl/cpan/Metadata
Running install for module 'Event::Lib'
Running make for V/VP/VPARSEVAL/Event-Lib-1.03.tar.gz
Fetching with LWP:
http://www.perl.org/CPAN/authors/id/V/VP/VPARSEVAL/Event-Lib-1.03.tar.gz
Checksum for /Users/username/code/CitrusPerl/cpan/sources/authors/id/V/VP/VPARSEVAL/Event-Lib-1.03.tar.gz ok
Scanning cache /Users/username/code/CitrusPerl/cpan/build for sizes
............................................................................DONE
CPAN.pm: Building V/VP/VPARSEVAL/Event-Lib-1.03.tar.gz
Checking existance of libevent...ld: warning: directory not found for option '-L/sw/lib'
ld: warning: directory not found for option '-L/opt/local/lib'
yes
Checking capabilities...
event_set_log_callback...no
event_priority_init...no
Additional defines:
Checking if your kit is complete...
Looks good
Writing Makefile for Event::Lib
Writing MYMETA.yml and MYMETA.json
cp Lib/Event/Lib.pm blib/lib/Event/Lib.pm
Skip blib/lib/Event/Lib.pm (unchanged)
/Users/username/code/CitrusPerl/bin/perl /Users/username/code/CitrusPerl/lib/ExtUtils/xsubpp -typemap /Users/username/code/CitrusPerl/lib/ExtUtils/typemap -typemap typemap Lib.xs > Lib.xsc && mv Lib.xsc Lib.c
gcc -c -I/usr/local/include -fno-common -DPERL_DARWIN -no-cpp-precomp -arch i386 -B/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/gcc -B/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/lib/gcc -isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks -mmacosx-version-min=10.6 -DUSE_SITECUSTOMIZE -Duselargefiles -DPERL_RELOCATABLE_INCPUSH -fno-merge-constants -fno-strict-aliasing -pipe -fstack-protector -O3 -DVERSION=\"1.03\" -DXS_VERSION=\"1.03\" "-I/Users/username/code/CitrusPerl/lib/CORE" -DHAVE_CONFIG_H Lib.c
Lib.xs: In function ‘boot_Event__Lib’:
Lib.xs:275: error: ‘LOG_LEVEL’ undeclared (first use in this function)
Lib.xs:275: error: (Each undeclared identifier is reported only once
Lib.xs:275: error: for each function it appears in.)
make: *** [Lib.o] Error 1
VPARSEVAL/Event-Lib-1.03.tar.gz
/usr/bin/make -- NOT OK
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
Failed during this command:
VPARSEVAL/Event-Lib-1.03.tar.gz : make NO

I was able to get this to work in about 10 minutes time.
Use Perlbrew
Use Homebrew
Then:
brew install libevent
perlbrew install perl-5.16.0
perlbrew switch perl-5.16.0
perl -MCPAN -e 'install Event::Lib'
I think the above are the best utilities to provide a proper development environment that you can switch up; IE you can switch Perl versions of the fly. Additionally they wont impact your native system. Anyways if you decide not to use the aforementioned, your particular error looks to be about a missing header file. I would assert that the libevent headers are indeed in /usr/local/include.
Good luck.

Related

Cannot install Net::SSLeay using CPAN: /bin/sh: x86_64-apple-darwin13.4.0-clang: command not found

I am trying to install Net::SSLeay using CPAN. I am working on a mac and openssl is installed, it is giving me the error: /bin/sh: x86_64-apple-darwin13.4.0-clang: command not found. This was during a force install -- here is the entire output:
cpan[1]> force install Net::SSLeay
Reading '/Users/me/.cpan/Metadata'
Database was generated on Sat, 14 Nov 2020 21:29:03 GMT
Running install for module 'Net::SSLeay'
Checksum for /Users/me/.cpan/sources/authors/id/C/CH/CHRISN/Net-SSLeay-1.88.tar.gz ok
Scanning cache /Users/me/.cpan/build for sizes
............................................................................DONE
'YAML' not installed, will not store persistent state
Configuring C/CH/CHRISN/Net-SSLeay-1.88.tar.gz with Makefile.PL
Do you want to run external tests?
These tests *will* *fail* if you do not have network connectivity. [n] y
*** Found OpenSSL-1.1.1h installed in /usr/local/opt/openssl
*** Be sure to use the same compiler and options to compile your OpenSSL, perl,
and Net::SSLeay. Mixing and matching compilers is not supported.
Checking if your kit is complete...
Looks good
Warning (mostly harmless): No library found for -lz
Generating a Unix-style Makefile
Writing Makefile for Net::SSLeay
Writing MYMETA.yml and MYMETA.json
CHRISN/Net-SSLeay-1.88.tar.gz
/Users/me/miniconda3/bin/perl Makefile.PL -- OK
Running make for C/CH/CHRISN/Net-SSLeay-1.88.tar.gz
cp lib/Net/SSLeay.pod blib/lib/Net/SSLeay.pod
cp lib/Net/SSLeay/Handle.pm blib/lib/Net/SSLeay/Handle.pm
cp lib/Net/SSLeay.pm blib/lib/Net/SSLeay.pm
AutoSplitting blib/lib/Net/SSLeay.pm (blib/lib/auto/Net/SSLeay)
blib/lib/Net/SSLeay.pm: some names are not unique when truncated to 8 characters:
directory blib/lib/auto/Net/SSLeay:
do_https3.al, do_https2.al, do_https4.al, do_https.al truncate to do_https
do_httpx3.al, do_httpx2.al, do_httpx4.al truncate to do_httpx
get_https.al, get_https3.al, get_https4.al, get_http.al, get_http3.al, get_http4.al, get_httpx.al, get_httpx3.al, get_httpx4.al truncate to get_http
head_https.al, head_https3.al, head_https4.al, head_http.al, head_http3.al, head_http4.al, head_httpx.al, head_httpx3.al, head_httpx4.al truncate to head_htt
post_https.al, post_https3.al, post_https4.al, post_http.al, post_http3.al, post_http4.al, post_httpx.al, post_httpx3.al, post_httpx4.al truncate to post_htt
put_https.al, put_https3.al, put_https4.al, put_http.al, put_http3.al, put_http4.al, put_httpx.al, put_httpx3.al, put_httpx4.al truncate to put_http
ssl_read_all.al, ssl_read_until.al, ssl_read_CRLF.al truncate to ssl_read
ssl_write_all.al, ssl_write_CRLF.al truncate to ssl_writ
tcp_read_all.al, tcp_read_until.al, tcp_read_CRLF.al truncate to tcp_read
tcp_write_all.al, tcp_write_CRLF.al truncate to tcp_writ
Running Mkbootstrap for SSLeay ()
chmod 644 "SSLeay.bs"
"/Users/me/miniconda3/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- SSLeay.bs blib/arch/auto/Net/SSLeay/SSLeay.bs 644
"/Users/me/miniconda3/bin/perl" "/Users/me/miniconda3/lib/5.26.2/ExtUtils/xsubpp" -typemap '/Users/me/miniconda3/lib/5.26.2/ExtUtils/typemap' -typemap '/Users/me/.cpan/build/Net-SSLeay-1.88-2/typemap' SSLeay.xs > SSLeay.xsc
mv SSLeay.xsc SSLeay.c
x86_64-apple-darwin13.4.0-clang -c -I"/usr/local/opt/openssl/include" -fno-common -DPERL_DARWIN -no-cpp-precomp -mmacosx-version-min=10.9 -fno-strict-aliasing -pipe -fstack-protector-strong -DPERL_USE_SAFE_PUTENV -O3 -DVERSION=\"1.88\" -DXS_VERSION=\"1.88\" -fPIC --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk "-I/Users/me/miniconda3/lib/5.26.2/darwin-thread-multi-2level/CORE" SSLeay.c
/bin/sh: x86_64-apple-darwin13.4.0-clang: command not found
make: *** [Makefile:350: SSLeay.o] Error 127
CHRISN/Net-SSLeay-1.88.tar.gz
/Users/me/miniconda3/bin/make -- NOT OK
Failed during this command:
CHRISN/Net-SSLeay-1.88.tar.gz : make NO
If I could get some help installing this module it would be much appreciated. Other people have run into similar problems here, but they are always solved by installing openssl... I have already done this. Thanks.
You've got a wrong perl.
Your perl -V:cc configuration defines an invalid compiler, so you cannot compile extensions. You need a new perl, or fixup your two Config modules defining this wrong compiler.
Like as with:
sed -i 's,x86_64-apple-darwin13.4.0-clang,gcc,' `perl -V::archlib:`/Config_heavy.pl `perl -V::archlib:`/Config.pm

ld unknown option -platform_version while installing perl package

I am trying to install perl package DBD::Pg in my macOS Mojave Version 10.14.6. But I get error for unknown option -platform_version and does not allow make command to continue. How would I be able to solve this? Thank you!
The following is the error I observe
ld: unknown option: -platform_version
clang-10: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [blib/arch/auto/DBD/Pg/Pg.bundle] Error 1
ld version
ld -v
#(#)PROGRAM:ld PROJECT:ld64-450.3
BUILD 18:16:53 Apr 5 2019
configured to support archs: armv6 armv7 armv7s arm64 arm64e arm64_32 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em
LTO support using: LLVM version 10.0.1, (clang-1001.0.46.4) (static support for 22, runtime is 22)
TAPI support using: Apple TAPI version 10.0.1 (tapi-1001.0.4.1)
clang version
clang -v
clang version 10.0.0
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Users/macuser/miniconda3/bin
I updated my Xcode and got clang version 11.0.3 Then I had problems in 'make install' command. I could solve that using the suggestions from the thread https://github.com/bucardo/dbdpg/issues/69 #briandfoy posted. Thank you very much!
I tried this on macOS 10.15.5, perlbrew perl 5.30.1.
First I installed PostgreSQL version 12.3 from
https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
Downloaded the perl module DBD::Pg tarball https://cpan.metacpan.org/authors/id/T/TU/TURNSTEP/DBD-Pg-3.13.0.tar.gz
Installed the package:
$ POSTGRES_HOME=/Library/PostgreSQL/12 perl Makefile.PL
Configuring DBD::Pg 3.13.0
PostgreSQL version: 120003 (default port: 5432)
POSTGRES_HOME: /Library/PostgreSQL/12
POSTGRES_INCLUDE: /Library/PostgreSQL/12/include
POSTGRES_LIB: /Library/PostgreSQL/12/lib
OS: darwin
Checking if your kit is complete...
Looks good
Using DBI 1.643 (for perl 5.030001 on darwin-2level) installed in /Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/lib/site_perl/5.30.1/darwin-2level/auto/DBI/
Generating a Unix-style Makefile
Writing Makefile for DBD::Pg
Writing MYMETA.yml and MYMETA.json
$ make
cp Pg.pm blib/lib/DBD/Pg.pm
cp lib/Bundle/DBD/Pg.pm blib/lib/Bundle/DBD/Pg.pm
Running Mkbootstrap for Pg ()
chmod 644 "Pg.bs"
"/Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Pg.bs blib/arch/auto/DBD/Pg/Pg.bs 644
"/Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/bin/perl" -p -e "s/~DRIVER~/Pg/g; s/^do\(/dontdo\(/" /Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/lib/site_perl/5.30.1/darwin-2level/auto/DBI/Driver.xst > Pg.xsi
"/Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/bin/perl" "/Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/lib/5.30.1/ExtUtils/xsubpp" -typemap '/Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/lib/5.30.1/ExtUtils/typemap' Pg.xs > Pg.xsc
mv Pg.xsc Pg.c
cc -c -I/Library/PostgreSQL/12/include -I/Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/lib/site_perl/5.30.1/darwin-2level/auto/DBI -fno-common -DPERL_DARWIN -mmacosx-version-min=10.15 -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -DPERL_USE_SAFE_PUTENV -DPGLIBVERSION=120003 -DPGDEFPORT=5432 -O3 -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc -DVERSION=\"3.13.0\" -DXS_VERSION=\"3.13.0\" "-I/Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/lib/5.30.1/darwin-2level/CORE" Pg.c
cc -c -I/Library/PostgreSQL/12/include -I/Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/lib/site_perl/5.30.1/darwin-2level/auto/DBI -fno-common -DPERL_DARWIN -mmacosx-version-min=10.15 -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -DPERL_USE_SAFE_PUTENV -DPGLIBVERSION=120003 -DPGDEFPORT=5432 -O3 -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc -DVERSION=\"3.13.0\" -DXS_VERSION=\"3.13.0\" "-I/Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/lib/5.30.1/darwin-2level/CORE" dbdimp.c
cc -c -I/Library/PostgreSQL/12/include -I/Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/lib/site_perl/5.30.1/darwin-2level/auto/DBI -fno-common -DPERL_DARWIN -mmacosx-version-min=10.15 -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -DPERL_USE_SAFE_PUTENV -DPGLIBVERSION=120003 -DPGDEFPORT=5432 -O3 -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc -DVERSION=\"3.13.0\" -DXS_VERSION=\"3.13.0\" "-I/Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/lib/5.30.1/darwin-2level/CORE" quote.c
cc -c -I/Library/PostgreSQL/12/include -I/Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/lib/site_perl/5.30.1/darwin-2level/auto/DBI -fno-common -DPERL_DARWIN -mmacosx-version-min=10.15 -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -DPERL_USE_SAFE_PUTENV -DPGLIBVERSION=120003 -DPGDEFPORT=5432 -O3 -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc -DVERSION=\"3.13.0\" -DXS_VERSION=\"3.13.0\" "-I/Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/lib/5.30.1/darwin-2level/CORE" types.c
rm -f blib/arch/auto/DBD/Pg/Pg.bundle
LD_RUN_PATH="/Library/PostgreSQL/12/lib" cc -mmacosx-version-min=10.15 -bundle -undefined dynamic_lookup -L/usr/local/lib -fstack-protector-strong Pg.o dbdimp.o quote.o types.o -o blib/arch/auto/DBD/Pg/Pg.bundle \
-L/Library/PostgreSQL/12/lib -lpq -lm \
chmod 755 blib/arch/auto/DBD/Pg/Pg.bundle
Manifying 2 pod documents
$ make test
"/Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00_signature.t ....... skipped: Set the environment variable TEST_SIGNATURE to enable this test
t/00basic.t ............ ok
t/01connect.t .......... Please wait, creating new database (version 12.3) for testing
t/01connect.t .......... 1/15 #
# DBI Version 1.643
# DBD::Pg Version 3.13.0
# Perl Version 5.30.1
# OS darwin
# PostgreSQL (compiled) 120003
# PostgreSQL (target) 120300
# PostgreSQL (reported) PostgreSQL 12.3 on x86_64-apple-darwin, compiled by Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn), 64-bit
# Default port 5432
# DBI_DSN dbi:Pg:db="postgres";port=5440;host=<pwd>/dbdpg_test_database/data/socket
# DBI_USER hakonhaegland
# Test schema dbd_pg_testschema
# LANG C
# Adjusted: initdb
t/01connect.t .......... ok
t/01constants.t ........ ok
t/02attribs.t .......... ok
t/03dbmethod.t ......... ok
t/03smethod.t .......... ok
t/04misc.t ............. ok
t/06bytea.t ............ ok
t/07copy.t ............. ok
t/08async.t ............ ok
t/09arrays.t ........... ok
t/10_pg_error_field.t .. ok
t/12placeholders.t ..... ok
t/20savepoints.t ....... ok
t/30unicode.t .......... ok
t/99cleanup.t .......... ok
All tests successful.
Files=17, Tests=2908, 31 wallclock secs ( 0.55 usr 0.11 sys + 5.99 cusr 2.38 csys = 9.03 CPU)
Result: PASS
$ make install
"/Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Pg.bs blib/arch/auto/DBD/Pg/Pg.bs 644
Manifying 2 pod documents
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
Installing /Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/lib/site_perl/5.30.1/darwin-2level/auto/DBD/Pg/Pg.bundle
Installing /Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/lib/site_perl/5.30.1/darwin-2level/Bundle/DBD/Pg.pm
Installing /Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/lib/site_perl/5.30.1/darwin-2level/DBD/Pg.pm
Installing /Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/man/man3/Bundle::DBD::Pg.3
Installing /Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/man/man3/DBD::Pg.3
Appending installation info to /Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/lib/5.30.1/darwin-2level/perllocal.pod
My compiler version is:
$ cc --version
Apple clang version 11.0.0 (clang-1100.0.33.17)
Target: x86_64-apple-darwin19.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Dmake file error with Math::TrulyRandom module

I listened to this one person's advice when I tried installing Math::TrulyRandom (A random number generator vs pseudorandom), I was running 'dmake' and he told me to ask about the errors on a different question.
My first question is here.
Here is what went wrong in the terminal:
C:\Users\Jlinne\Documents> cpanm --prompt Math::TrulyRandom
--> Working on Math::TrulyRandom
Fetching http://www.cpan.org/authors/id/G/GA/GARY/Math-TrulyRandom-1.0.tar.gz ... OK
Configuring Math-TrulyRandom-1.0 ... OK
Building and testing Math-TrulyRandom-1.0 ... Building Math-TrulyRandom-1.0 failed.
You can s)kip, r)etry, e)xamine build log, or l)ook ? [s] l
Entering C:/Users/Jlinne/.cpanm/work/1476593741.7660/Math-TrulyRandom-1.0 with C:\WINDOWS\system32\cmd.exe
Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.
C:\Users\Jlinne\.cpanm\work\1476593741.7660\Math-TrulyRandom-1.0>perl Makefile.PL
Generating a dmake-style Makefile
Writing Makefile for Math::TrulyRandom
Writing MYMETA.yml and MYMETA.json
C:\Users\Jlinne\.cpanm\work\1476593741.7660\Math-TrulyRandom-1.0>dmake
Skip blib\lib\Math\TrulyRandom.pm (unchanged)
Skip blib\lib\Math\TrulyRandom.pod (unchanged)
Running Mkbootstrap for Math::TrulyRandom ()
"C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command -e chmod -- 644 "TrulyRandom.bs"
gcc -c -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fwrapv -fno-strict-aliasing -mms-bitfields -s -O2 -DVERSION=\"1.0\" -DXS_VERSION=\"1.0\" "-IC:\STRAWB~1\perl\lib\CORE" TrulyRandom.c
gcc -c -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fwrapv -fno-strict-aliasing -mms-bitfields -s -O2 -DVERSION=\"1.0\" -DXS_VERSION=\"1.0\" "-IC:\STRAWB~1\perl\lib\CORE" truerand.c
truerand.c: In function 'tick':
truerand.c:57:19: error: storage size of 'it' isn't known
struct itimerval it, oit;
^
truerand.c:57:23: error: storage size of 'oit' isn't known
struct itimerval it, oit;
^
truerand.c:62:16: error: 'ITIMER_REAL' undeclared (first use in this function)
if (setitimer(ITIMER_REAL, &it, &oit) < 0)
^
truerand.c:62:16: note: each undeclared identifier is reported only once for each function it appears in
truerand.c: In function 'interrupt':
truerand.c:71:16: error: 'SIGALRM' undeclared (first use in this function)
(void) signal(SIGALRM, interrupt);
^
truerand.c: In function 'roulette':
truerand.c:86:16: error: 'SIGALRM' undeclared (first use in this function)
(void) signal(SIGALRM, interrupt);
^
dmake: Error code 129, while making 'truerand.o'
C:\Users\Jlinne\.cpanm\work\1476593741.7660\Math-TrulyRandom-1.0>
Math::TrulyRandom is broken, and should not (indeed, cannot) be used.
It was written in 1996, and only works correctly on certain UNIX systems which existed at the time (like SunOS 4). It fails to generate random data on modern Linux systems, and cannot be compiled at all on Windows.
If you need a random number generator and rand won't cut it, look for another module. Math::Random::Secure or Crypt::Random, for instance.

Installing Text::Aspell on windows XP

I've installed Aspell-0-50-3-3-Setup.exe and the dictionary Aspell-en-
0.50-2-3.exe from http://aspell.net/win32/ I've included this folder in my
environment variable PATH : C:\Program Files\Aspell\bin but I still can't
install Text::Aspell. My perl version is ActivePerl 5.16.1
Build 1601. These are the error messages that I get:
Checking if your kit is complete...
Looks good
Note (probably harmless): No library found for -laspell
Aspell.xs:4:20: aspell.h: No such file or directory
Aspell.xs:9: error: syntax error before "AspellCanHaveError"
Aspell.xs:9: warning: no semicolon at end of struct or union
Aspell.xs:10: warning: data definition has no type or storage class
Aspell.xs:11: error: syntax error before '*' token
Aspell.xs:11: warning: data definition has no type or storage class
Aspell.xs:14: error: syntax error before '}' token
Aspell.xs:14: warning: data definition has no type or storage class
Aspell.xs:17: error: syntax error before '*' token
Aspell.xs: In function `_create_speller':
Writing Makefile for Text::Aspell
Writing MYMETA.yml and MYMETA.json
cp Aspell.pm blib\lib\Text\Aspell.pm
C:\Perl\bin\perl.exe C:\Perl\lib\ExtUtils\xsubpp -noprototypes -typemap
C:\Perl\lib\ExtUtils\typemap -typemap typemap Aspell.xs > Aspell.xsc &&
C:\Perl\bin\perl.exe -MExtUtils::Command -e mv -- Aspell.xsc Aspell.c
C:\Perl\site\bin\gcc.exe -c -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT
DPERL_TEXTMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -
DPERL_IMPLICIT_SYS -DUSE_PERLIO -D_USE_32BIT_TIME_T -DHASATTRIBUTE -fno-strict-
aliasing -mms-bitfields -O2 -DVERSION=\"0.09\" -
DXS_VERSION=\"0.09\" "-IC:\Perl\lib\CORE" Aspell.c
[32m HANK/Text-Aspell-0.09.tar.gz[0m
[31m C:\Perl\site\bin\dmake.exe -- NOT OK[0m
[32mRunning make test
[32m Can't test without successful make
[32mRunning make install Make had returned bad status, install seems impossible
[32mFailed during this command:
HANK/Text-Aspell-0.09.tar.gz
: make NO
[32m[0m
Your problem is Note (probably harmless): No library found for -laspell
The solution from http://cpansearch.perl.org/src/HANK/Text-Aspell-0.09/README
is to tell Makefile.PL where to find libaspell
perl Makefile.PL CCFLAGS=-I$HOME/local/include LIBS="-L$HOME/local/lib -laspell"
You can read about CCFLAGS/LIBS in ExtUtils::MakeMaker and probably some tutorials too :)

bdw-gc install failed on lion with brew

i am install w3m with brew on lion. when i use the origin formula the installation is filed.
then i following the issues 7068 of homebrew update the bdw-gc.rb formula script
require 'formula'
class BdwGc < Formula
# url 'http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-7.1.tar.gz'
url 'http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-7.2alpha6.tar.gz'
homepage 'http://www.hpl.hp.com/personal/Hans_Boehm/gc/'
# 7.1
# md5 '2ff9924c7249ef7f736ecfe6f08f3f9b'
# 7.2alpha6
md5 '319d0b18cc4eb735c8038ece9df055e4'
fails_with_llvm "LLVM gives an unsupported inline asm error", :build => 2335
def install
# ucontext has been deprecated in 10.6
# use this flag to force the header to compile
# ENV.append 'CPPFLAGS', "-D_XOPEN_SOURCE" if MacOS.snow_leopard?
ENV.append 'CPPFLAGS', "-D_XOPEN_SOURCE"# if MacOS.snow_leopard?
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}"
system "make install"
end
end
and reinstall it, but it's still failed. here is the install log
brew install bdw-gc
==> Downloading http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-7.2alp
File already downloaded in /Users/akira/Library/Caches/Homebrew
==> ./configure --disable-debug --prefix=/usr/local/Cellar/bdw-gc/6
==> make install
........
libtool: compile: /usr/bin/llvm-gcc -DHAVE_CONFIG_H -I./include -I./include -I./libatomic_ops/src -I./libatomic_ops/src -D_XOPEN_SOURCE -fexceptions -O3 -march=core2 -w -pipe -c obj_map.c -o obj_map.o >/dev/null 2>&1
/bin/sh ./libtool --tag=CC --mode=compile /usr/bin/llvm-gcc -DHAVE_CONFIG_H -I./include -I./include -I./libatomic_ops/src -I./libatomic_ops/src -D_XOPEN_SOURCE -fexceptions -O3 -march=core2 -w -pipe -c -o pcr_interface.lo pcr_interface.c
./libatomic_ops/src/atomic_ops/sysdeps/gcc/x86_64.h: In function 'AO_test_and_set_full':
./libatomic_ops/src/ato==> Exit Status: 2
http://github.com/mxcl/homebrew/blob/master/Library/Formula/bdw-gc.rb#L22
==> Environment
HOMEBREW_VERSION: 0.8
HEAD: bc90bd554da6bd1199bdec92a830edbca24fa34e
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_LIBRARY_PATH: /usr/local/Library/Homebrew
Hardware: quad-core 64-bit sandybridge
OS X: 10.7.2
Kernel Architecture: x86_64
Ruby: 1.8.7-249
/usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
Xcode: 4.2
GCC-4.0: N/A
GCC-4.2: build 5666
LLVM: build 2336
MacPorts or Fink? false
X11 installed? true
==> Build Flags
CC: /usr/bin/llvm-gcc => /usr/llvm-gcc-4.2/bin/llvm-gcc-4.2
CXX: /usr/bin/llvm-g++ => /usr/llvm-gcc-4.2/bin/llvm-g++-4.2
LD: /usr/bin/llvm-gcc => /usr/llvm-gcc-4.2/bin/llvm-gcc-4.2
CFLAGS: -O3 -march=core2 -w -pipe
CXXFLAGS: -O3 -march=core2 -w -pipe
CPPFLAGS: -D_XOPEN_SOURCE
MAKEFLAGS: -j4
Error: Failed executing: make install
These existing issues may help you:
https://github.com/mxcl/homebrew/issues/7068
Otherwise, please report the bug:
https://github.com/mxcl/homebrew/wiki/checklist-before-filing-a-new-issue
any suggestion?
this problem was fixed by Jack Nagel at Nov 15, 2011.
see the detail
bdw-gc: add 7.2alpha6 as the '--devel' version
but this batch still got a problem. the "make check" step does not works,so you can just skip this step and "make install".