顯示廣告
隱藏 ✕
看板 mud_3y
作者 kasase (凱薩斯)
標題 Re: 關於源碼
時間 2012年04月16日 Mon. AM 11:27:27


※ 引述《jakeuj》之銘言:

jakeuj:以 Ubuntu 編譯該SRC失敗 請問怎麼樣才能成功編譯該SRC呢?

我重新review了一次

總共有兩個compile error

1.
    system.c: In function ‘do_uname’:
    system.c:395:50: error: ‘struct utsname’ has no member named ‘domainname’

    sol:
	
把domainname那段註解掉

2.
    comm.c:(.text+0x6eba): undefined reference to `crypt'
    comm.c:(.text+0x6fad): undefined reference to `crypt'
    comm.c:(.text+0x777b): undefined reference to `crypt'
    act_comm.o: In function `do_retire':
    act_comm.c:(.text+0x4783): undefined reference to `crypt'
    act_comm.o: In function `do_suicide':
    act_comm.c:(.text+0x5293): undefined reference to `crypt'
    act_info.o:act_info.c:(.text+0x811f): more undefined references to `crypt' follow
    collect2: ld returned 1 exit status

    sol:
	
Makefile裡面compile option加入-lcrypt

這樣compile就可以成功

再來就是runtime

3y後來使用mmap來開檔

遇到filesize是0的會error

這點再檢查一下應該就可以正常run了

以上

--
※ 作者: kasase 時間: 2012-04-16 11:27:27
※ 編輯: kasase 時間: 2012-04-16 15:37:47
※ 同主題文章:
  04-14 16:00 jakeuj □ 關於源碼
● 04-16 11:27 kasase Re 關於源碼
  04-16 22:14 jakeuj Re 關於源碼
※ 看板: mud_3y 文章推薦值: 0 目前人氣: 0 累積人氣: 244 
r)回覆 e)編輯 d)刪除 M)收藏 ^x)轉錄 同主題: =)首篇 [)上篇 ])下篇