Orange s中碰到的一些問題

2021-06-07 18:24:25 字數 1295 閱讀 1309

本人最近在研究orange』s這本書,感覺很不錯,就是由於是初學者,經常會遇到一些問題,這裡是我記錄的一些問題以及通過網路搜到的一些解決方法:

1.本人由於是在ubuntu11.10 x64環境下開發,而書中預設是在32位環境下開發的,執行make everything命令時會報錯:

ricky@ricky-ubuntu:/home/oranges/oranges/chapter5/i$ sudo make everything 

ld -melf_i386 -s -ttext 0x30400 -o kernel.bin kernel/kernel.o kernel/start.o kernel/i8259.o kernel/global.o kernel/protect.o lib/klib.o lib/kliba.o lib/string.o

ld: i386:x86-64 architecture of input file `kernel/start.o' is incompatible with i386 output

ld: i386:x86-64 architecture of input file `kernel/i8259.o' is incompatible with i386 output

ld: i386:x86-64 architecture of input file `kernel/global.o' is incompatible with i386 output

ld: i386:x86-64 architecture of input file `kernel/protect.o' is incompatible with i386 output

ld: i386:x86-64 architecture of input file `lib/klib.o' is incompatible with i386 output

lib/klib.o: in function `disp_int':

klib.c:(.text+0xff): undefined reference to `__stack_chk_fail'

make: *** [kernel.bin] 錯誤 1

這裡要解決相容問題需要修改makefile,在cflags中新增-m32,在ldflags中新增-melf_i386可以解決相容問題,不過修改完後先執行make clean將生成的.o檔案去掉再執行make everything可以解決相容問題,但還是有最後的klib.c問題,這是在cflags中新增-fno-stack-protector即可,這個原理不大明白,可以參見原始問答:

2012-07-15

mysql碰到的一些問題

今天碰到了一些mysql問題總結一下 error 1100 hy000 table tablename was not locked with lock tables 出現這種問題的原因很多,今天的問題是連線達到了上線,以前設計是10w左右,超過了此資料,就報了上面的錯誤,更改連線數就可以了。有關於...

自己碰到的一些問題

把平時工作中碰到的一些問題和解決辦法寫出來,共勉 1.kcafillmoderemoved,這個是預設值,也就是說當動畫開始前和結束後,動畫對layer都沒有影響,動畫結束後,layer會恢復到原來的狀態 2.kcafillmodeforwards,當動畫結束後,layer不會恢復到原來的狀態,會一...

Mongo db碰到的一些問題

mongo 的總結 1.許可權不夠error couldn t add user command createuser requires authentication 解決方案 先使用超級管理員登入,再進行其他資料庫使用者建立的建立。先退出 命令列,然後重新進入認證,只認證乙個使用者,不要多次使用d...