Added 32-bit build
State: closed

Closes https://github.com/pandas-dev/pandas/issues/19694
Closes https://github.com/pandas-dev/pandas/issues/27227

Labels:
name: Build
description: Library building on various platforms

Comments:
This will be really nice to get in place.  Looks like a problem with conda
This would need to be on Windows if we wanted it right? Think Linux / macOS are 64 bit only for Conda:

https://docs.anaconda.com/anaconda/packages/pkg-docs/
Anaconda (and IIRC Conda-forge) stopped building 32-bit linux packages last
year IIRC so it's not too surprising this failed.

The CI failure in pandas-wheels was 32-bit linux. Ideally we would test
both. This approach may work for win-32.

I think to properly test linux-32, we'll need to install numpy from PyPI.

It's possible 32-bit linux can install noarch packages. Need to verify.

But the blocker here is probably reporting that `conda update conda` is
broken upstream. Haven't had time though.

On Mon, Jul 8, 2019 at 1:40 PM William Ayd <notifications@github.com> wrote:

> This would need to be on Windows if we wanted it right? Think Linux /
> macOS are 64 bit only for Conda:
>
> https://docs.anaconda.com/anaconda/packages/pkg-docs/
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/pandas-dev/pandas/pull/27274?email_source=notifications&email_token=AAKAOITU6Z7VYFQUKSIUZ4DP6OCYXA5CNFSM4H6VTDCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZN7PLQ#issuecomment-509343662>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AAKAOITOG2GQF2TBVT7BBWDP6OCYXANCNFSM4H6VTDCA>
> .
>

It wouldn't be part of the CI, but I could set up a raspi to run the test suite as part of a nightly build
We have some 32 bit checks already in the script:

https://github.com/pandas-dev/pandas/blob/c64c9cb44222a42f7b02d4d6007919cd0645f1be/ci/setup_env.sh#L28

Maybe extend that to skip the update?
@jreback @jbrockmendel, can you give any pointers on this compilation failure?

```
gcc -pthread -B /home/vsts/miniconda3/envs/pandas-dev/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DNPY_NO_DEPRECATED_API=0 -I./pandas/_libs -Ipandas/_libs/src/klib -Ipandas/_libs/src -I/home/vsts/miniconda3/envs/pandas-dev/lib/python3.6/site-packages/numpy/core/include -I/home/vsts/miniconda3/envs/pandas-dev/include/python3.6m -c pandas/_libs/algos.c -o build/temp.linux-x86_64-3.6/pandas/_libs/algos.o -Wno-unused-function
In file included from /home/vsts/miniconda3/envs/pandas-dev/include/python3.6m/Python.h:53:0,
                 from pandas/_libs/algos.c:44:
/home/vsts/miniconda3/envs/pandas-dev/include/python3.6m/pyport.h:686:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
 #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
  ^
```
Hmm https://stackoverflow.com/a/45971022 isn't promising.
https://github.com/python/cpython/blob/3c8724fc60163f4f3c3b0d531c84cc7b36783f82/Include/pyport.h#L721

I guess an issue with the overall platform?
OK, it seems to be working now. I'm using the conda compilers (just for 32-bit right now. May want to consider for other builds too. I don't know).

https://github.com/pandas-dev/pandas/pull/27274/commits/71f791e9b0f9302150b6f307dcf319495ee0951f has the fix for the issue we discovered during the release (https://github.com/pandas-dev/pandas/issues/27227). These are the expected dtypes on master.

```python
>>> gr = pd.Series([1]).groupby([0])
>>> gr.grouper.group_info[0].dtype
dtype('int64')
>>> gr.grouper.group_info[1].dtype
dtype('int32')
``` 
FYI, I think we should provide a Dockerfile to help contributors debug 32-bit issues. I don't know what the best practices are for writing / using Dockerfiles for development environments.
thanks @TomAugspurger really nice!