[MDEV-33091] pcre2 headers aren't found on Solaris Created: 2023-12-20 Updated: 2024-01-19 Resolved: 2024-01-19 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Compiling |
| Affects Version/s: | 10.11.6 |
| Fix Version/s: | 10.6.17, 10.11.7, 11.0.5, 11.1.4, 11.2.3, 11.3.2 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Rainer Orth | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Solaris 11.4/x86 with GCC 13.2.0 |
||
| Attachments: |
|
| Description |
|
`client/mysqltest.cc` and a few others fail to compile on Solaris:
Short of some cmake surgery in `cmake/pcre.cmake`, the easiest way to work around this was to add `-I/usr/include/pcre` to `CFLAGS` and `CXXFLAGS` before invoking `cmake`. |
| Comments |
| Comment by Sergei Golubchik [ 2024-01-03 ] |
|
same as with other issues. We don't have Solaris in CI, but if you'll provide a patch, we'll apply it (providing it won't break anything else) |
| Comment by Rainer Orth [ 2024-01-09 ] |
|
Since the pcre2 headers live in `/usr/include/pcre` on Solaris and so far `pcre.cmake` only checks for the existance of the libraries, not for the headers, that `cmake` check needs to be revamped:
Again, tested on Solaris 11.4/amd64 (which needs that separate `pcre` subdir) and Linux/x86_64 (which doesn't). |
| Comment by Sergei Golubchik [ 2024-01-10 ] |
|
why do you need find_path and find_library in your patch? pkg-config is supposed to provide all paths, you shouldn't need to search manually after it. I'd expect it to be just pkg_check_modules(PCRE ${required} libpcre2-8) and then use PCRE_LIBRARIES, PCRE_INCLUDE_DIRS, etc (here ${required} is REQUIRED if WITH_PCRE is "system") |
| Comment by Rainer Orth [ 2024-01-10 ] |
|
I've followed `cmake's `FindLibXml2.cmake here. I suppose they use both `pkg_check_modules and `find_path/`find_library to allow for configurations with and without `pkg-config files. |
| Comment by Sergei Golubchik [ 2024-01-12 ] |
|
rorth, please check commit 37beb8b8bc0 — does it work for you? |
| Comment by Rainer Orth [ 2024-01-15 ] |
|
I just gave the bb-10.6-serg branch a try on Solaris 11.4: the errors not finding the pcre errors are gone. Thanks. |