Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#9916 closed defect (invalid)

Poor/misleading diagnostics on pkg-config error

Reported by: David von Oheimb Owned by:
Priority: normal Component: build system
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by David von Oheimb)

Running ./configure, when anything goes wrong with a dependency lib, one just gets something like

ERROR: x265 not found using pkg-config

and it can be extremely hard guessing what went wrong. Then users typically resort to asking in forums like this: ​https://stackoverflow.com/questions/51918409/compiling-ffmpeg-x265-not-found-using-pkg-config and in my case all those hints did not help.

Eventually I dug into the configure file and found that pkg_config_fail_message is usually empty, but there is a file ffbuild/config.log that contains a lot of detail. In my case, the test compilation using libx265 went wrong with errors like

   undefined reference to `__pow_finite'

so the error "x265 not found" is pretty misleading.

In case configuration goes wrong, you should at least point users to having a look at ffbuild/config.log

I flag this ticket as 'important' because unfortunately it happens way too often that users have trouble with "configure" and are pretty lost. This typically causes major frustration and loss of time.

Change History (8)

comment:1 by quinkblack, 4 years ago

Have you seen there is something after that:

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.libera.chat.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.
Last edited 4 years ago by quinkblack (previous) (diff)

comment:2 by David von Oheimb, 4 years ago

Description: modified (diff)

in reply to:  1 comment:3 by David von Oheimb, 4 years ago

Replying to quinkblack:

Have you seen there is something after that:

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.libera.chat.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.

No haven't seen this text and don't know where you quoted it from.

Anyway, a hint to look at ffbuild/config.log should be printed by configure on failure.
And the "ERROR: XYZ not found using pkg-config" message should be strongly improved.

comment:4 by Carl Eugen Hoyos, 4 years ago

Priority: important → normal
Resolution: → invalid
Status: new → closed

There is a message pointing to config.log

comment:5 by David von Oheimb, 4 years ago

Resolution: invalid
Status: closed → reopened

Ok, meanwhile I found the message you were quoting.
It indeed gets printed when configure fails.

Yet the message is not to the point.
It does not suggest having a look at ffbuild/config.log as a source of diagnostics.

And independent of the logfile, as I explained before, output like

ERROR: x265 not found using pkg-config

is pretty poor and often even misleading.

comment:6 by Carl Eugen Hoyos, 4 years ago

Resolution: → invalid
Status: reopened → closed

It does very clearly.

comment:7 by David von Oheimb, 4 years ago

From your treatment of this ticket I can only conclude that

  1. you did not care to read/understand it properly
  2. you care little about users who want/need to build ffmpeg themselves.

This does not shed good light on this project.
I am discouraged from any further interaction.
Goodbye.

Last edited 4 years ago by David von Oheimb (previous) (diff)

comment:8 by Balling, 4 years ago

Do not compile in GPL mode if you do not want x265.

Note: See TracTickets for help on using tickets.