Meson: -D_FILE_OFFSET_BITS=64 should be disabled on some buggy 32-bit platforms

Created on 12 Feb 2018  Â·  6Comments  Â·  Source: mesonbuild/meson

Foremost in this is 32-bit Android, which is broken in amazing ways.

MinGW64-W32 is rumoured to support it, however, so we should define it for that platform.

We should ideally implement this with a combination of platform detection, version detection, and compiling code with -D_FILE_OFFSET_BITS=64 and seeing what the size of the types being used is.

windows android bug compilers cross good first issue help wanted

Most helpful comment

so colourful lables ♥

All 6 comments

so colourful lables ♥

I can confirm this bug,
compiled c++ program which uses libnfc and libfreefare. On x86_64 linux works OK, on raspberry pi (armhf) values are lost when calling library functions. Until I removed -D_FILE_OFFSET_BITS=64 I got strange segfaults with wrong memory addresses, lost values send as parameter to function in library.

Was the Raspi executable compiled natively or with a cross compiler?

natively

@SloCompTech What distro are you using on the raspberry pi, Raspbian? What libc are you using? Which raspberry pi version is this, so we know which armhf you're using.

@nirbheek I'm using version 6 of libc, bellow are prints of my linux distro version info

pi@raspberrypi:~ $ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 9.3 (stretch)
Release:        9.3
Codename:       stretch
pi@raspberrypi:~ $ uname -a
Linux raspberrypi 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l GNU/Linux
pi@raspberrypi:~ $ cat /etc/issue.net
Raspbian GNU/Linux 9
pi@raspberrypi:~ $ cat /etc/debian_version
9.3
pi@raspberrypi:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
pi@raspberrypi:~ $ hostnamectl
   Static hostname: raspberrypi
         Icon name: computer
        Machine ID: 866484cd98e9437a9c2c1774978fe470
           Boot ID: 8a5ba31a7335445ba47c871d190985f7
  Operating System: Raspbian GNU/Linux 9 (stretch)
            Kernel: Linux 4.9.59-v7+
      Architecture: arm
Was this page helpful?
0 / 5 - 0 ratings

Related issues

ignatenkobrain picture ignatenkobrain  Â·  4Comments

jhasse picture jhasse  Â·  5Comments

eyelash picture eyelash  Â·  4Comments

z33ky picture z33ky  Â·  5Comments

nirbheek picture nirbheek  Â·  5Comments