New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fails to build on mips(el): expected ‘dev_t *’ {aka ‘long long unsigned int *’} but argument is of type ‘long unsigned int *’ #11247
Comments
Hmmm? .st_rdev is not of type dev_t on mips? Sounds like a bug in the mips abi to me. |
http://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/stat.h.html Posix says its dev_t. Seems mips' definition of stat is borked somehow? |
This is absolutely a bug in the MIPS o32 ABI and glibc needs fixing: Unfortunately changing |
Thanks a lot for your input, @jcowgill Is there a reasonably clean way to workaround this? If so, is there interest by upstream to take such a patch? Not sure if Debian is the only distro which builds binaries for MIPS |
FYI, buildroot does support MIPS, but I havn't tried actually building it there.. |
So, on the affected mips machines is there an actualy difference between "long long" and "long"? Is the latter 32bit and the former 64bit? (on x64-64 both would be 64bit, hence the difference wouldn't matter) |
I find this quite a major fuckup in the MIPS ABI tbh, and given how big this is I am tempted to just leave it to the MIPS folks to fix their own mess there. But I also see that this is not going to be fixed quickly soon. Hence, if anyone who cares about mips preps a patch that reworks the two pieces of code on our side to store the result of device_path_parse_major_minor() in a separate |
on O32, long is 32bit, and long long is 64bit. o32 is an quite old ABI. Let me have a try. |
O32 doesn't meet the standard. the dev_t of it was should be 32bit, while it is wrongly defined as 64bit. mipsel-linux-gnu/sys/stat.h:typedef __dev_t dev_t; No matter we modify struct stat or dev_t, the ABI are both broken. |
MIPS/O32's st_rdev member of struct stat is unsigned long, which is 32bit, while dev_t is defined as 64bit, which make some problems in device_path_parse_major_minor. Don't pass st.st_rdev, st_mode to device_path_parse_major_minor, while pass 2 seperate variables. The result of stat is alos copied out into these 2 variables. Fixes: systemd#11247
MIPS/O32's st_rdev member of struct stat is unsigned long, which is 32bit, while dev_t is defined as 64bit, which make some problems in device_path_parse_major_minor. Don't pass st.st_rdev, st_mode to device_path_parse_major_minor, while pass 2 seperate variables. The result of stat is alos copied out into these 2 variables. Fixes: systemd#11247 (cherry picked from commit f585569)
MIPS/O32's st_rdev member of struct stat is unsigned long, which is 32bit, while dev_t is defined as 64bit, which make some problems in device_path_parse_major_minor. Don't pass st.st_rdev, st_mode to device_path_parse_major_minor, while pass 2 seperate variables. The result of stat is alos copied out into these 2 variables. Fixes: systemd#11247 (cherry picked from commit f585569)
systemd version the issue has been seen with
v240
Used distribution
Debian sid
The latest upstream release of systemd fails to build on mips/mipsel with the following error message:
A full build log is available on
https://buildd.debian.org/status/fetch.php?pkg=systemd&arch=mips&ver=240-1&stamp=1545503314&raw=0
or
https://buildd.debian.org/status/fetch.php?pkg=systemd&arch=mipsel&ver=240-1&stamp=1545497753&raw=0
The text was updated successfully, but these errors were encountered: