bitbake构建cmake perl项目

时间:2018-09-23 20:16:34

标签: perl cmake yocto bitbake metacpan

我正在尝试构建Slic3r软件包以进行yocto-poky分发。代码是perl / c ++,而cmake是项目工具。 经过多次迭代后,我坚持使用此食谱

SRC_URI = "git://github.com/prusa3d/Slic3r.git;tag=version_${PV}"

DEPENDS += "perl \
        test-pod-perl \
        moo-perl \
        module-runtime-perl \
        module-pluggable-perl \
        libmodule-build-perl \
        par-packer-perl \
        extutils-typemaps-default-perl \
        libextutils-cppguess-perl \
" 

RDEPENDS_${PN} = "perl \
        test-pod-perl \
        moo-perl \
        module-runtime-perl \
        module-pluggable-perl \
        libmodule-build-perl \
        par-packer-perl \
        extutils-typemaps-default-perl \
        libextutils-cppguess-perl \
" 
OECMAKE_SOURCEPATH = "${WORKDIR}/git"
EXTRA_OECMAKE += "-DSLIC3R_GUI=0"
inherit cmake perlnative
do_compile() {
  cd ${WORKDIR}/build
  make
}

但是它失败并显示日志

cd
 /home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/build
+ do_configure
+ cmake_do_configure
+ [  ]
+ [ /home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/slic3r-prusa-1.41.0 != /home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/build ]
+ rm -rf /home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/build

+ mkdir -p /home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/build

+ cd /home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/build

+ [ -e /home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/site-file.cmake ]
+ oecmake_sitefile=
+ cmake -G Ninja -DCMAKE_MAKE_PROGRAM=ninja /home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/git -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_INSTALL_BINDIR:PATH=bin -DCMAKE_INSTALL_SBINDIR:PATH=sbin -DCMAKE_INSTALL_LIBEXECDIR:PATH=libexec -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc -DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=../com -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/var -DCMAKE_INSTALL_LIBDIR:PATH=lib -DCMAKE_INSTALL_INCLUDEDIR:PATH=include -DCMAKE_INSTALL_DATAROOTDIR:PATH=share -DCMAKE_INSTALL_SO_NO_EXE=0 -DCMAKE_TOOLCHAIN_FILE=/home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/toolchain.cmake -DCMAKE_VERBOSE_MAKEFILE=1 -DCMAKE_NO_SYSTEM_FROM_IMPORTED=1 -Wno-dev

-- The C compiler identification is GNU 7.3.0

-- The CXX compiler identification is GNU 7.3.0

-- Check for working C compiler: /home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc

-- Check for working C compiler: /home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc -- works

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Detecting C compile features

-- Detecting C compile features - done

-- Check for working CXX compiler: /home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++

-- Check for working CXX compiler: /home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++ -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Detecting CXX compile features

-- Detecting CXX compile features - done

-- No build type selected, default to Release

PATH: /home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/git/local-lib/bin:/home/asdf/build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/recipe-sysroot-native/usr/bin/perl-native:/home/asdf/work/poky-sumo/scripts:/home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi:/home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/recipe-sysroot/usr/bin/crossscripts:/home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/recipe-sysroot-native/usr/sbin:/home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/recipe-sysroot-native/usr/bin:/home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/recipe-sysroot-native/sbin:/home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/recipe-sysroot-native/bin:/home/asdf/work/poky-sumo/bitbake/bin:/home/asdf/build/tmp/hosttools
PERL_INCLUDE: /home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/git/local-lib/lib/perl5:

-- Found Perl: /home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/recipe-sysroot-native/usr/bin/perl-native/perl (found version "5.24.1") 

-- Found PkgConfig: /home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/recipe-sysroot-native/usr/bin/pkg-config (found version "0.29.2") 

Slic3r will be built with GUI support

PERL_EXECUTABLE = /home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/recipe-sysroot-native/usr/bin/perl-native/perl

PERL_LIBRARY =  /home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/recipe-sysroot/usr/lib/perl5/5.24.1/CORE/libperl.so

-- Found PerlLibs: /home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/recipe-sysroot/usr/lib/perl5/5.24.1/CORE/libperl.so (found version "5.24.1") 

PERL_EXECUTABLE = /home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/recipe-sysroot-native/usr/bin/perl-native/perl

