# error during on s3 build by myself

**URL:** <https://discourse.orthanc-server.org/t/error-during-on-s3-build-by-myself/2455>\
**Category:** Google Groups archive\
**Created:** [May 26, 2021, 2:42am UTC](https://discourse.orthanc-server.org/t/error-during-on-s3-build-by-myself/2455 "2021-05-26T02:42:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yi\_Lu](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/y/9e8a1a/32.png) [@Yi\_Lu](https://discourse.orthanc-server.org/u/Yi_Lu)\
**Post date:** [May 26, 2021, 2:42am UTC](https://discourse.orthanc-server.org/t/error-during-on-s3-build-by-myself/2455/1 "2021-05-26T02:42:05Z")

</div>

so i’m trying to build s3 plugin (in Docker debian image), the artifact is file libOrthancAwsS3Storage.so, and I map that so file to another docker container (from osimis/orthanc:latest image) as /usr/local/share/orthanc/plugins/libOrthancAwsS3Storage.so.  
When I bring up the container it comes across the following error:

orthweb | W0526 02:21:46.325202 main.cpp:864] Loading plugin(s) from: /usr/local/share/orthanc/plugins/libOrthancAwsS3Storage.so  
orthweb | E0526 02:21:46.327513 SharedLibrary.cpp:97] dlopen(/usr/local/share/orthanc/plugins/libOrthancAwsS3Storage.so) failed: Error libcrypto++.so.6: cannot open shared object file: No such file or directory  
orthweb | E0526 02:21:46.330463 main.cpp:1999] Uncaught exception, stopping now: [Error while using a shared library (plugin)] (code 25)

What did I do wrong with my building process? Here is the Dockerfile i use to build:  
[https://github.com/digihunch/orthweb/blob/main/plugin-builder/Dockerfile](https://github.com/digihunch/orthweb/blob/main/plugin-builder/Dockerfile)

Regards,

Yi

---

<div class="post-metadata">

**Author:** ![James\_Manners](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/j/a9adbd/32.png) [@James\_Manners](https://discourse.orthanc-server.org/u/James_Manners)\
**Post date:** [May 26, 2021, 2:49am UTC](https://discourse.orthanc-server.org/t/error-during-on-s3-build-by-myself/2455/2 "2021-05-26T02:49:03Z")

</div>

Hi Yi,

From the look of the error message, the osimis/orthanc container is missing libcrypto++ libraries.

Try running _apt-get --assume-yes install libboost-iostreams1.67.0 libcrypto++_ in the osimis/orthanc container after copying the plugin across.

(Also, if you are building on a M1 Mac, make sure you add --platform linux/amd64 to your docker build command. I lost a day recently because of that.)

HTH

James

---

<div class="post-metadata">

**Author:** ![Yi\_Lu](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/y/9e8a1a/32.png) [@Yi\_Lu](https://discourse.orthanc-server.org/u/Yi_Lu)\
**Post date:** [May 27, 2021, 3:02am UTC](https://discourse.orthanc-server.org/t/error-during-on-s3-build-by-myself/2455/3 "2021-05-27T03:02:33Z")

</div>

Thanks for the tips James.  
I use Docker to build to make sure the building container mirrors the runtime environment, but forgot that those dependencies are needed in the runtime container as well. I added libcrypto+±dev, and that exposed me to the next missing dependency.  
With all missing dependencies added, I also have to add the switches mentioned in [this](https://groups.google.com/g/orthanc-users/c/ufSK8fmExao/m/BEPbui4RCwAJ) other thread. to load the library correctly. That brings the size of libOrthancAwsS3Storage.so to 16MB.

I have yet to test the function of the library file because I will have to build my own image with the additional file (libOrthancAwsS3Storage.so), as well as dependencies. I’ve built a pipeline [here](https://github.com/digihunch/orthweb/actions) on github to build this file and publish to [docker hub](https://hub.docker.com/r/digihunch/orthanc-plugin).  
I’ll test the artifact with the custom image.
