0

Brief: We moved our cross compilation toolchain for an arm board from a 32 bit file system host to a 64 bit host whose file system has inodes > 2^32. Using gcc-linaro-4.9-2016.02-x86_64_arm-linux-gnueabihf results in the error

cc1plus: error: MYPATH: Value too large for defined data type

where

$ stat MYPATH
...
Inode 9264879623
...

This toolchain is compiled for 64 bit host, so why can't it handle 64bit inodes?

Long: We used gcc-linaro-arm-linux-gnueabihf-4.8-2014.04 on our 32 bit host. Initially after moving to a 64 bit file host, we set enable_ino64=0 and continued with the old toolchain. However, this only has effect on a single machine and eventually we want the toolchain to work from all company machines.

We can successfully compile code with gcc-linaro-4.9-2016.02-x86_64_arm-linux-gnueabihf when all source files (incidentally) reside on the file server with inodes <= 32bit.

MKuhne
  • 9
  • 2

1 Answers1

0

Unfortunately, I didn't find an answer to This toolchain is compiled for 64 bit host, so why can't it handle 64bit inodes?.

What I found is a way that makes the some system functions lie about the inode, as described here.

You can make the version with LD_PRELOAD work without having root privileges. What you will see errors when working on a 32/64 mixed environment are , whenever a 64 bit application tries to load the 32bit wrapper library. It will be something similar to LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. Although it says error, its a warning and you application will continue.

If you have root access, you can also compile an empty wrapper library for 64 bit and place the 32 (actually working wrapper) and 64 (does nothing) versions in their appropriate library paths.

MKuhne
  • 9
  • 2