libredfish icon indicating copy to clipboard operation
libredfish copied to clipboard

libredfish doesn't install entities/chassis.h or entitites/resource.h

Open edtanous opened this issue 3 years ago • 2 comments

libredfish isn't usable as installed. To reproduce, build and install libredfish:

mkdir build
cd build
cmake .. -G Ninja
ninja
sudo ninja install

Then create a separate file test.c that attempts to use libredfish with the content:

#include <redfish.h>
int main(int argc, const char** argv){}

Try to compile with:

gcc test.c

Observe that compilation fails on an unfound entities/resource.h.

The above test was done on a debian 10 distro, but it is likely the same on all distros.

A quick scan through the code shows that those entities were not included in REDFISH_HDR_PUBLIC, although it's not clear if they're intended to be public or not, and even if they were, would require special handling because of the entities subfolder.

edtanous avatar Jul 30 '21 18:07 edtanous

@pboyd04 any thoughts on this?

mraineri avatar Aug 06 '21 19:08 mraineri

Hi everyone,

I stumbled on the same issue as Ed, and made a quick and simple workaround within the CMake file. I created a Pull Request (#151) with the aforementioned workaround. @mraineri could you link the PR to this issue please?

Thank you in advance for the resolution of this issue.

Best regards, --Mathieu.

matsKNY avatar Aug 19 '21 12:08 matsKNY

Closing; should be addressed by the referenced PR...

mraineri avatar Jun 28 '24 19:06 mraineri