简体   繁体   中英

Installing Nachos 3.4 Error cast from void* to int loses precision

I'm trying to install Nachos 3.4, I'm using Linux 64 bit and I have a problem, the error is casting from void* to int loses precision [-fpermissive] . I have searched many times and tried many ways such: using intptr_t , long , ,static_cast<int> and so on. But they didn't work, I can not use C or C++ library like stdint.h , cstdint.h , iostream , ... I also intend to use a cross-compiler but I have no clue. Please help me, thanks very much. 在此处输入图片说明

Nachos is 32-bit only. You are essentially trying to compile it for 64-bit, and it won't work; it is written to work only on ILP32 data model . It also requires GCC 3.4 , as it expects literal string constants to be mutable, and later GCC versions do not support that option, -fwritable-strings , at all: the code may compile without the flag, but the binaries segfault.

In essence, nachos is horribly outdated.

Your best bet is to install Debian 3.1r8 in a virtual machine (virtualbox for example), and compile and run Nachos there.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM