日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > windows >内容正文

windows

Ice-3.5.1在CentOS 6.5系统中的编译配置教程

發布時間:2024/9/20 windows 29 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Ice-3.5.1在CentOS 6.5系统中的编译配置教程 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

Ice-3.5.1CentOS 6.5系統中的編譯配置教程

1?操作系統

CentOS release 6.5 (Final) ?x86_64 系統。

?

2?源碼包下載

Ice-3.5.1.zip

下載地址:https://zeroc.com/download/Ice/3.5/Ice-3.5.1.zip

?

ThirdParty-Sources-3.5.1.tar.gz,

下載地址:http://download.zeroc.com/Ice/3.5/ThirdParty-Sources-3.5.1.tar.gz

?

其中包括:

1)?db-5.3.21.NC.tar.gz?及隨ICE-3.5.1發布的補丁文件patch.db.5.3.21

2)?jgoodies-common-1_4_0.zip

3)?jgoodies-forms-1_6_0.zip

4)?jgoodies-looks-2_5_2.zip

5)?mcpp-2.7.2.tar.gz 及隨ICE-3.5.1發布的補丁文件patch.mcpp.2.7.2

?

此外,還需要下載:

1)?bzip2-1.0.6.tar.gz

2)?expat-2.1.1.tar.bz2

3)?mono-2.11.3.tar.bz2

4)?OpenSSL_0_9_8-stable.zip

?

3?編譯環境配置

在系統的個人目錄,例如:/home/$(username)/Documents下:

1)解壓ice-3.5.1.zip形成ice-3.5.1源碼目錄,新建名為install文件夾,用于安裝編譯后的第三方軟件工具。

2)解壓ThirdParty-Sources-3.5.1.tar.gz文件,形成第三方源碼文件目錄。

3)新建ice的環境變量文件env.sh.


首先,根據ThirdParty-Sources-3.5.1文件夾中的“README”文件內容,進行帶補丁的第三方工具mcpp和db-5.3.21的編譯和安裝:

1)解壓縮mcpp-2.7.2.tar.gz文件

$ cd mcpp-2.7.2

通過補丁文件patch.mcpp.2.7.2,對mcpp-2.7.2中的部分源代碼進行自動化地修改。

$ patch -p0 < ../mcpp/patch.mcpp.2.7.2

$ ./configure CFLAGS=-fPIC --enable-mcpplib --disable-shared

--prefix=/home/$(username)/Documents/Ice/install/3rd/mcpp272

$ make

$ make install

?

2)解壓縮db-5.3.21.NC.tar.gz文件。

$ cd db-5.3.21.NC

通過補丁文件patch.db.5.3.21,對db-5.3.21.NC中的部分源代碼進行自動化地修改。

$ patch -p0 < ../db/patch.db.5.3.21

$ cd db-5.3.21.NC/build_unix

$ ../dist/configure --prefix=/home/$(username)/Documents/Ice/install/3rd/db5321--enable-cxx --enable-java --enable-shared --enable-static

?

然后,進行其它第三方工具的安裝:

3)解壓縮bzip2-1.0.6.tar.gz文件。

$ cd bzip2-1.0.6

$ make install PREFIX=/home/$(username)/Documents/Ice/install/3rd/bzip2106

?

4)解壓縮expat-2.1.1.tar.bz2文件。

$ cd expat-2.1.1

$?./configure --prefix=/home/$(username)/Documents/Ice/install/3rd/expat211

$ make

$ make install

?

(5)解壓縮mono-2.11.3.tar.bz2文件

$ cd mono-2.11.3

$ ./configure --prefix=/home/$(username)/Documents/Ice/install/3rd/nono2113

$ make

$ make install

?

(6)解壓縮OpenSSL_0_9_8-stable.zip文件

$ cd openssl-OpenSSL_0_9_8-stable

$ ./config --prefix=/home/$(username)/Documents/Ice/install/3rd/openssl098

--openssldir=/home/$(username)/Documents/Ice/install/3rd/openssl098/openssl

$ make

$ make install

(7)在/home/$(username)/Documents/Ice/install/3rd/目錄中,新建文件夾jgoodies,并將下面三個文件解壓至該文件夾。

三個文件分別是jgoodies-common-1_4_0.zip、jgoodies-forms-1_6_0.zip和jgoodies-looks-2_5_2.zip。

主要是獲取jgoodies-common-1.4.0.jar,jgoodies-forms-1.6.0.jar和jgoodies-looks-2.5.2.jar三個Java包。


最后,編輯環境變量文件env.sh,內容如下:

===========================================================================

export TOPDIR=/home/$(username)/Documents/Ice

?

#bzip

export PATH=$TOPDIR/install/3rd/bzip2106/bin:$PATH

