F2I-Consulting / fesapi

DevKit for ENERGISTICS™ data standards (mainly RESQML™), multi-languages (C++, Java, C#, Python)
Apache License 2.0
32 stars 24 forks source link

Problems to build on Windows with `WITH_ETP=true` #303

Closed nicoddemus closed 2 years ago

nicoddemus commented 2 years ago

Hi everyone,

I'm trying to build fesapi 2.0.0.0 on Windows, using CMake, to produce a conda package.

I'm using conda to build it, and things work fine with WITH_ETP=false. However I need the etp files, (I'm trying to use a third-party library which uses fesapi with etp), so I set WITH_ETP. However it then fails because it needs AVRO.

I then attempted to build AVRO, however it is not clear it works on Windows (trying to build the latest version gives compilation errors that suggest it only works on Linux).

My question is if I'm correct in the assumption that WITH_ETP=true is supported on Windows, and it is possible to get AVRO on Windows working? Even something along the lines of "we never tried to get ETP working on Windows", or even "Oh that's not supported" would also be helpful.

philippeVerney commented 2 years ago

Hi @nicoddemus,

First of all, there is no problem to post questions on Github but the forum is a more appropriate place for that : https://discourse.f2i-consulting.com/c/fesapi/5 We indeed try to use Github for code, bugs and feature request only.

I have no knowledge at all about conda but I am happy to see that FESAPI can be built with it.

I am confused to read "ETP files". ETP is a web socket protocol and does not really have the concept of "file". I am wondering if you mean EPC file which is very different and much more common (in RESQML world at least for now) or if you mean "ETP dataobjects" or "ETP messages" or "ETP something else than file but similar in content".

AVRO can be built on windows, at least some versions. We use it really often. However, it looks that we tweak a bit the installer in our CI which you can see there : https://github.com/F2I-Consulting/fetpapi/blob/main/azure-pipelines.yml (from line 27 for a Visual Studio 2017 build - windows 2016)

More generally speaking:

nicoddemus commented 2 years ago

First of all, there is no problem to post questions on Github but the forum is a more appropriate place for that : discourse.f2i-consulting.com/c/fesapi/5 We indeed try to use Github for code, bugs and feature request only.

Oh I'm sorry. Let me know if you would like to move the discussion there, I would be happy to.

I am confused to read "ETP files".

I should have been clearer: I just meant I need ETP support (in the sense "I need the etp files in the final conda package"), because the third party library I'm trying to build includes those files, for example #include <fesapi/etp/EtpMessages.h>. Reading it again I see I used poor wording there, sorry about the confusion.

AVRO can be built on windows, at least some versions. We use it really often. However, it looks that we tweak a bit the installer in our CI which you can see there : https://github.com/F2I-Consulting/fetpapi/blob/main/azure-pipelines.yml (from line 27 for a Visual Studio 2017 build - windows 2016)

Ahhh that's amazing! Pretty much all the hints I needed, thank you very much!

ETP1.2 support is still experimental and was A LOT experimental at v2.0.0.0 version. Indeed, ETP1.2 version was not even released at v2.0.0.0 version time. I strongly encourage not to use FESAPI v2.0.0.0 for ETP support which is too much experimental and now outdated.

Thanks for information, appreciate it, however the third party library explicitly says to use fesapi v2.0.0.0, but I will pass along that information to them when I have the chance.

Endly, I want to repeat that I don't know anything about conda, but the Python community mainly asked for a FESAPI package as "wheel" package which I don't know a lot neither by the way. It looks like this wheel package is now working in FESAPI master and will be officially released in the v2.3.0.0 version soon.

Thanks, but in my case I do need a conda package to use it in our environmment, so I'm building it in-house for now. If I have the time, I will try to contribute fesapi to https://github.com/conda-forge, which is a community-led collection of recipes for conda packages.

Lastly, thanks a lot for the information, it was extremely useful (specially the pointer about how you build AVRO on Azure).

Cheers!