V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
OpenWrt 是一个专门面向嵌入式设备的 Linux 发行版。你可以将 OpenWrt 支持的型号的嵌入式设备,比如各种路由器上的系统,换成一个有更多可能性可以折腾的 Linux 系统。
OpenWrt 官方网站
ChowDPa02K
V2EX  ›  OpenWrt

求助在为 ArmLinux-Brcm 编译 tar.gz 源码 package 时出现的问题

  •  
  •   ChowDPa02K · 2016-01-28 10:41:16 +08:00 · 535 次点击
    这是一个创建于 3215 天前的主题,其中的信息可能已经有所发展或是发生改变。

    鉴于 LZ 路由器的特殊性(博通 ARM 芯片),刷上了 DD-Wrt 之后很多 package 都要在网上找很久 /求大神编译 /自己编译。所以从没深入接触过 Linux 的小白我打算自己编译 unbound (因为完全找不到),能轻易下载到 unbound 的 tar.gz 源码包,根据教程 http://ahui.us/post/netgear-r6300v2-ngrep.html 进行编译,搭建好文件目录。
    工具链使用的是 github 上的 https://github.com/jeremyd2019/hndtools-arm-linux-uclibc ,同时在 64 位 Ubuntu 上安装好了 libc6-dev-i386 以及以下包:
    build-essential
    ccache
    flex
    gawk
    gettext
    git
    liblzma-dev
    libncurses5-dev
    libssl-dev
    python
    subversion
    u-boot-tools
    unzip
    wget
    xsltproc
    zlib1g-dev
    libmpc2

    但是在使用 configure 编译的时候很快就报错退出,如图
    Terminal
    查看 log 如下:
    This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake.

    It was created by unbound configure 1.5.7, which was
    generated by GNU Autoconf 2.69.  Invocation command line was
    
      $ ./configure CC=arm-uclibc-linux-2.6.36-gcc CXX=arm-uclibc-linux-2.6.36-g++ AR=arm-uclibc-linux-2.6.36-ar RANLIB=arm-uclibc-linux-2.6.36-ranlib LD=arm-uclibc-linux-2.6.36-ld --prefix=/projects/unbound --host=arm-linux --build=arm --with-pcap-includes=../libpcap-1.4.0
    
    ## --------- ##
    ## Platform. ##
    ## --------- ##
    
    hostname = ubuntu
    uname -m = x86_64
    uname -r = 3.19.0-25-generic
    uname -s = Linux
    uname -v = #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015
    
    /usr/bin/uname -p = unknown
    /bin/uname -X     = unknown
    
    /bin/arch              = unknown
    /usr/bin/arch -k       = unknown
    /usr/convex/getsysinfo = unknown
    /usr/bin/hostinfo      = unknown
    /bin/machine           = unknown
    /usr/bin/oslevel       = unknown
    /bin/universe          = unknown
    
    PATH: /projects/hnd/tools/linux/hndtools-arm-linux-uclibc-master/bin
    PATH: /usr/local/sbin
    PATH: /usr/local/bin
    PATH: /usr/sbin
    PATH: /usr/bin
    PATH: /sbin
    PATH: /bin  
    
    ## ----------- ##
    ## Core tests. ##
    ## ----------- ##
    
    configure:2785: checking for arm-linux-gcc
    configure:2812: result: arm-uclibc-linux-2.6.36-gcc
    configure:3081: checking for C compiler version
    --version
    configure:3091: arm-uclibc-linux-2.6.36-gcc --version >&5
    arm-uclibc-linux-2.6.36-gcc (Buildroot 2012.02) 4.5.3
    Copyright (C) 2010 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    
    configure:3102: $? = 0
    -v
    configure:3091: arm-uclibc-linux-2.6.36-gcc -v >&5
    Using built-in specs.
    COLLECT_GCC=arm-uclibc-linux-2.6.36-gcc
    COLLECT_LTO_WRAPPER=/projects/hnd/tools/linux/hndtools-arm-linux-uclibc-master/bin/../libexec/gcc/arm-brcm-linux-uclibcgnueabi/4.5.3/lto-wrapper
    Target: arm-brcm-linux-uclibcgnueabi
    Configured with: /projects/toolchains_build/buildroot-2012.02-brcm/output/toolchain/gcc-4.5.3/configure --prefix=/projects/hnd/tools/linux/hndtools-arm-linux-2.6.36-uclibc-4.5.3 --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=arm-brcm-linux-uclibcgnueabi --enable-languages=c,c++ --with-sysroot=/projects/hnd/tools/linux/hndtools-arm-linux-2.6.36-uclibc-4.5.3/arm-brcm-linux-uclibcgnueabi/sysroot --with-build-time-tools=/projects/hnd/tools/linux/hndtools-arm-linux-2.6.36-uclibc-4.5.3/arm-brcm-linux-uclibcgnueabi/bin --disable-__cxa_atexit --enable-target-optspace --disable-libgomp --with-gnu-ld --disable-libssp --disable-multilib --disable-tls --enable-shared --with-gmp=/projects/hnd/tools/linux/hndtools-arm-linux-2.6.36-uclibc-4.5.3 --with-mpfr=/projects/hnd/tools/linux/hndtools-arm-linux-2.6.36-uclibc-4.5.3 --with-mpc=/projects/hnd/tools/linux/hndtools-arm-linux-2.6.36-uclibc-4.5.3 --enable-threads --disable-decimal-float --with-float=soft --with-abi=aapcs-linux --with-arch=armv7-a --with-tune=cortex-a9 --with-pkgversion='Buildroot 2012.02' --with-bugurl=http://bugs.buildroot.net/
    Thread model: posix
    gcc version 4.5.3 (Buildroot 2012.02) 
    configure:3102: $? = 0
    -V
    configure:3091: arm-uclibc-linux-2.6.36-gcc -V >&5
    arm-uclibc-linux-2.6.36-gcc: '-V' option must have argument
    configure:3102: $? = 1
    -qversion
    configure:3091: arm-uclibc-linux-2.6.36-gcc -qversion >&5
    arm-uclibc-linux-2.6.36-gcc: unrecognized option '-qversion'
    arm-uclibc-linux-2.6.36-gcc: no input files
    configure:3102: $? = 1
    configure:3122: checking whether the C compiler works
    configure:3144: arm-uclibc-linux-2.6.36-gcc    conftest.c  >&5
    /projects/hnd/tools/linux/hndtools-arm-linux-uclibc-master/bin/../libexec/gcc/arm-brcm-linux-uclibcgnueabi/4.5.3/cc1: error while loading shared libraries: libmpc.so.2: cannot open shared object file: No such file or directory
    configure:3148: $? = 1
    configure:3186: result: no
    configure: failed program was:
    | /* confdefs.h */
    | #define PACKAGE_NAME "unbound"
    | #define PACKAGE_TARNAME "unbound"
    | #define PACKAGE_VERSION "1.5.7"
    | #define PACKAGE_STRING "unbound 1.5.7"
    | #define PACKAGE_BUGREPORT "[email protected]"
    | #define PACKAGE_URL ""
    | /* end confdefs.h.  */
    | 
    | int
    | main ()
    | {
    | 
    |   ;
    |   return 0;
    | }
    configure:3191: error: in `/projects/unbound-1.5.7':
    configure:3193: error: C compiler cannot create executables
    See `config.log' for more details
    
    ## ---------------- ##
    ## Cache variables. ##
    ## ---------------- ##
    
    ac_cv_env_CC_set=set
    ac_cv_env_CC_value=arm-uclibc-linux-2.6.36-gcc
    ac_cv_env_CFLAGS_set=
    ac_cv_env_CFLAGS_value=
    ac_cv_env_CPPFLAGS_set=
    ac_cv_env_CPPFLAGS_value=
    ac_cv_env_CPP_set=
    ac_cv_env_CPP_value=
    ac_cv_env_LDFLAGS_set=
    ac_cv_env_LDFLAGS_value=
    ac_cv_env_LIBS_set=
    ac_cv_env_LIBS_value=
    ac_cv_env_PYTHON_VERSION_set=
    ac_cv_env_PYTHON_VERSION_value=
    ac_cv_env_YACC_set=
    ac_cv_env_YACC_value=
    ac_cv_env_YFLAGS_set=
    ac_cv_env_YFLAGS_value=
    ac_cv_env_build_alias_set=set
    ac_cv_env_build_alias_value=arm
    ac_cv_env_host_alias_set=set
    ac_cv_env_host_alias_value=arm-linux
    ac_cv_env_target_alias_set=
    ac_cv_env_target_alias_value=
    ac_cv_prog_CC=arm-uclibc-linux-2.6.36-gcc
    
    ## ----------------- ##
    ## Output variables. ##
    ## ----------------- ##
    
    ALLTARGET=''
    AR='arm-uclibc-linux-2.6.36-ar'
    AWK=''
    CC='arm-uclibc-linux-2.6.36-gcc'
    CFLAGS=''
    CHECKLOCK_OBJ=''
    COMMON_OBJ_ALL_SYMBOLS=''
    CONFIG_DATE=''
    CPP=''
    CPPFLAGS=''
    DEFS=''
    DEPFLAG=''
    DLLTOOL=''
    DNSTAP_OBJ=''
    DNSTAP_SRC=''
    DSYMUTIL=''
    DUMPBIN=''
    ECHO_C=''
    ECHO_N='-n'
    ECHO_T=''
    EGREP=''
    ENABLE_DNSTAP=''
    EXEEXT=''
    EXTRALINK=''
    FGREP=''
    GREP=''
    HAVE_SSL=''
    INSTALLTARGET=''
    LD='arm-uclibc-linux-2.6.36-ld'
    LDFLAGS=''
    LEX=''
    LEXLIB=''
    LEX_OUTPUT_ROOT=''
    LIBOBJS=''
    LIBOBJ_WITHOUT_CTIME=''
    LIBOBJ_WITHOUT_CTIMEARC4=''
    LIBS=''
    LIBTOOL=''
    LIBUNBOUND_AGE='3'
    LIBUNBOUND_CURRENT='5'
    LIBUNBOUND_REVISION='10'
    LIPO=''
    LN_S=''
    LTLIBOBJS=''
    MANIFEST_TOOL=''
    NETBSD_LINTFLAGS=''
    NM=''
    NMEDIT=''
    OBJDUMP=''
    OBJEXT=''
    OTOOL64=''
    OTOOL=''
    PACKAGE_BUGREPORT='[email protected]'
    PACKAGE_NAME='unbound'
    PACKAGE_STRING='unbound 1.5.7'
    PACKAGE_TARNAME='unbound'
    PACKAGE_URL=''
    PACKAGE_VERSION='1.5.7'
    PATH_SEPARATOR=':'
    PROTOC_C=''
    PTHREAD_CC=''
    PTHREAD_CFLAGS=''
    PTHREAD_LIBS=''
    PYTHON=''
    PYTHONMOD_HEADER=''
    PYTHONMOD_INSTALL=''
    PYTHONMOD_OBJ=''
    PYTHONMOD_UNINSTALL=''
    PYTHON_CPPFLAGS=''
    PYTHON_LDFLAGS=''
    PYTHON_SITE_PKG=''
    PYTHON_VERSION=''
    PYUNBOUND_INSTALL=''
    PYUNBOUND_OBJ=''
    PYUNBOUND_TARGET=''
    PYUNBOUND_UNINSTALL=''
    PY_MAJOR_VERSION=''
    RANLIB='arm-uclibc-linux-2.6.36-ranlib'
    RUNTIME_PATH=''
    SED=''
    SHELL='/bin/bash'
    SOURCEDETERMINE=''
    SOURCEFILE=''
    SSLLIB=''
    STRIP=''
    SWIG=''
    SWIG_LIB=''
    UBSYMS=''
    UNBOUND_CHROOT_DIR=''
    UNBOUND_EVENT_INSTALL=''
    UNBOUND_EVENT_UNINSTALL=''
    UNBOUND_PIDFILE=''
    UNBOUND_ROOTCERT_FILE=''
    UNBOUND_ROOTKEY_FILE=''
    UNBOUND_RUN_DIR=''
    UNBOUND_SHARE_DIR=''
    UNBOUND_USERNAME=''
    UNBOUND_VERSION_MAJOR='1'
    UNBOUND_VERSION_MICRO='7'
    UNBOUND_VERSION_MINOR='5'
    WINAPPS=''
    WINDRES=''
    WIN_CHECKCONF_OBJ_LINK=''
    WIN_CONTROL_OBJ_LINK=''
    WIN_DAEMON_OBJ=''
    WIN_DAEMON_OBJ_LINK=''
    WIN_DAEMON_SRC=''
    WIN_HOST_OBJ_LINK=''
    WIN_UBANCHOR_OBJ_LINK=''
    WITH_PYTHONMODULE=''
    WITH_PYUNBOUND=''
    YACC=''
    YFLAGS=''
    ac_ct_AR=''
    ac_ct_CC=''
    ac_ct_DUMPBIN=''
    ax_pthread_config=''
    bindir='${exec_prefix}/bin'
    build='arm'
    build_alias='arm'
    build_cpu=''
    build_os=''
    build_vendor=''
    datadir='${datarootdir}'
    datarootdir='${prefix}/share'
    date=''
    debug_enabled=''
    docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
    doxygen=''
    dvidir='${docdir}'
    exec_prefix='NONE'
    host='arm-linux'
    host_alias='arm-linux'
    host_cpu=''
    host_os=''
    host_vendor=''
    htmldir='${docdir}'
    includedir='${prefix}/include'
    infodir='${datarootdir}/info'
    libdir='${exec_prefix}/lib'
    libexecdir='${exec_prefix}/libexec'
    libtool=''
    localedir='${datarootdir}/locale'
    localstatedir='${prefix}/var'
    mandir='${datarootdir}/man'
    oldincludedir='/usr/include'
    opt_dnstap_socket_path=''
    pdfdir='${docdir}'
    prefix='/projects/unbound'
    program_transform_name='s,x,x,'
    psdir='${docdir}'
    sbindir='${exec_prefix}/sbin'
    sharedstatedir='${prefix}/com'
    staticexe=''
    swig=''
    sysconfdir='${prefix}/etc'
    target_alias=''
    ub_conf_dir=''
    ub_conf_file=''
    version=''
    
    ## ----------- ##
    ## confdefs.h. ##
    ## ----------- ##
    
    /* confdefs.h */
    #define PACKAGE_NAME "unbound"
    #define PACKAGE_TARNAME "unbound"
    #define PACKAGE_VERSION "1.5.7"
    #define PACKAGE_STRING "unbound 1.5.7"
    #define PACKAGE_BUGREPORT "[email protected]"
    #define PACKAGE_URL ""
    
        configure: exit 77
    

    请问如何解决这样的问题,顺利完成编译?

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2937 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 14:20 · PVG 22:20 · LAX 06:20 · JFK 09:20
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.