cross compilation of ffmpeg, targetting WIndows: libbluray can not be found

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

cross compilation of ffmpeg, targetting WIndows: libbluray can not be found

Vincent Torri
Hello

I am trying to cross compile ffmpeg on Linux, targetting Windows. I
have  cross-compied and installed libbluray (libraries, header files
and .pc files are correctly installed)

I use 2 shell scripts that i have concatenated in one attached file
(ffmpeg.sh). Note how I set PKG_* environment variables in ffmpeg.sh.
They are the same for all the packages that I have installed.

The ffmpeg configure script stops with the following message :

ERROR: libbluray not found using pkg-config

I have attached ffbuild/config.log too (I wan't find any hint there
about the problem).

First I would like to know if I have launched configure with the
correct options for cross compilation

And if yes, does someone know what the problem is ?

thank you

Vincent Torri

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".

config.log (565K) Download Attachment
ffmpeg.sh (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: cross compilation of ffmpeg, targetting WIndows: libbluray can not be found

Vincent Torri
On Wed, May 29, 2019 at 12:08 PM Vincent Torri <[hidden email]> wrote:

>
> Hello
>
> I am trying to cross compile ffmpeg on Linux, targetting Windows. I
> have  cross-compied and installed libbluray (libraries, header files
> and .pc files are correctly installed)
>
> I use 2 shell scripts that i have concatenated in one attached file
> (ffmpeg.sh). Note how I set PKG_* environment variables in ffmpeg.sh.
> They are the same for all the packages that I have installed.
>
> The ffmpeg configure script stops with the following message :
>
> ERROR: libbluray not found using pkg-config

I would like to add that  I tried ffmpeg 4.1.3 and git versions

regards

Vincent Torri
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: cross compilation of ffmpeg, targetting WIndows: libbluray can not be found

Moritz Barsnick
In reply to this post by Vincent Torri
On Wed, May 29, 2019 at 12:08:27 +0200, Vincent Torri wrote:
> ERROR: libbluray not found using pkg-config
[config.log:]
> require_pkg_config libbluray libbluray libbluray/bluray.h bd_open
> check_pkg_config libbluray libbluray libbluray/bluray.h bd_open
> test_pkg_config libbluray libbluray libbluray/bluray.h bd_open
> false --exists --print-errors libbluray
> ERROR: libbluray not found using pkg-config

IMO, this indicates that libbluray.pc was not found. Is it installed in
the same path as the other cross-compile capable libraries? Is it
installed in a MingW version?

> First I would like to know if I have launched configure with the
> correct options for cross compilation

As far as I can tell from the logs, looks good so far.

> --enable-gcrypt --enable-libbluray --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libmp3lame --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtls --enable-libvorbis --enable-libwebp --enable-libxml2

Do you really have all these libraries' development versions installed,
as MingW versions?

Moritz
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: cross compilation of ffmpeg, targetting WIndows: libbluray can not be found

Vincent Torri
On Wed, May 29, 2019 at 2:29 PM Moritz Barsnick <[hidden email]> wrote:

>
> On Wed, May 29, 2019 at 12:08:27 +0200, Vincent Torri wrote:
> > ERROR: libbluray not found using pkg-config
> [config.log:]
> > require_pkg_config libbluray libbluray libbluray/bluray.h bd_open
> > check_pkg_config libbluray libbluray libbluray/bluray.h bd_open
> > test_pkg_config libbluray libbluray libbluray/bluray.h bd_open
> > false --exists --print-errors libbluray
> > ERROR: libbluray not found using pkg-config
>
> IMO, this indicates that libbluray.pc was not found. Is it installed in
> the same path as the other cross-compile capable libraries? Is it
> installed in a MingW version?

yes

> > First I would like to know if I have launched configure with the
> > correct options for cross compilation
>
> As far as I can tell from the logs, looks good so far.
>
> > --enable-gcrypt --enable-libbluray --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libmp3lame --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtls --enable-libvorbis --enable-libwebp --enable-libxml2
>
> Do you really have all these libraries' development versions installed,
> as MingW versions?

Yes, and their dependencies. I have written a small program that
automatically download, compile and install the sources of around 60
packages with mingw-w64. If you are interested, look at :
https://github.com/vtorri/ewpi

regards

Vincent Torri
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: cross compilation of ffmpeg, targetting WIndows: libbluray can not be found

Vincent Torri
In reply to this post by Moritz Barsnick
On Wed, May 29, 2019 at 2:29 PM Moritz Barsnick <[hidden email]> wrote:

>
> On Wed, May 29, 2019 at 12:08:27 +0200, Vincent Torri wrote:
> > ERROR: libbluray not found using pkg-config
> [config.log:]
> > require_pkg_config libbluray libbluray libbluray/bluray.h bd_open
> > check_pkg_config libbluray libbluray libbluray/bluray.h bd_open
> > test_pkg_config libbluray libbluray libbluray/bluray.h bd_open
> > false --exists --print-errors libbluray
> > ERROR: libbluray not found using pkg-config
>
> IMO, this indicates that libbluray.pc was not found.

normally, when pkg-config fails, it displays a message, like :


$ pkg-config --modversion foo
Package foo was not found in the pkg-config search path.
Perhaps you should add the directory containing `foo.pc'
to the PKG_CONFIG_PATH environment variable
No package 'foo' found

if libbluray.pc is not found, is it normal that config.log has no such message ?

Vincent Torri
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: cross compilation of ffmpeg, targetting WIndows: libbluray can not be found

Moritz Barsnick
On Wed, May 29, 2019 at 16:28:00 +0200, Vincent Torri wrote:

> > IMO, this indicates that libbluray.pc was not found.
>
> normally, when pkg-config fails, it displays a message, like :
>
> $ pkg-config --modversion foo
> Package foo was not found in the pkg-config search path.
> Perhaps you should add the directory containing `foo.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'foo' found
>
> if libbluray.pc is not found, is it normal that config.log has no such message ?

You're right.

What ffmpeg's configure does here is
  test_cmd $pkg_config --exists --print-errors $pkg_version || return
which is basically
  pkg-config --exists --print-errors libbluray

After that succeeds, it determines the CFLAGS and LIBS (silently), and
then:
  check_func_headers "$headers" "$funcs" $pkg_cflags $pkg_libs "$@"
which tries to compile and link a program with the given includes and
functions, in libbluray's case libbluray/bluray.h and bd_open(). But if
it did that, the log would say so, with something like:
  test_ld cc
  test_cc
  BEGIN /tmp/ffconf.TaEECP0n/test.c
which it doesn't here. So the former apparently fails.

I could tell easier if I was on your system. ;-)

