日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
Ubuntu16.04下交叉編譯ImageMagick

環(huán)境:ubuntu 16.04

交叉編譯器版本號(hào):4.8.3

在編譯之前要編譯以下其依賴的軟件或庫:freetype,libpng,libxml2,libtiff,libjpeg,zlib,graphviz

zlib庫

1.tar xvf zlib-1.2.11.tar.xz

2.export CC=arm-linux-gnueabi-gcc

3.export AR=arm-linux-gnueabi-ar

4.mkdir build

5.cd build

6.  ../configure --prefix=$PWD/_install

7.make

8.make install

libtiff沒有依賴,使用autoconf生成configure腳本,那么直接編譯libtiff

1.wget http://download.osgeo.org/libtiff/tiff-4.0.8.tar.gz

2.tar -xvf tiff-4.0.8.tar.gz

3.cd tiff-4.0.8

4.autoconf

5.export CC=arm-linux-gnueabi-gcc

6.export AR=arm-linux-gnueabi-ar

7.mkdir compile

8.cd compile

9.   ../configure --prefix=$PWD/_install --host=arm-linux-gnueabi

10.make

11.make install

libjpeg沒有依賴,使用autoconf生成configure腳本

1.wget www.ijg.org/files/jpegsrc.v9b.tar.gz

2.tar xvf jpegsrc.v9b.tar.gz

3.cd jpeg-9b/
4.autoconf
5.mkdir build

6.  ../configure --prefix=$PWD/_install --host=arm-linux-gnueabi

7.make

8.make install

libpng依賴于zlib,使用autoconf生成configure腳本

1.wget ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng16/libpng-1.6.32.tar.xz

2.tar xvf libpng-1.6.32.tar.xz

3.cd libpng-1.6.32

4.mkdir build

5.cd build

6.  ../configure --prefix=$PWD/_install  LIBS=-L/home/jello/zlib-1.2.11/build/_install/lib CPPFLAGS=-I/home/jello/zlib-1.2.11/build/_install/include --host=arm-linux-gnueabi

7.make

8.make install

libxml2依賴于zlib,configure由autoconf生成,配置項(xiàng)--without-Python

1.axel ftp://xmlsoft.org/libxml2/libxml2-2.9.4.tar.gz

2.tar xvf libxml2-2.9.4.tar.gz

3.cd libxml2-2.9.4

4.mkdir build

5.cd build

6. ../configure --prefix=$PWD/_install LIBS=-L/home/jello/zlib-1.2.11/build/_install/lib CPPFLAGS=-I/home/jello/zlib-1.2.11/build/_install/include --host=arm-linux-gnueabi --without-python
7.make
8.make install

freetype依賴于zlib,libpng

1.wget nongnu.askapache.com/freetype/freetype-2.6.5.tar.gz

2.tar xvf freetype-2.6.5.tar.gz

3.cd freetype-2.6.5

4.mkdir build

5.cd build

6. export LDFLAGS="-L/home/jello/zlib-1.2.11/build/_install/lib -L/home/jello1/libpng-1.6.32/build/_install/lib"

7.export CFLAGS="-I/home/jello/zlib-1.2.11/build/_install/include -I/home/jello/libpng-1.6.32/build/_install/include"
8.最重要的一步:還記得剛安裝好的libpng庫嗎?現(xiàn)在需要它的幫助,進(jìn)入它的安裝目錄吧,筆者的在/home/jello/libpng-1.6.32/build/__install下,所以進(jìn)入其lib目錄:
cd /home/jello/libpng-1.6.32/build/__install/lib

接著再創(chuàng)建一個(gè)軟鏈接,鏈接到庫libpng16.so.16.32.0

ln -s libpng12.so libpng16.so.16.32.0

好了這一步很關(guān)鍵,如果不做這一步,會(huì)提示找不到-lpng12,也就是找不到庫文件libpng12.so那么回到之前的build目錄吧

9. ../configure --prefix=$PWD/__install --host=arm-linux-gnueabi

10.make

11.make install

graphviz 不需要編譯此軟件,只需要交叉編譯其中的3個(gè)庫即可,libcdt.so libcgraph.so libgvc.so,編譯imagemagick需要這三個(gè)庫及及其頭文件路徑

1.wget http://www.graphviz.org/pub/graphviz/stable/SOURCES/graphviz-2.40.1.tar.gz

