首先聲明 :這是我借鑒別人聯(lián)合自己的交叉編譯經(jīng)驗做改動而來的

              1。# tar zxvf sqlite-3.3.7.tar.gz

          #cd /usr/local/arm-linux/sqlite-3.3.7

          新建一個sqlite-arm-linux目錄

              2.# mkdir /usr/local/arm-linux/sqlite-arm-linux

              3.# cd /usr/local/arm-linux/sqlite-arm-linux

              # export PATH=/usr/local/arm-linux/bin:$PATH


              4.#../sqlite-3.3.7/configure --host=arm-linux --prefix=/usr/local/arm-linux/sqlite-arm-linux

          這部會出現(xiàn)下面的錯誤:


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


          這個錯誤的解決方法是:


          首先,我們進(jìn)入目錄usr/local/arm-linux/sqlite-1.3.7,打開其中的configure文件,用查找功能找到下列語句:

              (用 test "$cross_compiling" = yes &&進(jìn)行搜索)
          # test "$cross_compiling" = yes &&

          # { { echo "$as_me:13264: error: cannot check for file existence when cross compiling" >&5

          #echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}

          # { (exit 1); exit 1; }; }

          把其中的{ (exit 1); exit 1; }; }改為 { (echo 1); echo 1; }; }

          一共有兩處,都改過來。


          然后,我們要設(shè)置config_TARGET_CC和config_BUILD_CC兩個環(huán)境變量。config_TARGET_CC是交叉編譯器,config_BUILD_CC是主機(jī)編譯器。重來:

          #export config_BUILD_CC=gcc

          #export config_TARGET_CC=arm-linux-gcc

          下面重新編譯就可以了

          #../sqlite-3.3.7/configure --host=arm-linux --prefix=/usr/local/arm-linux/sqlite-arm-linux

          然后我們會發(fā)現(xiàn)在在/usr/local/arm-linux/sqlite-arm-linux目錄下生成一些相關(guān)文件: config.log config.status libtool Makefile sqlite3.pc

           如果:還是出現(xiàn)如下同樣的錯誤
          checking for /usr/include/readline.h... configure: error: cannot check for file existence when cross compiling

            那么 首先 : 你檢查你的交叉編譯環(huán)境 錯誤?? 如果真的沒有則安裝readline.h 在ubuntu的軟件中心查找libncurses5-dev libreadline5-dev進(jìn)行安裝

                  如果安裝之后從新。/conigure還是有這個錯誤 那就不管了 我不知道了但是還是生成了makefile文件!


          下面在make之前我們修改一下Makefile文件,把其中的BCC = arm-linux-gcc -g -O2 為 BCC = gcc -g -O2
          #make

          #make install

          會出現(xiàn)這樣的話語:libsqlite3.so.0.8.6: ELF 32-bit LSB shared object, ARM, version 1 (ARM), not stripped

                  over !!!

           

          posted on 2012-04-18 09:37 姚先進(jìn) 閱讀(1991) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發(fā)表評論。


          網(wǎng)站導(dǎo)航:
           
           
          主站蜘蛛池模板: 武邑县| 芦溪县| 阳原县| 光山县| 玉溪市| 渑池县| 巴青县| 榆树市| 鱼台县| 商南县| 新民市| 始兴县| 兴海县| 页游| 芮城县| 洪湖市| 开封市| 金昌市| 奎屯市| 城固县| SHOW| 宜良县| 英吉沙县| 荃湾区| 专栏| 卓尼县| 博罗县| 宁化县| 偏关县| 井研县| 广东省| 灵山县| 兴和县| 张家口市| 田阳县| 固阳县| 诏安县| 蒲江县| 西贡区| 锡林郭勒盟| 军事|