Re: [問題] Nachos安裝問題

看板b96902HW作者 (大麻吉)時間16年前 (2009/09/24 21:52), 編輯推噓2(2011)
留言13則, 4人參與, 最新討論串2/2 (看更多)
※ 引述《curtisyyc (大麻吉)》之銘言: : 6. Test Nachos: : * ~/nachos/NachOS-4.0/code/build.linux> ./nachos : You should see the following message: : ┌─────────────────────┐ : │Machine halting! │ : │ │ : │Ticks: total 10, idle 0, system 10, user 0│ : │Disk I/O: reads 0, writes 0 │ : │Console I/O: reads 0, writes 0 │ : │Paging: faults 0 │ : │Network I/O: packets received 0, sent 0 │ : └─────────────────────┘ : 我的只有出現 : b96026@linux12: ~/nachos/NachOS-4.0/code/build.linux> ./nachos : ./nachos: Command not found. : 請問 我做了甚麼蠢事了嗎??? 以下是我make出來的東西 有沒有人跟我一樣啊 g++ -g -Wall -I../network -I../filesys -I../userprog -I../threads -I../machine -I../lib -I- -DFILESYS_STUB -DRDATA -DSIM_FIX -Dx86 -DLINUX -DCHANGED -c ../threads/thread.cc cc1plus: note: obsolete option -I- used, please use -iquote instead ../threads/thread.cc: In member function 'void Thread::Fork(void (*)(void*), void*)': ../threads/thread.cc:98: error: cast from 'void (*)(void*)' to 'int' loses precision ../threads/thread.cc: In member function 'void Thread::StackAllocate(void (*)(void*), void*)': ../threads/thread.cc:345: error: cast from 'void (*)()' to 'int' loses precision ../threads/thread.cc: In member function 'void Thread::SelfTest()': ../threads/thread.cc:430: warning: deprecated conversion from string constant to 'char*' make: *** [thread.o] Error 1 實在看不懂他是想幹麻 有沒有強者可以幫忙解惑一下 <(_ _)> 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 124.8.23.196 ※ 編輯: curtisyyc 來自: 124.8.23.196 (09/24 21:52)

09/24 22:05, , 1F
在下make depend 前先到code/test/Makefile加一下投影片
09/24 22:05, 1F

09/24 22:06, , 2F
24頁框框里的東西之後在make depend
09/24 22:06, 2F

09/24 22:43, , 3F
是把那一段插到Makefile最下面嗎 我這樣做了還是一樣耶
09/24 22:43, 3F

09/24 22:44, , 4F
都看不出來有什麼差別
09/24 22:44, 4F

09/24 23:54, , 5F
你是在編譯 nachos 本身的時候有問題嗎?
09/24 23:54, 5F

09/24 23:54, , 6F
你要先下載 nachos-linux-64bit.diff 這個修正檔。
09/24 23:54, 6F

09/24 23:55, , 7F
然後移到 Nachos-4.0 資料夾之後,執行:
09/24 23:55, 7F

09/24 23:55, , 8F
patch -p1 < nachos-linux-64bit.diff
09/24 23:55, 8F

09/24 23:56, , 9F
會有這樣的 Error 是因為 thread.cc 嘗試把 pointer
09/24 23:56, 9F

09/24 23:57, , 10F
type 轉型成 int,可是這個轉型未必成立。例如在工作站
09/24 23:57, 10F

09/24 23:57, , 11F
pointer type 是要用去 64bits,而 int 只有 32bits。
09/24 23:57, 11F

10/01 00:40, , 12F
........OS2009/files/nachos/217%2864-bit%29.htm
10/01 00:40, 12F

10/01 23:11, , 13F
我試成功了 謝謝大家的幫忙^^
10/01 23:11, 13F
文章代碼(AID): #1AktcLtq (b96902HW)
討論串 (同標題文章)
文章代碼(AID): #1AktcLtq (b96902HW)