Cheers,
Moritz
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: cross compilation of ffmpeg, targetting WIndows: libbluray can not be found

Vincent Torri
On Wed, May 29, 2019 at 9:41 PM Moritz Barsnick <[hidden email]> wrote:

>
> On Wed, May 29, 2019 at 16:28:00 +0200, Vincent Torri wrote:
> > > IMO, this indicates that libbluray.pc was not found.
> >
> > normally, when pkg-config fails, it displays a message, like :
> >
> > $ pkg-config --modversion foo
> > Package foo was not found in the pkg-config search path.
> > Perhaps you should add the directory containing `foo.pc'
> > to the PKG_CONFIG_PATH environment variable
> > No package 'foo' found
> >
> > if libbluray.pc is not found, is it normal that config.log has no such message ?
>
> You're right.
>
> What ffmpeg's configure does here is
>   test_cmd $pkg_config --exists --print-errors $pkg_version || return
> which is basically
>   pkg-config --exists --print-errors libbluray
>
> After that succeeds, it determines the CFLAGS and LIBS (silently), and
> then:
>   check_func_headers "$headers" "$funcs" $pkg_cflags $pkg_libs "$@"
> which tries to compile and link a program with the given includes and
> functions, in libbluray's case libbluray/bluray.h and bd_open(). But if
> it did that, the log would say so, with something like:
>   test_ld cc
>   test_cc
>   BEGIN /tmp/ffconf.TaEECP0n/test.c
> which it doesn't here. So the former apparently fails.

ah, at least it seems that indeed pkg-config fails to find the pc file

Note that PKG_CONFIG_PATH is not set and i do instead (see
https://autotools.io/pkgconfig/cross-compiling.html section 4.4 at the
bottom) :

export PKG_CONFIG_DIR=
export PKG_CONFIG_LIBDIR=$HOME/ffmpeg/lib/pkgconfig
export PKG_CONFIG_SYSROOOT_DIR=$HOME/ffmpeg

(it's in my ffmpeg.sh attached in my original mail)

> I could tell easier if I was on your system. ;-)

you can : just run ewpi :D but it is a bit long to get to ffmpeg. compilation

thank you

Vincent Torri
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: cross compilation of ffmpeg, targetting WIndows: libbluray can not be found

Carl Eugen Hoyos-2
Am Fr., 31. Mai 2019 um 07:20 Uhr schrieb Vincent Torri
<[hidden email]>:

> ah, at least it seems that indeed pkg-config fails to find the pc file

Then try to fix that first, there is a define magic that fixes it.

From looking at your configure output:
Is it possible that your are missing CROSS_PREFIX-pkg-config?
(I may be wrong)

> Note that PKG_CONFIG_PATH is not set and i do instead (see
> https://autotools.io/pkgconfig/cross-compiling.html section 4.4 at the
> bottom) :

FFmpeg does not use autotools, if pkg-config does not work for you
(it typically does not work for me here), you need to pass
--pkg-config=true to configure but in this case, you have to also
set the correct paths via --extra-*flags (this is expected and can
be avoided) and the right libraries via extra-libs (this is a trap from
the pkg-config fans), at least in some cases.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: cross compilation of ffmpeg, targetting WIndows: libbluray can not be found

Vincent Torri
Hello

On Fri, May 31, 2019 at 10:48 PM Carl Eugen Hoyos <[hidden email]> wrote:

>
> Am Fr., 31. Mai 2019 um 07:20 Uhr schrieb Vincent Torri
> <[hidden email]>:
>
> > ah, at least it seems that indeed pkg-config fails to find the pc file
>
> Then try to fix that first, there is a define magic that fixes it.
>
> From looking at your configure output:
> Is it possible that your are missing CROSS_PREFIX-pkg-config?
> (I may be wrong)

there is x86_64-w64-mingw32-pkg-config.exe, but i'm on Linux... The
pkg-config binary that must be used is the one that is on the system
on which is cross-compile.

> > Note that PKG_CONFIG_PATH is not set and i do instead (see
> > https://autotools.io/pkgconfig/cross-compiling.html section 4.4 at the
> > bottom) :
>
> FFmpeg does not use autotools,

I know, but these environment variables are not specific to autotools.
See this link (i sould give it instead) :

https://www.freedesktop.org/wiki/Software/pkg-config/CrossCompileProposal/

(see "Current Support" section)

> if pkg-config does not work for you
> (it typically does not work for me here),

it does work :

PKG_CONFIG_PATH=$HOME/ewpi_64/lib/pkg-config --modversion libbluray

returns 1.1.1

maybe I will just use PKG_CONFIG_PATH set to only one value, the one
for my cross-compiled libraries and see if configure is happy with it

thank you

Vincent Torri

> you need to pass
> --pkg-config=true to configure but in this case, you have to also
> set the correct paths via --extra-*flags (this is expected and can
> be avoided) and the right libraries via extra-libs (this is a trap from
> the pkg-config fans), at least in some cases.
>
> Carl Eugen
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: cross compilation of ffmpeg, targetting WIndows: libbluray can not be found

Vincent Torri
On Sat, Jun 1, 2019 at 8:12 AM Vincent Torri <[hidden email]> wrote:

>
> Hello
>
> On Fri, May 31, 2019 at 10:48 PM Carl Eugen Hoyos <[hidden email]> wrote:
> >
> > Am Fr., 31. Mai 2019 um 07:20 Uhr schrieb Vincent Torri
> > <[hidden email]>:
> >
> > > ah, at least it seems that indeed pkg-config fails to find the pc file
> >
> > Then try to fix that first, there is a define magic that fixes it.
> >
> > From looking at your configure output:
> > Is it possible that your are missing CROSS_PREFIX-pkg-config?
> > (I may be wrong)
>
> there is x86_64-w64-mingw32-pkg-config.exe, but i'm on Linux... The
> pkg-config binary that must be used is the one that is on the system
> on which is cross-compile.
>
> > > Note that PKG_CONFIG_PATH is not set and i do instead (see
> > > https://autotools.io/pkgconfig/cross-compiling.html section 4.4 at the
> > > bottom) :
> >
> > FFmpeg does not use autotools,
>
> I know, but these environment variables are not specific to autotools.
> See this link (i sould give it instead) :
>
> https://www.freedesktop.org/wiki/Software/pkg-config/CrossCompileProposal/
>
> (see "Current Support" section)
>
> > if pkg-config does not work for you
> > (it typically does not work for me here),
>
> it does work :
>
> PKG_CONFIG_PATH=$HOME/ewpi_64/lib/pkg-config --modversion libbluray
>
> returns 1.1.1

btw :

PKG_CONFIG_LIBDIR=$HOME/ewpi_64/lib/pkg-config --modversion libbluray

returns also 1.1.1

Vincent Torri
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: cross compilation of ffmpeg, targetting WIndows: libbluray can not be found

Carl Eugen Hoyos-2
In reply to this post by Vincent Torri
Am Sa., 1. Juni 2019 um 08:12 Uhr schrieb Vincent Torri
<[hidden email]>:

>
> Hello
>
> On Fri, May 31, 2019 at 10:48 PM Carl Eugen Hoyos <[hidden email]> wrote:
> >
> > Am Fr., 31. Mai 2019 um 07:20 Uhr schrieb Vincent Torri
> > <[hidden email]>:
> >
> > > ah, at least it seems that indeed pkg-config fails to find the pc file
> >
> > Then try to fix that first, there is a define magic that fixes it.
> >
> > From looking at your configure output:
> > Is it possible that your are missing CROSS_PREFIX-pkg-config?
> > (I may be wrong)
>
> there is x86_64-w64-mingw32-pkg-config.exe, but i'm on Linux...

(You have an exe on your Linux system?)

> The pkg-config binary that must be used is the one that
> is on the system on which is cross-compile.
>
> > > Note that PKG_CONFIG_PATH is not set and i do instead (see
> > > https://autotools.io/pkgconfig/cross-compiling.html section 4.4 at the
> > > bottom) :
> >
> > FFmpeg does not use autotools,
>
> I know, but these environment variables are not specific to autotools.
> See this link (i sould give it instead) :
>
> https://www.freedesktop.org/wiki/Software/pkg-config/CrossCompileProposal/
>
> (see "Current Support" section)
>
> > if pkg-config does not work for you
> > (it typically does not work for me here),
>
> it does work :
>
> PKG_CONFIG_PATH=$HOME/ewpi_64/lib/pkg-config --modversion libbluray
>
> returns 1.1.1
>
> maybe I will just use PKG_CONFIG_PATH

Yes, you have to set it (and this is why I still don't understand
what the advantage of using pkg-config in the first place is), if
you don't set it (or don't know it), configure will not find some
optional dependencies.
I guess PKG_CONFIG_LIBDIR can have the same effect.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: cross compilation of ffmpeg, targetting WIndows: libbluray can not be found

Vincent Torri
> > >
> > > From looking at your configure output:
> > > Is it possible that your are missing CROSS_PREFIX-pkg-config?
> > > (I may be wrong)

looking at configure, it seems you are right, i need
CROSS_PREFIX-pkg-config. I have installed both 32 and 64 bits packages
and configure passes

> I guess PKG_CONFIG_LIBDIR can have the same effect.

yes. It passes also with PKG_CONFIG_LIBDIR.

thank you

regards

Vincent Torri
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: cross compilation of ffmpeg, targetting WIndows: libbluray can not be found

Carl Eugen Hoyos-2
Am Sa., 1. Juni 2019 um 14:09 Uhr schrieb Vincent Torri
<[hidden email]>:
>
> > > >
> > > > From looking at your configure output:
> > > > Is it possible that your are missing CROSS_PREFIX-pkg-config?
> > > > (I may be wrong)
>
> looking at configure, it seems you are right, i need
> CROSS_PREFIX-pkg-config.

The alternative should be to use --pkg-config=pkg-config

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: cross compilation of ffmpeg, targetting WIndows: libbluray can not be found

Vincent Torri
On Sat, Jun 1, 2019 at 2:51 PM Carl Eugen Hoyos <[hidden email]> wrote:
>
> > looking at configure, it seems you are right, i need
> > CROSS_PREFIX-pkg-config.
>
> The alternative should be to use --pkg-config=pkg-config

i've tried before installing cross-prefixed pkg-config, and it also works

thank you


Vincent Torri
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".