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

CMake: Ensure PCRE is available if downloading Swig from source #1260

Open
ptheywood opened this issue Nov 26, 2024 · 0 comments
Open

CMake: Ensure PCRE is available if downloading Swig from source #1260

ptheywood opened this issue Nov 26, 2024 · 0 comments
Labels

Comments

@ptheywood
Copy link
Member

PCRE is a (default) dependency of Swig under linux

We can detect it's availability in our swig prior to fetching / attempting to build swig from source.

configure: error: in `/home/ptheywood/code/flamegpu/flamegpu2/build/_deps/swig-src':
configure: error: 
        Cannot find pcre-config script from PCRE (Perl Compatible Regular Expressions)
        library package. This dependency is needed for configure to complete,
        Either:
        - Install the PCRE developer package on your system (preferred approach).
        - Download the PCRE source tarball, build and install on your system
          as you would for any package built from source distribution.
        - Use the Tools/pcre-build.sh script to build PCRE just for SWIG to statically
          link against. Run 'Tools/pcre-build.sh --help' for instructions.
          (quite easy and does not require privileges to install PCRE on your system)
        - Use configure --without-pcre to disable regular expressions support in SWIG
          (not recommended).
See `config.log' for more details

If not available, we can either:

  • Continue doing nothing, and let Swig fail at build time with an error
  • Emit an error to users, asking them to install pcre-dev
  • Fetch PCRE ourselves and install into the CMake directory & tell swig where to find it
  • Adjust our build local swig to pass --without-pcre (if this produces valid pyflamegpu wheels) if PCRE is not detected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant