[英]Building Jonesforth - asm/unistd.h: No such file or directory
嘗試在Ubuntu 16.04.4 64位(Xenial Xerus)上構建Jonesforth (32位GNU匯編程序)時,我看到以下內容:
~/src/jonesforth $ make
gcc -m32 -nostdlib -static -o jonesforth jonesforth.S
jonesforth.S:1154:24: fatal error: asm/unistd.h: No such file or directory
compilation terminated.
Makefile:11: recipe for target 'jonesforth' failed
在文件jonesforth.S
,我注意到以下幾行:
//#include <asm-i386/unistd.h> // You might need this instead
#include <asm/unistd.h>
我嘗試使用asm-i386/unistd.h
代替,但這似乎也無濟於事。
通過sudo apt install linux-headers...
安裝更多頭文件的最佳做法是嗎? 如果是這樣,我應該選擇哪一個? linux-headers-generic
應該足夠嗎?
還是應該更改jonesforth.S
所指的標頭?
將-I /usr/include/x86_64-linux-gnu
到make配方中似乎已經解決了該問題:
jonesforth: jonesforth.S
gcc -I /usr/include/x86_64-linux-gnu -m32 -nostdlib -static $(BUILD_ID_NONE) -o $@ $<
感謝上面的Peter Cordes的建議!
您需要安裝軟件包multilib
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.