Skip to content

Commit

Permalink
docs: polish readme
Browse files Browse the repository at this point in the history
  • Loading branch information
OpatrilPeter committed Oct 20, 2022
1 parent a205d98 commit e165377
Showing 1 changed file with 8 additions and 20 deletions.
28 changes: 8 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,12 @@ We appreciate your feedback!

- C++14 compatible compiler (tested GCC>=4.9)
- MySQL C API dev (libmysqlclient-dev)
- Boost Asio library [optional, for DNS-aware connection pool only] (on Debian, package `libboost-system-dev` covers required dependencies)


### Additional requirements for testing

- socat
- Boost System [for TEST_EXTENDED only] (libboost-system-dev)

### Bootstrap

Expand All @@ -62,13 +63,16 @@ git submodule update --init --recursive

Tests require docker(>=1.5.0) for running mysql instances with testing data.

Tests are disabled by default, you can enable them by adding `-DTEST_ENABLE=TRUE` to cmake comamnd.
Tests are disabled by default, you can enable them by adding `-DTEST_ENABLED=TRUE` to cmake comamnd.

Aside from basic tests, there is also

Following additional sub-tests are enabled by default: `TEST_ODR` and `TEST_EXTENDED`.
- `test_odr`: test of [One Definition Rule](https://en.wikipedia.org/wiki/One_Definition_Rule). Allowed, but not build by default. Nonexecutable, fails by failing to build succesfully.
- `test_extended`: tests of additional, optional facilities depending on Boost

```bash
mkdir build && cd build
cmake .. -DTEST_ENABLE=TRUE
cmake .. -DTEST_ENABLED=TRUE
cmake --build . -j <number of concurrent jobs>
```

Expand Down Expand Up @@ -413,22 +417,6 @@ DefaultLogger::setLoggerPtr(std::move(logger));

There are problems caused by MySQL C API's bad design which are solved by <https://github.com/seznam/SuperiorMySqlpp/blob/master/include/superior_mysqlpp/low_level/mysql_hacks.hpp>. This is causing problems with MariaDB which stripped down some symbols from their shared object that we use to fix this bug. (<https://github.com/seznam/SuperiorMySqlpp/issues/2>)

### ABI tag warnings

GCC supports `-Wabi-tag` that should warn when a type with ABI tag is used in context that not have that ABI tag (<https://gcc.gnu.org/onlinedocs/gcc-6.4.0/gcc/C_002b_002b-Dialect-Options.html#C_002b_002b-Dialect-Options>). This warning should be used only for building shared libraries.

Mentioned compiler warning informs about situations where library may be theoretically successfully linked with another one built with incompatible ABI. For more info on this topic, see

- <https://developers.redhat.com/blog/2015/02/05/gcc5-and-the-c11-abi/>
- <https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html>

This warning is triggered many times in this library, for example for each function where `std::string` is returned from the function or for each structure that contains `std::string` -- generally, in each case where the type is not part of the resulting mangled name for given symbol.
Unfortunately, the only way to resolve this warning properly is explicitly put `abi_tag` attribute to every single affected symbol, which seems excessive and does not help readability.
ABI tag incompatibility is transitive to descendants -- that means when you build own library using *SuperiorMySqlpp* you shouldn't use `-Wabi-tag` either.

Notably, our internet research seem to suggest that this issue (linking code built with old and new ABI) is almost never occurring in practice, as all packages for given OS are by convention built with the same version.
Judging from the relative lack of related problems, tutorials or general discussion about this topic, `-Wabi-tag` seems to be generally unused by now.

### MariaDB compatibility

MariaDB connector/C 10.2 upwards can be used instead of MySQL connector/C.
Expand Down

0 comments on commit e165377

Please sign in to comment.