PERL_LIBRARY =  /home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/recipe-sysroot/usr/lib/perl5/5.24.1/CORE/libperl.so

Can't locate ExtUtils/CppGuess.pm in @INC (you may need to install the ExtUtils::CppGuess module) (@INC contains: /home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/recipe-sysroot-native/usr/bin/perl-native/../../../usr/lib/perl-native/perl/site_perl/5.24.1 /home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/recipe-sysroot-native/usr/bin/perl-native/../../../usr/lib/perl-native/perl/vendor_perl/5.24.1 /home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/recipe-sysroot-native/usr/bin/perl-native/../../../usr/lib/perl-native/perl/5.24.1 /home/asdf/build/tmp/work/x86_64-linux/perl-native/5.24.1-r0/recipe-sysroot-native/usr/lib/perl-native/perl/site_perl/5.24.1 /home/asdf/build/tmp/work/x86_64-linux/perl-native/5.24.1-r0/recipe-sysroot-native/usr/lib/perl-native/perl/vendor_perl/5.24.1 /home/asdf/build/tmp/work/x86_64-linux/perl-native/5.24.1-r0/recipe-sysroot-native/usr/lib/perl-native/perl/5.24.1 .) at -e line 7.
BEGIN failed--compilation aborted at -e line 7.

CMake Error at cmake/modules/FindPerlEmbed.cmake:59 (include):
  include could not find load file:

    /home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/build/xs/PerlEmbed_TEMP_INCLUDE.txt
Call Stack (most recent call first):
  xs/CMakeLists.txt:534 (find_package)



--  PERL_INCLUDE_PATH      = /home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/recipe-sysroot/usr/lib/perl5/5.24.1/CORE
--  PERL_LIBRARY           = /home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/recipe-sysroot/usr/lib/perl5/5.24.1/CORE/libperl.so
--  PERL_EXECUTABLE        = /home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/recipe-sysroot-native/usr/bin/perl-native/perl
--  PERL_SITESEARCH        = UNKNOWN
--  PERL_SITELIB           = /home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/recipe-sysroot-native/usr/lib/perl-native/perl/site_perl/5.24.1
--  PERL_VENDORARCH        = /home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/recipe-sysroot-native/usr/lib/perl-native/perl/vendor_perl/5.24.1
--  PERL_VENDORLIB         = /home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/recipe-sysroot-native/usr/lib/perl-native/perl/vendor_perl/5.24.1
--  PERL_ARCHLIB           = /home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/recipe-sysroot-native/usr/lib/perl-native/perl/5.24.1
--  PERL_PRIVLIB           = /home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/recipe-sysroot-native/usr/lib/perl-native/perl/5.24.1
--  PERL_EXTRA_C_FLAGS     = -D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include
--  PerlEmbed_ARCHNAME     = 
--  PerlEmbed_CCFLAGS      = 
--  PerlEmbed_CCCDLFLAGS   = 
--  LD                     = 
--  PerlEmbed_LDFLAGS      = 

--  PerlEmbed_LDDLFLAGS    = 

CMake Error at /home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/recipe-sysroot-native/usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find PerlEmbed (missing: PerlEmbed_CCFLAGS PerlEmbed_LDFLAGS)
  (found version "5.24.1")
Call Stack (most recent call first):
  /home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/recipe-sysroot-native/usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  cmake/modules/FindPerlEmbed.cmake:86 (find_package_handle_standard_args)
  xs/CMakeLists.txt:534 (find_package)



-- Configuring incomplete, errors occurred!
See also "/home/asdf/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/build/CMakeFiles/CMakeOutput.log".

+ bb_exit_handler
+ ret=1
+ echo WARNING: exit code 1 from a shell command.
WARNING: exit code 1 from a shell command.
+ exit 1

我确实找到了

asdf@debian:~/build$ find ./ -name "CppGuess.pm"
./tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/slic3r-prusa/1.41.0-r0/recipe-sysroot/usr/lib/perl/vendor_perl/5.24.1/ExtUtils/CppGuess.pm

,但是它位于recipe-sysroot目录中,但是@INC指向recipe-sysroot-native。 我是否缺少一些明显的inherit语句,还是应该将recipe-sysroot附加到INC变量中?

0 个答案:

没有答案