cloudfoundry / dotnet-core-buildpack

Cloud Foundry buildpack for .NET Core on Linux
http://docs.cloudfoundry.org/buildpacks/
Apache License 2.0
91 stars 90 forks source link

System.Drawing.Common dependencies seem incomplete, causes third-party library to fail #225

Closed NiPfi closed 4 years ago

NiPfi commented 4 years ago

What version of Cloud Foundry and CF CLI are you using? (i.e. What is the output of running cf curl /v2/info && cf version?

I removed some infos from the output because it should not be relevant. It's an OnPrem CF deployment.

{ "name": "CFAP01", "build": "2.0.2", "version": 2, "min_cli_version": null, "min_recommended_cli_version": null, "api_version": "2.134.0", "osbapi_version": "2.14", }

cf.exe version 6.46.1+4934877ec.2019-08-23

What version of the buildpack you are using?

v.2.3.1

If you were attempting to accomplish a task, what was it you were attempting to do? Use Spire.Doc library to convert a .docx file containing an image to .pdf

Is your dotnet app unpublished, platform-dependant, or self-contained? Issue doesn't exist on Windows development environment and can be mitigated by installing necessary libraries in Ubuntu.

What did you expect to happen? pdf file is generated

What was the actual behavior? There was an error, indicating issues with System.Drawing.Common

Please confirm where necessary:

Reproduction steps

  1. Create a word document in the docx format and include a .gif picture.
  2. Create service that loads the document in Spire.Doc and saves it as PDF.
  3. Push the app to CF using the dotnet core buildpack
  4. Trigger the conversion, the app will fail due to an error related to underlying system libraries.

I think the buildpack is missing some libraries to get the dependency up and running on Ubuntu. I was able to reproduce a similar error on WSL locally but solved it by installing additional libraries to libgdiplus using apt-get, namely libc6-dev and libx11-dev. I know of the custom libraries feature in the buildpack but have no clue how to identify all the .so files necessary since they seem to be depending on auite a big amount of other packages.

cf-gitbot commented 4 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/170952848

The labels on this github issue will be updated when the story is started.

ryanmoran commented 4 years ago

@NiPfi have you tried using the apt-buildpack alongside this buildpack to include the required libraries that are missing?

ryanmoran commented 4 years ago

Closing due to inactivity. Please feel free to reopen this issue with more details.