export LD_LIBRARY_PATH=$TOPDIR/install/3rd/bzip2106/lib:$LD_LIBRARY_PATH

?

#Berkeley DB

export PATH=$TOPDIR/install/3rd/db5321/bin:$PATH

export LD_LIBRARY_PATH=$TOPDIR/install/3rd/db5321/lib:$LD_LIBRARY_PATH

?

#expat

export PATH=$TOPDIR/install/3rd/expat211/bin:$PATH

export LD_LIBRARY_PATH=$TOPDIR/install/3rd/expat211/lib:$LD_LIBRARY_PATH

?

#mcpp

export PATH=$TOPDIR/install/3rd/mcpp272/bin:$PATH

export LD_LIBRARY_PATH=$TOPDIR/install/3rd/mcpp272/lib:$LD_LIBRARY_PATH

?

#openssl

export PATH=$TOPDIR/install/3rd/openssl098/bin:$PATH

export LD_LIBRARY_PATH=$TOPDIR/install/3rd/openssl098/lib:$LD_LIBRARY_PATH

?

#mono-2.1.1.3

export PATH=$TOPDIR/install/3rd/nono2113/bin:$PATH

export LD_LIBRARY_PATH=$TOPDIR/install/3rd/nono2113/lib:$LD_LIBRARY_PATH

?

#java classpath

export CLASSPATH=$TOPDIR/ThirdParty-Sources-3.5.1/jgoodies/jgoodies-common-1.4.0/jgoodies-common-1.4.0.jar:$CLASSPATH

export CLASSPATH=$TOPDIR/ThirdParty-Sources-3.5.1/jgoodies/jgoodies-forms-1.6.0/jgoodies-forms-1.6.0.jar:$CLASSPATH

export CLASSPATH=$TOPDIR/ThirdParty-Sources-3.5.1/jgoodies/jgoodies-looks-2.5.2/jgoodies-looks-2.5.2.jar:$CLASSPATH

export CLASSPATH=$TOPDIR/install/3rd/db5321/lib/db.jar:$CLASSPATH

===============================================================================

?

4?編譯過程

4.1 cpp模塊的編譯

首先切換目錄到:/home/$(username)/Documents/Ice/ice-3.5.1/cpp,編譯cpp部分:

編譯cpp過程中會報錯:找不到libmcpp.a這個靜態庫

===============================================================================

g++ -shared -Wl,--enable-new-dtags -Wl,-rpath,/opt/Ice-3.5/lib64 -rdynamic -m64 -Wall -Werror -pthread -fPIC -g ?-L../../lib?-o ../../lib/libSlice.so.3.5.1 -Wl,-h,libSlice.so.35 ??Scanner.o ../Slice/Grammar.o Parser.o CPlusPlusUtil.o CsUtil.o JavaUtil.o Preprocessor.o Checksum.o PythonUtil.o DotNetNames.o RubyUtil.o PHPUtil.o Util.o FileTracker.o MD5.o MD5I.o -lIceUtil ?-lmcpp

/usr/bin/ld: cannot find -lmcpp

collect2: ld returned 1 exit status

make[3]: *** [../../lib/libSlice.so.3.5.1] Error 1

make[3]: Leaving directory `/home/zhchshen/.local/share/Trash/files/ice-3.5.1/cpp/src/Slice'

make[2]: *** [Slice] Error 2

make[2]: Leaving directory `/home/zhchshen/.local/share/Trash/files/ice-3.5.1/cpp/src'

make[1]: *** [all] Error 1

make[1]: Leaving directory `/home/zhchshen/.local/share/Trash/files/ice-3.5.1/cpp'

make: *** [all] Error 1

===============================================================================

?根據出錯信息所顯示的編譯命令的靜態庫文件的目錄引導-L../../lib和出錯后的第一層退出位置:/home/zhchshen/.local/share/Trash/files/ice-3.5.1/cpp/src/Slice/,可知編譯過程的庫文件位置為:/home/$(username)/Documents/Ice/ice-3.5.1/cpp/lib,此處沒有libmcpp.a庫文件。

將/home/$(username)/Documents/Ice/install/3rd/mcpp272/lib/libmcpp.a文件,復制到:

/home/$(username)/Documents/Ice/ice-3.5.1/cpp/lib目錄中:

關閉當前已經顯示出錯信息Linux終端,重新打開終端,并source環境變量文件env.sh,再次編譯成功!

編譯cpptest程序在進行make test之前,需要修改目錄:

/home/$(username)/Documents/Ice/ice-3.5.1/cpp/test/IceUtil/unicode中filename文件名,修改為:filename.txt。否則,會報如下錯誤:

==============================================================================

*** running tests 3/84 in /home/zhchshen/Documents/Ice/ice-3.5.1/cpp/test/IceUtil/unicode

*** configuration: Default

*** test started: 08/12/17 14:16:11

starting client... ok

testing UTF-8 to wstring (utf32le) conversion... ok

wstring (utf32le) to UTF-8 conversion... ok

testing UTF-8 filename... failed!

Client.cpp:197: assertion `os.is_open()' failed