2. tar xvf graphviz-2.40.1.tar.gz

3. cd graphviz-2.40.1

4.mkdir build

5.cd build

6.export CC=arm-linux-gnueabi-gcc

7.export AR=arm-linux-gnueabi-ar

8.  ../configure --prefix=$PWD/__install --host=arm-linux-gnueabi

9.make (會(huì)有錯(cuò)誤信息,不用管,因?yàn)樵谶@個(gè)過程中會(huì)運(yùn)行編譯好的arm程序,但當(dāng)前是pc機(jī),因此不能運(yùn)行,故報(bào)錯(cuò))

10.make install (會(huì)有錯(cuò)誤信息,不用管,我們只需要生成的那三個(gè)庫和頭文件就可以了)

 

準(zhǔn)備已經(jīng)妥當(dāng),開始交叉編譯imagemagick

1.獲取源碼:

git clone https://github.com/ImageMagick/ImageMagick.git

2.指定庫和頭文件的路徑,這里就是為了保證在交叉編譯時(shí)找到正確的庫!

export CFLAGS="-I/home/jello/freetype-2.6.5/build/_install/include -I/home/jello/freetype-2.6.5/build/_install/include/freetype2 -I/home/jello/libpng-1.6.32/build/_install/include -I/home/jello/tiff-4.0.8/compile/_install/include -I/home/jello/jpeg-9b/build/_install/include -I/home/jello/libxml2-2.9.4/build/_install/include -I/home/jello/libxml2-2.9.4/build/_install/include/libxml2 -I/home/jello/zlib-1.2.11/build/_install/include -I/home/jello/graphviz-2.40.1/build/_install/include/graphviz"

export LDFLAGS="-L/home/jello/freetype-2.6.5/build/_install/lib -L/home/jello/libpng-1.6.32/build/_install/lib -L/home/jello/tiff-4.0.8/compile/_install/lib -L/home/jello/jpeg-9b/build/_install/lib -L/home/jello/libxml2-2.9.4/build/_install/lib -L/home/jello/zlib-1.2.11/build/_install/lib -L/home/jello/graphviz-2.40.1/build/_install/lib"

3.cd ImageMagick

4.mkdir build

5.cd build

6. ../configure --prefix=$PWD/__install --disable-installed --without-perl --without-x --without-fpx --without-wmf --disable-openmp --host=arm-hisiv400-linux-gnueabi

7.在當(dāng)前目錄項(xiàng)會(huì)生成Makefile文件,修改其中的CFLAGS,筆者生成的Makefile文件中的CFLAGS如下:

CFLAGS = -I/usr/include/libxml2 -I/usr/include/libpng12 -I/usr/include/graphviz -I/usr/include/freetype2   -I/home/jello/freetype-2.6.5/build/_install/include -I/home/jello/freetype-2.6.5/build/_install/include/freetype2 -I/home/jello/libpng-1.6.32/build/_install/include -I/home/jello/tiff-4.0.8/compile/_install/include -I/home/jello/jpeg-9b/build/_install/include -I/home/jello/libxml2-2.9.4/build/_install/include -I/home/jello/libxml2-2.9.4/build/_install/include/libxml2 -I/home/jello/zlib-1.2.11/build/_install/include -I/home/jello/graphviz-2.40.1/build/_install/include/graphviz -Wall -fexceptions -pthread -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16

將其中含有/usr/include的路徑刪掉,筆者刪除后如下:

CFLAGS = -I/usr/include/graphviz -I/usr/include/freetype2   -I/home/jello/freetype-2.6.5/build/_install/include -I/home/jello/freetype-2.6.5/build/_install/include/freetype2 -I/home/jello/libpng-1.6.32/build/_install/include -I/home/jello/tiff-4.0.8/compile/_install/include -I/home/jello/jpeg-9b/build/_install/include -I/home/jello/libxml2-2.9.4/build/_install/include -I/home/jello/libxml2-2.9.4/build/_install/include/libxml2 -I/home/jello/zlib-1.2.11/build/_install/include -I/home/jello/graphviz-2.40.1/build/_install/include/graphviz -Wall -fexceptions -pthread -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16

 8.make

9.make install

ok完結(jié)

相關(guān)閱讀


新聞名稱:Ubuntu16.04下交叉編譯ImageMagick
文章URL:http://m.5511xx.com/article/cophido.html