2013-02-08 7 views
0

Event :: Lib가 필요한 Perl 프로젝트에서 작업하고 있습니다. MacOS 10.7을 사용 중이며 Perl 대신 Citrus Perl을 실행 중입니다. 나는 libevent을 소스에서 설치했고 잘 컴파일했다. 그러나 Event :: Lib을 설치하려고하면 몇 가지 오류가 발생합니다.Mac OS X 10.7에서 CitrusPerl 설치시 Event :: Lib 설치

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 

다음에 시도 할 내용에 대한 아이디어가 있습니까?

편집 : 일부 '오 conf의'옵션을 시도 후 :

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 

답변

0

나는이 10 분 정도 시간을 작동시킬 수 있었다.

:

  • perlbrew 스위치 펄 5.16.0 펄-5.16.0를 설치 perlbrew
    • 양조가 libevent 설치
    • 펄 -MCPAN -e '이벤트 :: 설치 해방'

    나는 위가 당신이 전환 할 수 있습니다 적절한 개발 환경을 제공하는 가장 좋은 유틸리티 생각; IE에서는 펄의 버전을 바꿀 수 있습니다. 또한 그들은 당신의 네이티브 시스템에 영향을 미치지 않을 것입니다. 어쨌든 위에서 언급 한 것을 사용하지 않기로 결정한다면, 당신의 특별한 오류는 헤더 파일이 누락 된 것 같습니다. 나는 libevent 헤더가 실제로/usr/local/include에 있다고 주장 할 것이다.

    행운을 빈다.

  • +0

    참고 - Perl Brew를 사용할 필요가 없습니다. homebrew를 통해 libevent를 먼저 설치하십시오. – patbaker82

    +0

    CitrusPerl을 사용하고 싶습니다. 저는 Padre를 실행 중이며 CitrusPerl은 Wx 라이브러리 위젯을 설치합니다. 양조에서 libevent를 설치하려고 시도했지만 잘 설치되었습니다. Event :: Lib과 동일한 오류가 발생합니다. –

    +0

    libevent를 범용 라이브러리로 빌드하면 더 나은 행운을 누릴 수 있습니다. # 양조 제거 libevent # 양조 설치 libevent --universal CPAN : 오의 conf makepl_arg "INC = -I/usr/지방/LIBS 포함 = -L/usr/지방/lib에 -levent는" 이벤트를 설치합니다 : : Lib – patbaker82