Compilation of shared libraries for macOS

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Compilation of shared libraries for macOS

Aleksid
Hi,

I have a problem with compilation of shared libraries on macOS Catalina to
include FFmpeg 4.3.1 dylibs for my app video for a simple video playback:

./configure --prefix=/usr/local/Cellar/ffmpeg/4.3.1 --enable-shared
--enable-pthreads --enable-hardcoded-tables --enable-avcodec
--enable-avformat --enable-avresample --enable-postproc

I compile successfully all dylibs. But my app crashes when I try to open
any video file:



*  Symbol not found: _av_rescale_q_rnd  Referenced from:
/Users/USER/*/TestPlayer.app/Contents/Frameworks/LibAV/libavformat.58.dylib
Expected in: /usr/local/lib/libavcodec.58.dylib*

With another configuration:

./configure --prefix=/usr/local/Cellar/ffmpeg/4.3.1 --enable-shared
--enable-pthreads --enable-version3 --enable-hardcoded-tables
--enable-avresample --cc=clang --host-cflags= --host-ldflags=

My app doesn't crash, but it fails on avformat_open_input()
- “EXC_I386_GPFLT”

What am I doing wrong? With Zeranoe's dylibs everything works fine. I would
be grateful for any advice.
_______________________________________________
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: Compilation of shared libraries for macOS

Carl Eugen Hoyos-2
Am So., 2. Aug. 2020 um 19:40 Uhr schrieb Екатерина <[hidden email]>:

> I have a problem with compilation of shared libraries on macOS Catalina to
> include FFmpeg 4.3.1 dylibs for my app video for a simple video playback:
>
> ./configure --prefix=/usr/local/Cellar/ffmpeg/4.3.1 --enable-shared
> --enable-pthreads --enable-hardcoded-tables --enable-avcodec
> --enable-avformat --enable-avresample --enable-postproc

Unrelated to your problem:
Most of the options above make little sense, I wonder if you need
avresample. And I am curious: Why are you using --enable-hardcoded-tables?

> I compile successfully all dylibs. But my app crashes when I try to open
> any video file:
>
> *  Symbol not found: _av_rescale_q_rnd  Referenced from:
> /Users/USER/*/TestPlayer.app/Contents/Frameworks/LibAV/libavformat.58.dylib
> Expected in: /usr/local/lib/libavcodec.58.dylib*

This symbol is part of libavutil (since 2012), not libavcodec.

You could test with ffmpeg (the application) first to see if your
libraries work.

And please remember that only current FFmpeg git head is supported
here (and that we do not like top-posting), 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: Compilation of shared libraries for macOS

kumowoon1025
In reply to this post by Aleksid
On Sun, Aug 2, 2020 at 1:40 PM Екатерина <[hidden email]> wrote:

> Hi,
>
> I have a problem with compilation of shared libraries on macOS Catalina to
> include FFmpeg 4.3.1 dylibs for my app video for a simple video playback:


I compile successfully all dylibs. But my app crashes when I try to open
> any video file:


What am I doing wrong? With Zeranoe's dylibs everything works fine. I would
> be grateful for any advice.


Hi,

What do you use to write the app? If it’s an actual .app package then I
think you can put the one you want in a directory like
<Application>.app/Contents/Frameworks and link to the included dylib so it
doesn’t depend on the installed version.

Regards,
Ted Park

>
_______________________________________________
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: Compilation of shared libraries for macOS

Aleksid
Hi Ted,

I used Freepascal to write my app.
And this app works fine when I use FFmpeg's dylibs downloaded from Zeranoe
website. But my app doesn't work with dylibs which I compiled from FFmpeg
sources (the same version) in an attempt to reduce a file size of the app.

вс, 2 авг. 2020 г. в 22:31, Ted Park <[hidden email]>:

> On Sun, Aug 2, 2020 at 1:40 PM Екатерина <[hidden email]> wrote:
>
> > Hi,
> >
> > I have a problem with compilation of shared libraries on macOS Catalina
> to
> > include FFmpeg 4.3.1 dylibs for my app video for a simple video playback:
>
>
> I compile successfully all dylibs. But my app crashes when I try to open
> > any video file:
>
>
> What am I doing wrong? With Zeranoe's dylibs everything works fine. I would
> > be grateful for any advice.
>
>
> Hi,
>
> What do you use to write the app? If it’s an actual .app package then I
> think you can put the one you want in a directory like
> <Application>.app/Contents/Frameworks and link to the included dylib so it
> doesn’t depend on the installed version.
>
> Regards,
> Ted Park
>
> >
> _______________________________________________
> 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: Compilation of shared libraries for macOS

Aleksid
In reply to this post by Carl Eugen Hoyos-2
Hi Carl,

Thanks for your reply and I apologize that I probably posted incorrectly my
question.

Most likely, my problem will occur with the current version of FFmpeg, too.

I tried many combinations of configure options. The problem occurs even if
I use only 1 option: --enable-shared

I'll check the location of _av_rescale_q_rnd symbol for the correct
library. I use Freepascal, not C/C++. It complicates this work.

I already checked the work of my app with dylibs downloaded from Zeranoe
website. Everything works correctly. I even successfully compiled static
FFmpeg and ffmpeg and ffplay executables work fine. The problem is only
with shared libraries.

вс, 2 авг. 2020 г. в 22:14, Carl Eugen Hoyos <[hidden email]>:

> Am So., 2. Aug. 2020 um 19:40 Uhr schrieb Екатерина <
> [hidden email]>:
>
> > I have a problem with compilation of shared libraries on macOS Catalina
> to
> > include FFmpeg 4.3.1 dylibs for my app video for a simple video playback:
> >
> > ./configure --prefix=/usr/local/Cellar/ffmpeg/4.3.1 --enable-shared
> > --enable-pthreads --enable-hardcoded-tables --enable-avcodec
> > --enable-avformat --enable-avresample --enable-postproc
>
> Unrelated to your problem:
> Most of the options above make little sense, I wonder if you need
> avresample. And I am curious: Why are you using --enable-hardcoded-tables?
>
> > I compile successfully all dylibs. But my app crashes when I try to open
> > any video file:
> >
> > *  Symbol not found: _av_rescale_q_rnd  Referenced from:
> >
> /Users/USER/*/TestPlayer.app/Contents/Frameworks/LibAV/libavformat.58.dylib
> > Expected in: /usr/local/lib/libavcodec.58.dylib*
>
> This symbol is part of libavutil (since 2012), not libavcodec.
>
> You could test with ffmpeg (the application) first to see if your
> libraries work.
>
> And please remember that only current FFmpeg git head is supported
> here (and that we do not like top-posting), 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: Compilation of shared libraries for macOS

kumowoon1025
Hi,

How do you use a specific library version? Do you have two different
versions of the app? Or are you simply switching different dylibs in usr
local lib?

Regards,
Ted Park
_______________________________________________
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: Compilation of shared libraries for macOS

Aleksid
Ted,

I put dylibs to a local folder in my APP bundle > Frameworks. So I can
switch between different versions of FFmpeg dylibs (my compiled dylibs or
Zeranoe dylibs). Version of FFmpeg is the same 4.3.1 in both cases.

пн, 3 авг. 2020 г. в 00:53, Ted Park <[hidden email]>:

> Hi,
>
> How do you use a specific library version? Do you have two different
> versions of the app? Or are you simply switching different dylibs in usr
> local lib?
>
> Regards,
> Ted Park
> _______________________________________________
> 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".