2012-10-27 58 views
1

我不能建QtCore4包,我得到关于“SMOKE_QWT_LIBRARY”不化妆时设置错误。我在Ubuntu 12.04上运行perlbrew Perl 5.14.2。我试过手动构建模块以及通过CPAN,并且还安装在系统Perl(也是5.14.2)和perl 5.16.1上。我查看了错误消息中引用的目录中的文件。文件CMakeLists.txt包含对“SMOKE_QWT_LIBRARY”的引用,但没有目录引用或明显的方式来重新配置文件(我不确定要重新配置它!)。Perl的QtCore4不会安装

任何人都可以在这方面帮助吗?

这是化妆输出:
运行安装模块 'QtCore4' 运行作出C/CB/CBUREL/Qt4-0.99.0.tar.bz2 校验为/home/sillymoose/.cpan/sources /作者/ ID/C/CB/CBUREL/Qt4- 0.99.0.tar.bz2确定

CPAN.pm: Building C/CB/CBUREL/Qt4-0.99.0.tar.bz2 

-- The C compiler identification is GNU 
-- The CXX compiler identification is GNU 
-- Check for working C compiler: /usr/bin/gcc 
-- Check for working C compiler: /usr/bin/gcc -- works 
-- Detecting C compiler ABI info 
-- Detecting C compiler ABI info - done 
-- Check for working CXX compiler: /usr/bin/c++ 
-- Check for working CXX compiler: /usr/bin/c++ -- works 
-- Detecting CXX compiler ABI info 
-- Detecting CXX compiler ABI info - done 
-- Found Perl: /home/sillymoose/perl5/perlbrew/perls/perl- 
5.14.2/bin/perl 
-- Found PerlLibs: /home/sillymoose/perl5/perlbrew/perls/perl- 
5.14.2/lib/5.14.2/x86_64-linux/CORE/libperl.a (found version "5.14.2") 
-- Looking for Q_WS_X11 
-- Looking for Q_WS_X11 - found 
-- Looking for Q_WS_WIN 
-- Looking for Q_WS_WIN - not found. 
-- Looking for Q_WS_QWS 
-- Looking for Q_WS_QWS - not found. 
-- Looking for Q_WS_MAC 
-- Looking for Q_WS_MAC - not found. 
-- Found Qt4: /usr/bin/qmake (found version "4.8.1") 
-- Found QScintilla2: /usr/lib/libqscintilla2.so 
-- Found QImageBlitz: /usr/include/qimageblitz 
-- Phonon Version: 4.6.0 
-- Found Phonon: /usr/lib/x86_64-linux-gnu/libphonon.so 
-- Found Phonon Includes: /usr/include/qt4/KDE;/usr/include/qt4 
-- Found Qwt: /usr/lib/libqwt-qt4.so 
-- Perl headers found: /home/sillymoose/perl5/perlbrew/perls/perl- 
5.14.2/lib/5.14.2/x86_64-linux/CORE 
-- Perl headers found: /home/sillymoose/perl5/perlbrew/perls/perl- 
5.14.2/lib/5.14.2/x86_64-linux/CORE 
-- Build PerlQt bindings: 
Phonon;QImageBlitz;QScintilla;Qt3Support;QtDBus;QtDeclarative;QtGui;QtHe 
lp;QtNetwork;QtOpenGL;QtScript;QtSql;QtSvg;QtTest;QtUiTools;QtWebKit;QtX 
ml;QtXmlPatterns;Qwt 
-- Skip PerlQt bindings: QtMultimedia 

------------------------------------------------------------------------ 
----- 
-- The following external packages were located on your system. 
-- This installation will have the extra features provided by these 
packages. 
------------------------------------------------------------------------ 
----- 
    * QScintilla2 - QScintilla2 libraries 
    * QImageBlitz - QImageBlitz library 
    * Phonon - Phonon multimedia framework 
    * Qwt5 for Qt4 - Qwt5 libraries for Qt4 

------------------------------------------------------------------------ 
----- 
-- Congratulations! All external packages have been found. 
------------------------------------------------------------------------ 
----- 

CMake Error: The following variables are used in this project, but they 
are set to NOTFOUND. 
Please set them or make sure they are set and tested correctly in the 
CMake files: 
SMOKE_QWT_LIBRARY (ADVANCED) 
    linked by target "perl_qwt" in directory 
/home/sillymoose/.cpan/build/Qt4-0.99.0-5Qxy7L/qwt/src 

-- Configuring incomplete, errors occurred! 
No 'Makefile' created CBUREL/Qt4-0.99.0.tar.bz2 
    /home/sillymoose/perl5/perlbrew/perls/perl-5.14.2/bin/perl Makefile.PL 
-- NOT OK 

这是〜/ .cpan /构建的内容/ Qt4-0.99.0-5Qxy7L/qwt/src/CMakeLists.txt

include_directories(
    ${CMAKE_SOURCE_DIR}/qtcore/src 
    ${PERL_INCLUDE_PATH} 
    ${QT_INCLUDES}) 

# Run doxsubpp.pl to run xsubpp on Qwt.xs 
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Qwt.c 
        COMMAND ${PERL_EXECUTABLE} ARGS ${CMAKE_SOURCE_DIR}/qtcore/src/doxsubpp.pl ${PERL_EXECUTABLE} Qwt.xs ${CMAKE_CURRENT_BINARY_DIR}/Qwt.c 
        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/Qwt.xs 
        WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} 
) 
# Make sure we build Qwt.c as c++ code 
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/Qwt.c 
    PROPERTIES LANGUAGE CXX 
) 

set(CMAKE_CXX_FLAGS ${PERL_CXX_FLAGS}) 

set(qwt_LIBRARY_SRC 
    ${CMAKE_CURRENT_BINARY_DIR}/Qwt.c 
    qwthandlers.cpp 
) 

if(WIN32) 
    set(libraryName PerlQwt) 
else() 
    set(libraryName Qwt) 
endif(WIN32) 

set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/blib/arch/auto/${libraryName}) 
add_library(perl_qwt SHARED ${qwt_LIBRARY_SRC}) 

target_link_libraries(perl_qwt 
    ${SMOKE_QWT_LIBRARY} 
    perlqtcore4) 

set_target_properties(perl_qwt PROPERTIES OUTPUT_NAME ${libraryName}) 
set_target_properties(perl_qwt PROPERTIES PREFIX "") 

install(TARGETS perl_qwt DESTINATION ${CUSTOM_PERL_SITE_ARCH_DIR}/auto/${libraryName}/) 

回答

0

This问题在a thread on Perlmonks上解决。详情请参阅主题。然而,它涉及:

  1. 安装正确的源代码库。
  2. 用正确的C标志重新编译Perl。
  3. 从源编译模块。

NB。只能让它在Perl v5.10.1上运行。