Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: "Rémi Denis-Courmont" <remi@remlab.net>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH v2 1/2] configure: don't force specific C++ standard library linking
Date: Sat, 09 Sep 2023 16:29:43 +0300
Message-ID: <2343129.ANHujFUA8a@basile.remlab.net> (raw)
In-Reply-To: <20230905232630.2031-1-kasper93@gmail.com>

Le keskiviikkona 6. syyskuuta 2023, 2.26.29 EEST Kacper Michajłow a écrit :
> Other C++ standard libraries exist. Also, this is not a proper way to
> link the standard library anyway. Instead when a C++ dependency is
> detected, switch to the C++ compiler driver to properly link everything.
> 
> Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
> ---
>  configure | 26 ++++++++++++++++++--------
>  1 file changed, 18 insertions(+), 8 deletions(-)
> 
> diff --git a/configure b/configure
> index bd7f7697c8..f3ff48586a 100755
> --- a/configure
> +++ b/configure
> @@ -3584,11 +3584,9 @@ bktr_indev_deps_any="dev_bktr_ioctl_bt848_h
> machine_ioctl_bt848_h dev_video_bktr caca_outdev_deps="libcaca"
>  decklink_deps_any="libdl LoadLibrary"
>  decklink_indev_deps="decklink threads"
> -decklink_indev_extralibs="-lstdc++"
>  decklink_indev_suggest="libzvbi"
>  decklink_outdev_deps="decklink threads"
>  decklink_outdev_suggest="libklvanc"
> -decklink_outdev_extralibs="-lstdc++"
>  dshow_indev_deps="IBaseFilter"
>  dshow_indev_extralibs="-lpsapi -lole32 -lstrmiids -luuid -loleaut32
> -lshlwapi" fbdev_indev_deps="linux_fb_h"
> @@ -4984,6 +4982,18 @@ set_ccvars HOSTCC
>  test -n "$cc_type" && enable $cc_type ||
>      warn "Unknown C compiler $cc, unable to select optimal CFLAGS"
> 
> +cxx_deps=(
> +    decklink
> +    libglslang
> +    libgme
> +    libopenmpt
> +    librubberband
> +    libsnappy
> +)

Hard-coding "-lstdc++" is admittedly a brittle kludge. On some systems, the
C++ runtime has a different name for one.

But hard-coding the set of library that would require the C++ linker is just 
as much of a hack. I would argue it's even more of a kludge. If a certain 
runtime (C++ or other) is necessary for a library then it should be in 
Libs.static in the pkg-config manifest. From there, FFmpeg should pick it up if 
and *only* if the libarry is linked statically.

Indeed, there are no reasons to even force C++ linking to use a C++ *shared* 
library exposing a pure C interface. Thus, I don't think that forcing the C++ 
linker is correct.

(Also I more or less agree with Timo here.)

-- 
レミ・デニ-クールモン
http://www.remlab.net/



_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

      parent reply	other threads:[~2023-09-09 13:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-05 23:26 Kacper Michajłow
2023-09-06 10:15 ` Timo Rothenpieler
2023-09-06 16:54   ` Kacper Michajlow
2023-09-06 17:09     ` Timo Rothenpieler
2023-09-06 17:31       ` Kacper Michajlow
2023-09-07 13:12         ` Derek Buitenhuis
2023-09-07 21:38           ` Kacper Michajlow
2023-09-07 22:10             ` Kieran Kunhya
2023-09-08 18:41               ` Kacper Michajlow
2023-09-08 18:46                 ` Kieran Kunhya
2023-09-08 18:59                   ` Kacper Michajlow
2023-09-07 23:34             ` Timo Rothenpieler via ffmpeg-devel
2023-09-08 18:55               ` Kacper Michajlow
2023-09-08 18:58                 ` Timo Rothenpieler
2023-09-09 13:29 ` Rémi Denis-Courmont [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2343129.ANHujFUA8a@basile.remlab.net \
    --to=remi@remlab.net \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git