robocup-logistics / gazebo-rcll

Gazebo Models, Plugins, and World Files for the RoboCup Logistics League
GNU General Public License v2.0
17 stars 12 forks source link

error: redefinition of ‘struct spdlog::details::null_mutex’ struct null_mutex #56

Closed hg-tc closed 2 years ago

hg-tc commented 2 years ago

error: redefinition of ‘struct spdlog::details::null_mutex’ struct null_mutex

I met the problem when cmake build:

image

can anyone help me?

pkohout commented 2 years ago

Hi, we always build gazebo-rcll with a system installation of spdlog which works fine. I am not sure what version is downloaded via FetchAndDeclare, but I will try it out on my PC later and check if there is some sort of bug there, since I never use it.

morxa commented 2 years ago

The problem is that freeopcua ships with its own copy of spdlog, which then clashes with the target imported via FetchContent.

As @pkohout said, if you install spdlog on your system, both freeopcua and gazebo-rcll will include the system version, which should fix the issue.