unexpected exit status: expected: 0, got -6

('test in /home/zhchshen/Documents/Ice/ice-3.5.1/cpp/test/IceUtil/unicode failed with exit status', 256)

===============================================================================


測試程序編譯、執行完畢:

?

4.2?Java模塊的編譯

類似cpp模塊的編譯,先source環境變量然后在Linux終端,切換目錄

$ cd /home/$(username)/Documents/Ice/ice-3.5.1/java

$ make

該過程中會出現如下錯誤信息:

/home/$(username)/Documents/Ice/ice-3.5.1/java/test/Ice/slicing/objects/ServerPrivateAMD.ice:159: `Forward' is not defined

/home/$(username)/Documents/Ice/ice-3.5.1/java/test/Ice/slicing/objects/ServerPrivateAMD.ice:220: `Forward' is not defined

這是由于ServerPrivateAMD.ice文件的第159行出現了如下所示的雙斜線注釋語句

class Forward; ?????????// Forward-declared class defined in another compilation unit

需要注釋的雙斜線修改為/* Forward-declared class defined in another compilation unit */

然后繼續編譯。成功編譯后,執行測試

$ make test

4.3?cs模塊的編譯

類似cpp模塊的編譯,先source環境變量然后在Linux終端,切換目錄

$ cd /home/$(username)/Documents/Ice/ice-3.5.1/cs

$ make

編譯過程中同樣會報出Forward’沒有定義的錯誤:

/home$(username)/Documents/Ice/ice-3.5.1/cs/test/Ice/slicing/objects/TestAMD.ice:153: `Forward' is not defined,同樣是slice文件雙斜線注釋引起的問題:

class Forward; ?// Forward-declared class defined in another compilation unit

雙斜線修改為/* */,重新編譯,成功編譯后,執行測試

$ make test

4.4?python模塊的編譯

類似cpp模塊的編譯,先source環境變量然后在Linux終端,切換目錄

$ cd /home/$(username)/Documents/Ice/ice-3.5.1/py

$ make

成功編譯后,執行測試

$ make test

測試的過程中出現‘Forward’沒有定義的錯誤:

===============================================================================

starting ServerAMD.py. Traceback (most recent call last):

File "/home/zhchshen/Documents/Ice/ice-3.5.1/py/test/Ice/slicing/objects/run.py", line 31, in <module>

TestUtil.clientServerTest(server="ServerAMD.py")

?File "/home/zhchshen/Documents/Ice/ice-3.5.1/scripts/TestUtil.py", line 1309, in clientServerTest?serverProc = spawnServer(server, env = serverenv, lang=serverCfg.lang, mx=serverCfg.mx)

File "/home/zhchshen/Documents/Ice/ice-3.5.1/scripts/TestUtil.py", line 1125, in spawnServer?server.expect("[^\n]+ ready\n")

File "/home/zhchshen/Documents/Ice/ice-3.5.1/scripts/Expect.py", line 399, in expect raise e

Expect.TIMEOUT: timeout exceeded in match

pattern: "[^\n]+ ready\n"

buffer: "/home/zhchshen/Documents/Ice/ice-3.5.1/py/test/Ice/slicing/objects/TestAMD.ice:153: `Forward\' is not defined

Traceback (most recent call last):

File \"/home/zhchshen/Documents/Ice/ice-3.5.1/py/test/Ice/slicing/objects/ServerAMD.py\", line 14, in <module>

Ice.loadSlice(\'-I. --all ServerPrivateAMD.ice Forward.ice\')

RuntimeError: Slice parsing failed for `-I. --all ServerPrivateAMD.ice Forward.ice\'"('test in /home/zhchshen/Documents/Ice/ice-3.5.1/py/test/Ice/slicing/objects failed with exit status', 256)

===============================================================================

修改文件:

/home/$(username)/Documents/Ice/ice-3.5.1/py/test/Ice/slicing/objects/TestAMD.ice69行,雙斜線注釋,修改為/* */注釋。然后繼續make?test。

?

4.5?其它模塊的編譯

其它模塊包括php,ruby和vb,暫時不需要這些語言的支持,本教程沒有涉及。


來源:http://blog.csdn.net/zhcshen/article/details/77121869

總結

以上是生活随笔為你收集整理的Ice-3.5.1在CentOS 6.5系统中的编译配置教程的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。