Compiling Google Cloud Storage Plugin

Hi all,

I struggled a lot compiling this plugin. As with many C/C++ projects, getting my machine to the correct state, with the correct packages, libraries, etc. was quite the task.

Having done that, however, I kept running into an error that said

orthanc-object-storage/Common/…/Common/EncryptionHelpers.h:103:40: error: ‘byte’ does not name a type
103 | static std::string ToHexString(const byte* block, size_t size);

I got the exact same problem using Arch Linux and Debian Buster. To solve this, I manually changed the byte part to unsigned char (which a byte essentially is), and was able to compile it. I thought I’d leave this here in case anyone else runs into the same issue.

Additionally, I was wondering if anyone else has run into the same issue, and whether anyone would have a more replicable setup, like a docker container or the like. I was trying to make a builder container, but it would freeze when installing packages using vcpkg. I could keep trying to compile and install the dependencies manually instead of using vcpkg, but I figured maybe someone out there has done this before.

Best,

Felipe

Hello,

Please could you give a try with the following patch that is pending in the mainline?
https://hg.orthanc-server.com/orthanc-object-storage/rev/662b9d3f217d

Sébastien-

Also note that the vcpkg does not freeze, it actually takes a huge amount of time ! Can be 30-60 minutes !

Unfortunately, I left it all night and it never got through installing google-cloud-cpp. I tried the same thing with a Debian VM (not a container) with half the cores, and it took about 30 minutes to install the vcpkg packages + however long it took to compile the actual plugin. I then copied this plugin into an osimis/orthanc container, and the plugin works great! I just find it curious that the build container behaves so differently to the VM.

I think I might just copy the contents of my vcpkg folder into the Docker image. Will make for a heavy image but it won’t have to install them every time. I’ll keep you guys posted when I have time and try this.

Thank you for the work you’ve put in! I’m really enjoying customizing Orthanc with plugins and my own scripts. I definitely couldn’t do any of this with other systems I tried at first.