Re: [編譯] GMP & MPFR required

看板b96902HW作者 (@O@)時間14年前 (2010/02/25 21:16), 編輯推噓4(408)
留言12則, 5人參與, 最新討論串2/2 (看更多)
這個問題應該大家都會遇到 把這兩個library 抓下來以後灌在裝 GCC source code 的資料夾裡面 就可以make了 在老師的教學裡 裝CODE的資料夾是gcc-4.4.3/src/ 不是gcc-4.4.3 錯誤訊息裡面說加上 --with-gmp --with-mpfr 指令就可以自己specify路徑 不過我不知道為什麼我用不出來 = = ※ 引述《woptspencil (小熊)》之銘言: : 我在裝gcc的時候,一切都還算順利,直到這行的時候: : ../src/configure --prefix=歐美嘎/gcc-4.4.3/install --enable -languages=c : 執行玩之後跑出來的結果 : 上面版本檢查什麼的還沒什麼問題 : 但是最下面出現了這個 : configure: error: Building GCC requires GMP 4.1+ and MPFR 2.3.2+. : Try the --with-gmp and/or --with-mpfr options to specify their locations. : Copies of these libraries' source code can be found at their respective : hosting sites as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/. : See also http://gcc.gnu.org/install/prerequisites.html for additional info. : If you obtained GMP and/or MPFR from a vendor distribution package, make : sure that you have installed both the libraries and the header files. : They may be located in separate packages. : 意思是我要去裝GMP跟MPFR這兩個library嗎? : 是不是只要把library抓下來之後把路徑指定給它就好了咧? : 有請高手解惑= =|| -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.244.131 ※ 編輯: JingXD 來自: 140.112.244.131 (02/25 21:17)

02/26 01:14, , 1F
你要先編譯 GMP、MPFR 二個函式庫。你從 GNU ftp 下載
02/26 01:14, 1F

02/26 01:15, , 2F
的壓縮檔只是 source code。解壓縮之後,也是用
02/26 01:15, 2F

02/26 01:16, , 3F
./configure --prefix=$OMEGA; make; make install
02/26 01:16, 3F

02/26 01:17, , 4F
去 build 這二個函式庫。然後之後如果要使用 --with-xx
02/26 01:17, 4F

02/26 01:18, , 5F
在 configure 的時候就加上 --with-xxx=$OMEGA
02/26 01:18, 5F

02/26 09:46, , 6F
喔喔 謝謝^^" 可是我只是解壓縮就可以用了欸 = =
02/26 09:46, 6F

02/26 14:26, , 7F
我也是解壓縮就可以用了說
02/26 14:26, 7F

02/26 17:55, , 8F
我剛發現 應該是make GCC的時候 如果這兩個lib沒有make
02/26 17:55, 8F

02/26 17:55, , 9F
那系統就會幫忙make了
02/26 17:55, 9F

03/02 17:52, , 10F
所以只需要將二個函式庫的原始碼放入src資料夾?
03/02 17:52, 10F

03/02 19:19, , 11F
資料夾的名字要是src/gmp/ src/mpfr/
03/02 19:19, 11F

03/02 20:49, , 12F
YES!
03/02 20:49, 12F
文章代碼(AID): #1BXdX8Oy (b96902HW)
討論串 (同標題文章)
文章代碼(AID): #1BXdX8Oy (b96902HW)