Skip to content
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

re2.v0.11.0 build fails on armv6l because gcc doesn't have the -m32 flag #26

Open
kevin1 opened this issue Jun 8, 2018 · 6 comments
Open
Labels
bug forwarded-to-js-devs This report has been forwarded to Jane Street's internal review system. help-wanted

Comments

@kevin1
Copy link

kevin1 commented Jun 8, 2018

While compiling this package on my armv6 (32-bit) Raspberry Pi, gcc gave this error:

g++: error: unrecognized command line option ‘-m32’
Makefile:160: recipe for target 'obj/util/arena.o' failed

The -m32 and -m64 flags aren't available on ARM because (unlike on Intel), there are separate 32/64-bit gcc toolchains. (source)

I tracked down where the flag gets added in src/re2_c/jbuild:

if ! ${ARCH_SIXTYFOUR}; then
  CXX=\"$CXX -m32\"
fi

But I wasn't sure what the best way to exclude ARM without breaking the existing functionality. Thanks in advance for your help!

@dwang20151005
Copy link
Contributor

dwang20151005 commented Jun 8, 2018 via email

@kevin1
Copy link
Author

kevin1 commented Jun 8, 2018

Thanks dwang. To give some more context, opam was installing re2 as a dependency of patdiff.

@ghost
Copy link

ghost commented Jun 11, 2018

I suppose we can change the script to say to check the output of uname and not add this flag if we are on ARM.

@MattWindsor91
Copy link

MattWindsor91 commented Jan 23, 2020

This is also happening on arm-linux-gnueabihf (Raspberry Pi 3B+, Raspbian buster (32-bit, apparently - TIL), OCaml 4.09, opam 2.0.6, dune 2.1.3) and blocking an install of shell v0.13.0. (EDIT: not core-kernel, oops)

The lines mentioned above are now https://github.com/janestreet/re2/blob/master/src/re2_c/dune#L18-L20 - I've worked around the issue by getting the v0.13.0 tarball and deleting those lines.

@github-iron github-iron added the forwarded-to-js-devs This report has been forwarded to Jane Street's internal review system. label May 25, 2020
@dwang20151005 dwang20151005 assigned ghost May 25, 2020
@ghost
Copy link

ghost commented Jun 3, 2020

If some can provide a patch to fix armv6l compilation, we'll integrate it.

@mooreryan
Copy link

mooreryan commented Oct 5, 2021

Also, we now prefer ocaml-re over re2. If you are able to switch, we recommend that instead. https://github.com/ocaml/ocaml-re

Does this mean that re2 is no longer used/recommended even by Jane Street?

Edit: Just saw this article: https://blog.janestreet.com/what-the-interns-have-wrought-2020/. I guess it isn't being used anymore.

mooreryan added a commit to mooreryan/ocaml_python_bindgen that referenced this issue Feb 2, 2022
This package uses JaneStreet's Re2 bindings.  Re2 is not currently
working on x86_32.  For more info, see here:
janestreet/re2#26.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug forwarded-to-js-devs This report has been forwarded to Jane Street's internal review system. help-wanted
Projects
None yet
Development

No branches or pull requests

6 participants
@MattWindsor91 @kevin1 @mooreryan @dwang20151005 @github-iron and others