中文字幕 另类精品,亚洲欧美一区二区蜜桃,日本在线精品视频免费,孩交精品乱子片免费

<sup id="3hn2b"></sup>

    1. <sub id="3hn2b"><ol id="3hn2b"></ol></sub><legend id="3hn2b"></legend>

      1. <xmp id="3hn2b"></xmp>

      2. 新聞中心

        EEPW首頁 > 嵌入式系統(tǒng) > 交叉編譯場景分析(arm-linux)(七)

        交叉編譯場景分析(arm-linux)(七)

        ——
        作者: 時(shí)間:2007-04-18 來源:http://blog.csdn.net/absurd 收藏
        編譯sqlite
        1. 基本信息:

        軟件名稱
         sqlite
         
        功能簡述
         sqlite是一個(gè)針對(duì)設(shè)計(jì)的數(shù)據(jù)庫管理系統(tǒng)(DBMS),實(shí)現(xiàn)了SQL92的基本功能,ARM版的可執(zhí)行文件約300K.
         
        下載地址
         http://www.sqlite.org/
         
        軟件版本
         sqlite-3.3.4.tar.gz
         
        依賴關(guān)系
         默認(rèn)

        readline
         
        前置條件
         源文件位置:$(WORK_DIR)/ sqlite-3.3.4
         

         

        2.         過程分析

        下載的穩(wěn)定版本,configure已經(jīng)存在,直接進(jìn)行配置:

        [root@linux sqlite-3.3.4]# ./configure --host=$ARCH-linux --prefix=$ROOTFS_DIR/usr

                         

        出現(xiàn)了如下錯(cuò)誤:

        configure: error: unable to find a compiler for building build tools

         

        前面檢查arm-linux-gcc都通過了,怎么還說沒有找到呢?花了點(diǎn)時(shí)間看configure的腳本,太復(fù)雜了,又結(jié)合configure.ac看了一下。原來是要設(shè)置config_TARGET_CC和config_BUILD_CC兩個(gè)環(huán)境變量。config_TARGET_CC是交叉,config_BUILD_CC是主機(jī)。重來:

        [root@linux sqlite-3.3.4]# export config_BUILD_CC=gcc

        [root@linux sqlite-3.3.4]# export config_TARGET_CC=arm-linux-gcc

        [root@linux sqlite-3.3.4]# ./configure --host=$ARCH-linux --prefix=$ROOTFS_DIR/usr

         

        出現(xiàn)了如下錯(cuò)誤:

        checking for /usr/include/readline.h... configure: error: cannot check for file existence when cross compiling

         

        readline我們已經(jīng)編譯過了,readline.h是肯定存在,沒有必要檢查。還是施展我們欺騙大法吧,在cache文件里設(shè)置ac_cv_header_readline_h=yes,騙過configure腳本:

        [root@linux sqlite-3.3.4]# echo ac_cv_header_readline_h=yes >$ARCH-linux.cache

        [root@linux sqlite-3.3.4]#./configure --host=$ARCH-linux --prefix=$ROOTFS_DIR/usr --cache-file=$ARCH-linux.cache

         

        這回配置成功了,編譯:

        [root@linux sqlite-3.3.4]# make && make install

         

        有的機(jī)器上會(huì)出現(xiàn)下列錯(cuò)誤:

        libtool: compile: unable to infer tagged configuration

        libtool: compile: specify a tag with `--tag'

         

        這時(shí)檢查一下libtool里的CC變量是否設(shè)置為arm-linux-gcc,如果不是,可以手工改過來,或者設(shè)置環(huán)境變量lt_compiler=arm-linux-gcc,重新配置一下。

         

        OK,經(jīng)過幾番周折,終于編譯過去了。

         

        3.         構(gòu)建處方

        l         sqlite.mk

        SQLITE_DIR="sqlite-3.3.4"

         

        all: clean config build

         

        config:

            @cd $(SQLITE_DIR) && 

            export config_BUILD_CC=gcc && 

            export config_TARGET_CC=arm-linux-gcc && 

            echo ac_cv_header_readline_h=yes >$$ARCH-linux.cache && 

            ./configure --host=$$ARCH-linux --prefix=$$ROOTFS_DIR/usr --cache-file=$$ARCH-linux.cache && 

            echo "config done"

            

        build:

            @cd $(SQLITE_DIR) && 

            make && make install && 

            echo "build done"

            

        clean:

            @cd $(SQLITE_DIR) && 

            if [ -e Makefile ]; then make distclean; fi && 

        echo "clean done" 

         

        linux相關(guān)文章:linux教程




        評(píng)論


        相關(guān)推薦

        技術(shù)專區(qū)

        關(guān)閉