Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New docker image build without image converter support #3823

Closed
marzzzello opened this issue May 20, 2022 · 6 comments
Closed

New docker image build without image converter support #3823

marzzzello opened this issue May 20, 2022 · 6 comments
Assignees
Labels
Packaging:Container Container image from GitHub Packages

Comments

@marzzzello
Copy link

Environment

  • ejabberd version: 22.5.3
  • Erlang version: erl +V
  • OS: Linux (Ubuntu)
  • Installed from: ghcr.io/processone/ejabberd:latest

Configuration

[...]
  mod_http_upload:
    put_url: https://xmpp.@HOST@/upload/
    hosts:
      - xmpp.@HOST@
    thumbnail: true
[...]

Errors from error.log

2022-05-20 22:24:41.541490+00:00 [critical] Failed to start ejabberd application: Invalid value of option modules->mod_http_upload->thumbnail: ejabberd is built without image converter support

Bug description

Thumbnailing is not working because ejabberd seems to be compiled without image converter support.
Maybe related to #3514
eimp:supported_formats(). returns []

@licaon-kter
Copy link
Contributor

This keeps popping out, but which client supports this and you use?

@marzzzello
Copy link
Author

@licaon-kter I don't know, but many different clients use my server

@licaon-kter
Copy link
Contributor

Exactly, this sounds like something useful, but it's not. Other mechanisms are used to get a preview in most used clients.

Test Dino, Gajim, Conversations, Siskin, Beagle, Monal, and see how it goes first.

@marzzzello
Copy link
Author

Ye but it's not relevant to this issue

@licaon-kter
Copy link
Contributor

Those are the modern clients that your users are going to use.

As far as I know, none support these thumbnails that you talk about.

@badlop badlop self-assigned this May 23, 2022
@badlop badlop added the Packaging:Container Container image from GitHub Packages label May 23, 2022
@badlop badlop added this to the ejabberd 22.xx milestone May 23, 2022
@badlop
Copy link
Member

badlop commented May 23, 2022

Thumbnailing is not working because ejabberd seems to be compiled without image converter support.

ejabberd depends on the eimp library, and it is required to ./configure that library before compiling it, or at least passing some compile flags.

When ejabberd is compiled with rebar3, this works correctly because rebar3 is told in rebar.config to configure eimp (

{post_hook_configure, [{"eimp", []},

eimp:supported_formats().
[webp,jpeg,png,gif]

Unfortunately, when ejabberd is compiled with mix, elixir's mix does not configure eimp, and this fails:

:eimp.supported_formats
[]

The Docker image got a workaround years ago with the line (cd deps/eimp; ./configure) in processone/docker-ejabberd@b8349d1

In symmary, what install methods are affected by eimp not configured?

  • Compiling ejabberd using rebar3: works (rebar.config forces eimp configure)
  • compiling ejabberd using elixir's mix: fails
  • new installers (run, deb, rpm): fails
  • docker image: works (dockerfile has forced eimp configure)
  • new experimental container image: fails

The definitive solution would be to tell mix to configure eimp, like rebar3 has in rebar.config. Unfortunately, I found no way to setup this in mix.exs.

As an alternative solution, I've forced eimp configure when running "make deps" in ejabberd's Makefile, in recent commits.

That should solve this problem for any ejabberd mix compilation (including manual, make-binaries, Docker image and Container image).

Current status:

Let's track the installers problem in #3514

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Packaging:Container Container image from GitHub Packages
Projects
None yet
Development

No branches or pull requests

3 participants