Fixed parsing of ld.so.cache on new glibc.

Since glibc 2.32, `ld.so.cache` now defaults to the "new" format, instead
of the "compat" format which was in use since glibc 2.2 (around 20 years
ago). It is now the default on e.g. Debian bullseye, and any recent Linux
distribution.

The code change adds support for the "new" format along with the existing
support for the "compat".

Before:
```
root@thinkpad:/home/cf/src/mesos/build# ldconfig -c new
root@thinkpad:/home/cf/src/mesos/build# ./bin/mesos-tests.sh --gtest_filter=*Ld*
[...]
[==========] Running 4 tests from 2 test cases.
[----------] Global test environment set-up.
[----------] 1 test from LdcacheTest
[ RUN      ] LdcacheTest.Parse
../../src/tests/ldcache_tests.cpp:43: Failure
cache: Invalid format
[  FAILED  ] LdcacheTest.Parse (0 ms)
[----------] 1 test from LdcacheTest (0 ms total)

[----------] 3 tests from Ldd
[ RUN      ] Ldd.BinSh
../../src/tests/ldd_tests.cpp:43: Failure
cache: Invalid format
[  FAILED  ] Ldd.BinSh (0 ms)
[ RUN      ] Ldd.EmptyCache
[       OK ] Ldd.EmptyCache (1 ms)
[ RUN      ] Ldd.MissingFile
../../src/tests/ldd_tests.cpp:77: Failure
cache: Invalid format
[  FAILED  ] Ldd.MissingFile (0 ms)
[----------] 3 tests from Ldd (1 ms total)

[----------] Global test environment tear-down
[==========] 4 tests from 2 test cases ran. (8 ms total)
[  PASSED  ] 1 test.
[  FAILED  ] 3 tests, listed below:
[  FAILED  ] LdcacheTest.Parse
[  FAILED  ] Ldd.BinSh
[  FAILED  ] Ldd.MissingFile

 3 FAILED TESTS
```

After:

```
root@thinkpad:/home/cf/src/mesos/build# ldconfig -c new
root@thinkpad:/home/cf/src/mesos/build# ./bin/mesos-tests.sh --gtest_filter=*Ld*
[...]
[==========] Running 4 tests from 2 test cases.
[----------] Global test environment set-up.
[----------] 1 test from LdcacheTest
[ RUN      ] LdcacheTest.Parse
[       OK ] LdcacheTest.Parse (529 ms)
[----------] 1 test from LdcacheTest (529 ms total)

[----------] 3 tests from Ldd
[ RUN      ] Ldd.BinSh
[       OK ] Ldd.BinSh (3 ms)
[ RUN      ] Ldd.EmptyCache
[       OK ] Ldd.EmptyCache (0 ms)
[ RUN      ] Ldd.MissingFile
[       OK ] Ldd.MissingFile (0 ms)
[----------] 3 tests from Ldd (3 ms total)

[----------] Global test environment tear-down
[==========] 4 tests from 2 test cases ran. (541 ms total)
[  PASSED  ] 4 tests.
```

This closes #384
1 file changed
tree: 49177ac3dcc3808c1b5be7a9ab5c5a48cd6d0b45
  1. 3rdparty/
  2. bin/
  3. cmake/
  4. docs/
  5. include/
  6. m4/
  7. site/
  8. src/
  9. support/
  10. .gitattributes
  11. bootstrap
  12. CHANGELOG
  13. CMakeLists.txt
  14. configure.ac
  15. Doxyfile
  16. LICENSE
  17. Makefile.am
  18. mesos.pc.in
  19. NOTICE
  20. README.md
README.md

Apache Mesos

Apache Mesos is a cluster manager that provides efficient resource isolation and sharing across distributed applications, or frameworks. It can run Hadoop, Jenkins, Spark, Aurora, and other frameworks on a dynamically shared pool of nodes.

Visit us at mesos.apache.org.

Mailing Lists

Documentation

Documentation is available in the docs/ directory. Additionally, a rendered HTML version can be found on the Mesos website's Documentation page.

Installation

Instructions are included on the Getting Started page.

License

Apache Mesos is licensed under the Apache License, Version 2.0.

For additional information, see the LICENSE and NOTICE files.