This is because the class Base is inherited twice in class Worker, one directly and one from class Person since it also inherits Base. So there are two copies of Base::sortByStr() method in class worker, one from Person(which it gets from Base), one from Base itself, and thus compiler is confused which one to call. To avoid this, you can use virtual inheritance for class Person.
class Person: virtual public Base<Person> { ...};