64 bit linux make issue solution
If you face while, make like below error (compile ederken aşağıdaki gibi bir hata alırsanız)
ft8.cpp:271:21: error: cast from ‘unsigned char*’ to ‘unsigned int’ loses precision [-fpermissive] 271 | vAddr = (void)(((unsigned)mbox.virt_addr) + offset); | ^~~~~~~~~~~~~~~~~~~~~~~~ ft8.cpp:271:12: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] 271 | vAddr = (void)(((unsigned)mbox.virt_addr) + offset); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ft8.cpp:272:12: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] 272 | bAddr = (void)(((unsigned)mbox.bus_addr) + offset); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
this caused by host operating system is 64 bit code designed for 32 bit (nedeni code 32 bit için dizayn edilmiş ama 64 bit os te complie ediyorsunuz)
easily patch ft8.cpp line 271 and 271 with (ft8.cpp deki 271 ve 272 satırı nı solution ile değiştirin)
🔍 Problematic Code (sould be deleted or remarked with //
vAddr = (void)(((unsigned)mbox.virt_addr) + offset); bAddr = (void)(((unsigned)mbox.bus_addr) + offset);
🛠️ Solution - update with below code
Update your code like this:
#include
vAddr = (void)((uintptr_t)(mbox.virt_addr) + offset); bAddr = (void)((uintptr_t)(mbox.bus_addr) + offset);