NREL / OpenStudio

OpenStudio is a cross-platform collection of software tools to support whole building energy modeling using EnergyPlus and advanced daylight analysis using Radiance.
https://www.openstudio.net/
Other
506 stars 192 forks source link

Finding system swig [Build] #5276

Closed zwillikon closed 3 weeks ago

zwillikon commented 1 month ago

I'm trying to replace the AUR binary PKGBUILD with a new built-from-source recipe. Linking to system libraries is an ArchLinux goal. Running cmake on git master results in:

  Could not find a package configuration file provided by "SWIG" with any of
  the following names:

    SWIGConfig.cmake
    swig-config.cmake

ArchLinux's swig package has never contained any CMake config files for several versions.

Is Conan-SWIG nonstandard?

jmarrec commented 3 weeks ago

This is because of this line, which contains the CONFIG directive: https://github.com/NREL/OpenStudio/blob/cae94352f7d5ce2c44602dbda113fcb7bf085ab8/CMakeLists.txt#L444

I am not in the least familiar with AUR binaries or whatever, so I can't really help more than that. Is patching an option for these builds? If so, try to remove the CONFIG bit? Probably tweak the version too. I'm not 100% clear on why exactly we had to do that for swig, but I definitely remember it was needed because it kept picking the system SWIG instead of the conan provided one like we wanted.

Conan, when you run conan install is creating config files in your build directory to tweak a few things.

Out of convenience, I'm providing a zip that contains the conan generated files for the machine I'm on, so you can have a look.

SWIGConfigConan.zip

https://github.com/conan-io/conan-center-index/blob/e4ffd89e9daeefe010f6729044a72328be048ede/recipes/swig/all/conanfile.py#L184-L189

jmarrec commented 3 weeks ago

I'm closing this issue as this is something out of our scope, but I'm happy to keep chatting here if I can help.