Problem linking ufs_model/fv3atm to bacio::bacio4 with CMake

I am trying to compile the global-workflow from NOAA-EMC GFSv16.1.2 on AWS running a Ubuntu 18.04 instance. But I'm having errors when attempting to build the UFS. These errors are related to not finding a linked target "bacio::bacio_4" even though a find_package() call within the CMake file correctly finds the package. Do you know how I can fix this error? 

Good afternoon,

The `bacio` library was recently updated to remove `_4` from the name.  From the build.log you shared, it looks like you are using version 2.5.0.  The simplest solution would be to downgrade the `bacio` library to version 2.4.1

 Another solution is to add the following in the top-level CMakeLists.txt and replace bacio::bacio_4 with bacio::${bacio_name} wherever that is referenced:

if(bacio_VERSION GREATER_EQUAL 2.5.0)
  set(bacio_name bacio)
else()
  set(bacio_name bacio_4)
endif()

Best regards,

Fredrick

Attach Files