Cmake build blues

I’m trying to build Radiance in the Homebrew Mac package manager. As a quick and dirty first attempt, I’m using cmake, and I’m most of the way there. BUT. somewhere in the fixup_bundle phase it produces this error message:
/Applications/ can't open input file: /tmp/radiance-20210112-62986-1vwmodl/Radiance-5.2.2/rfritz/radiance/radiance/bin/QtPrintSupport.framework/Versions/5/QtPrintSupport for writing (Permission denied)

Anyone seen anything like this? Any ideas of what to do about it?

Wow, old pain (CMake) mixed with new pain (Homebrew). I’ve never tried to make a GHomebrew recipe for Radiance, glad you’re taking this on! Unfortunately, I don’t know what is causing this error. I don’t even know why it’s trying to add print support libraries at all.

What is the process for “using CMake” to make this homebrew deal? Maybe you can crib off of how Mingbo got everything dialed in for LBNL last year since that’s working swimmingly?

With Homebrew, creating a “formula” for a cmake build is easy – the “brew create --cmake URL” command does it. It’s just a matter, then, of figuring out which packages the build depends on and calling them out. I got through those steps. Problem is, there’s something wrong with the cmake files, and the build fails.

I’ve invited you to the repo. If you can figure anything out, please let me know!

1 Like

My first thought is why are you basing this on the NREL repository, instead of the new LBNL one?

I also don’t understand why there are even fixup errors, I thought that stuff was only called when making a package, whereas this brew recipe seems to just use CMake to build source and install it. It’s literally calling CMake build targets (e.g. install) if I’m reading this correctly.

Because I didn’t know there was an LBNL repo. I’ll update the formula and see if the new version works better.
I don’t understand cmake. I am not sure anyone does except for the Kitware people.

Oh wow, maybe we need another announcement about it! It’s miles ahead of the NREL one, doing automated builds (with tests!) on a weekly basis. And there were a few things tuned up in the CMake files, lots of missing stuff, etc. Maybe it will “JustWork[TM]”, who knows.

I agree, CMake is a bit impenetrable but it’s what I was raised on. I’d say I “get” about 5% of it.

Hmmm…has the cmake build ever been tested on any Unix environment?

And, since I’m asking for the moon, oughtn’t the auxiliary files be included in the LBNL-ETA/Radiance repository? I’m not going to complete an install without them, that’s for sure!
Who would I suggest that to?

So, I finally hacked this out and it’s working. However, I am not using cmake; instead I am using the good old makeall script and the rad5R3all.tar.gz, which already contains the aux files. You can see the results over at the GitHub repo.
Next thing to do is get the click-through license going, which may yet kill the whole project. None of the open source package managers do well with click-through licenses, even open source click-through licenses. Bah!