* [FFmpeg-devel] [PATCH 1/2] configure: don't force specific C++ standard library linking
@ 2023-09-05 22:14 Kacper Michajłow
2023-09-05 22:14 ` [FFmpeg-devel] [PATCH 2/2] configure: add libplacebo to the list of C++ dependencies Kacper Michajłow
2023-09-05 22:17 ` [FFmpeg-devel] [PATCH 1/2] configure: don't force specific C++ standard library linking Hendrik Leppkes
0 siblings, 2 replies; 4+ messages in thread
From: Kacper Michajłow @ 2023-09-05 22:14 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Kacper Michajłow
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 | 27 ++++++++++++++++++---------
1 file changed, 18 insertions(+), 9 deletions(-)
diff --git a/configure b/configure
index bd7f7697c8..90ee6e4f7d 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"
@@ -4684,7 +4682,6 @@ msvc_common_flags(){
-march=*) ;;
-lz) echo zlib.lib ;;
-lx264) echo libx264.lib ;;
- -lstdc++) ;;
-l*) echo ${flag#-l}.lib ;;
-LARGEADDRESSAWARE) echo $flag ;;
-L*) echo -libpath:${flag#-L} ;;
@@ -4984,6 +4981,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
+)
+for l in ${cxx_deps[@]}; do
+ enabled $l && ld_default=$cxx
+done
+
: ${as_default:=$cc}
: ${objcc_default:=$cc}
: ${dep_cc_default:=$cc}
@@ -6706,12 +6715,12 @@ enabled libfribidi && require_pkg_config libfribidi fribidi fribidi.h fri
enabled libharfbuzz && require_pkg_config libharfbuzz harfbuzz hb.h hb_buffer_create
enabled libglslang && { check_lib spirv_compiler glslang/Include/glslang_c_interface.h glslang_initialize_process \
-lglslang -lMachineIndependent -lOSDependent -lHLSL -lOGLCompiler -lGenericCodeGen \
- -lSPVRemapper -lSPIRV -lSPIRV-Tools-opt -lSPIRV-Tools -lpthread -lstdc++ -lm ||
+ -lSPVRemapper -lSPIRV -lSPIRV-Tools-opt -lSPIRV-Tools -lpthread -lm ||
require spirv_compiler glslang/Include/glslang_c_interface.h glslang_initialize_process \
-lglslang -lOSDependent -lHLSL -lOGLCompiler \
- -lSPVRemapper -lSPIRV -lSPIRV-Tools-opt -lSPIRV-Tools -lpthread -lstdc++ -lm; }
+ -lSPVRemapper -lSPIRV -lSPIRV-Tools-opt -lSPIRV-Tools -lpthread -lm; }
enabled libgme && { check_pkg_config libgme libgme gme/gme.h gme_new_emu ||
- require libgme gme/gme.h gme_new_emu -lgme -lstdc++; }
+ require libgme gme/gme.h gme_new_emu -lgme; }
enabled libgsm && { for gsm_hdr in "gsm.h" "gsm/gsm.h"; do
check_lib libgsm "${gsm_hdr}" gsm_create -lgsm && break;
done || die "ERROR: libgsm not found"; }
@@ -6770,7 +6779,7 @@ enabled libopencv && { check_headers opencv2/core/core_c.h &&
enabled libopenh264 && require_pkg_config libopenh264 openh264 wels/codec_api.h WelsGetCodecVersion
enabled libopenjpeg && { check_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version ||
{ require_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } }
-enabled libopenmpt && require_pkg_config libopenmpt "libopenmpt >= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create -lstdc++ && append libopenmpt_extralibs "-lstdc++"
+enabled libopenmpt && require_pkg_config libopenmpt "libopenmpt >= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create
enabled libopenvino && { { check_pkg_config libopenvino openvino openvino/c/openvino.h ov_core_create && enable openvino2; } ||
{ check_pkg_config libopenvino openvino c_api/ie_c_api.h ie_c_api_version ||
require libopenvino c_api/ie_c_api.h ie_c_api_version -linference_engine_c_api; } }
@@ -6789,12 +6798,12 @@ enabled librav1e && require_pkg_config librav1e "rav1e >= 0.5.0" rav1e.
enabled librist && require_pkg_config librist "librist >= 0.2.7" librist/librist.h rist_receiver_create
enabled librsvg && require_pkg_config librsvg librsvg-2.0 librsvg-2.0/librsvg/rsvg.h rsvg_handle_render_cairo
enabled librtmp && require_pkg_config librtmp librtmp librtmp/rtmp.h RTMP_Socket
-enabled librubberband && require_pkg_config librubberband "rubberband >= 1.8.1" rubberband/rubberband-c.h rubberband_new -lstdc++ && append librubberband_extralibs "-lstdc++"
+enabled librubberband && require_pkg_config librubberband "rubberband >= 1.8.1" rubberband/rubberband-c.h rubberband_new
enabled libshaderc && require_pkg_config spirv_compiler "shaderc >= 2019.1" shaderc/shaderc.h shaderc_compiler_initialize
enabled libshine && require_pkg_config libshine shine shine/layer3.h shine_encode_buffer
enabled libsmbclient && { check_pkg_config libsmbclient smbclient libsmbclient.h smbc_init ||
require libsmbclient libsmbclient.h smbc_init -lsmbclient; }
-enabled libsnappy && require libsnappy snappy-c.h snappy_compress -lsnappy -lstdc++
+enabled libsnappy && require libsnappy snappy-c.h snappy_compress -lsnappy
enabled libsoxr && require libsoxr soxr.h soxr_create -lsoxr
enabled libssh && require_pkg_config libssh libssh libssh/sftp.h sftp_init
enabled libspeex && require_pkg_config libspeex speex speex/speex.h speex_decoder_init
--
2.34.1
_______________________________________________
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".
^ permalink raw reply [flat|nested] 4+ messages in thread
* [FFmpeg-devel] [PATCH 2/2] configure: add libplacebo to the list of C++ dependencies
2023-09-05 22:14 [FFmpeg-devel] [PATCH 1/2] configure: don't force specific C++ standard library linking Kacper Michajłow
@ 2023-09-05 22:14 ` Kacper Michajłow
2023-09-05 22:17 ` [FFmpeg-devel] [PATCH 1/2] configure: don't force specific C++ standard library linking Hendrik Leppkes
1 sibling, 0 replies; 4+ messages in thread
From: Kacper Michajłow @ 2023-09-05 22:14 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Kacper Michajłow
If libplacebo is statically linked with glslang it requires C++ standard
library. Also recently more C++ code has been added to libplacebo.
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
---
configure | 1 +
1 file changed, 1 insertion(+)
diff --git a/configure b/configure
index 90ee6e4f7d..ed714639d1 100755
--- a/configure
+++ b/configure
@@ -4986,6 +4986,7 @@ cxx_deps=(
libglslang
libgme
libopenmpt
+ libplacebo
librubberband
libsnappy
)
--
2.34.1
_______________________________________________
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".
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/2] configure: don't force specific C++ standard library linking
2023-09-05 22:14 [FFmpeg-devel] [PATCH 1/2] configure: don't force specific C++ standard library linking Kacper Michajłow
2023-09-05 22:14 ` [FFmpeg-devel] [PATCH 2/2] configure: add libplacebo to the list of C++ dependencies Kacper Michajłow
@ 2023-09-05 22:17 ` Hendrik Leppkes
2023-09-05 23:32 ` Kacper Michajlow
1 sibling, 1 reply; 4+ messages in thread
From: Hendrik Leppkes @ 2023-09-05 22:17 UTC (permalink / raw)
To: FFmpeg development discussions and patches
On Wed, Sep 6, 2023 at 12:14 AM Kacper Michajłow <kasper93@gmail.com> wrote:
>
> 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 | 27 ++++++++++++++++++---------
> 1 file changed, 18 insertions(+), 9 deletions(-)
>
> diff --git a/configure b/configure
> index bd7f7697c8..90ee6e4f7d 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"
> @@ -4684,7 +4682,6 @@ msvc_common_flags(){
> -march=*) ;;
> -lz) echo zlib.lib ;;
> -lx264) echo libx264.lib ;;
> - -lstdc++) ;;
> -l*) echo ${flag#-l}.lib ;;
> -LARGEADDRESSAWARE) echo $flag ;;
> -L*) echo -libpath:${flag#-L} ;;
Should probably keep this one, it may come from a pkg-config file or
some other source, and you don't want it forwarded to cl.exe
- Hendrik
_______________________________________________
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".
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/2] configure: don't force specific C++ standard library linking
2023-09-05 22:17 ` [FFmpeg-devel] [PATCH 1/2] configure: don't force specific C++ standard library linking Hendrik Leppkes
@ 2023-09-05 23:32 ` Kacper Michajlow
0 siblings, 0 replies; 4+ messages in thread
From: Kacper Michajlow @ 2023-09-05 23:32 UTC (permalink / raw)
To: FFmpeg development discussions and patches
On Wed, 6 Sept 2023 at 00:17, Hendrik Leppkes <h.leppkes@gmail.com> wrote:
>
> On Wed, Sep 6, 2023 at 12:14 AM Kacper Michajłow <kasper93@gmail.com> wrote:
> >
> > 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 | 27 ++++++++++++++++++---------
> > 1 file changed, 18 insertions(+), 9 deletions(-)
> >
> > diff --git a/configure b/configure
> > index bd7f7697c8..90ee6e4f7d 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"
> > @@ -4684,7 +4682,6 @@ msvc_common_flags(){
> > -march=*) ;;
> > -lz) echo zlib.lib ;;
> > -lx264) echo libx264.lib ;;
> > - -lstdc++) ;;
> > -l*) echo ${flag#-l}.lib ;;
> > -LARGEADDRESSAWARE) echo $flag ;;
> > -L*) echo -libpath:${flag#-L} ;;
>
> Should probably keep this one, it may come from a pkg-config file or
> some other source, and you don't want it forwarded to cl.exe
>
> - Hendrik
Fair point. Doesn't harm to keep it I guess. Although on Windows a lot
of unsupported things may come from .pc files. In general pkg-config
on Windows is tricky.
I've sent a new version of the patch.
- Kacper
_______________________________________________
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".
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-09-05 23:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-05 22:14 [FFmpeg-devel] [PATCH 1/2] configure: don't force specific C++ standard library linking Kacper Michajłow
2023-09-05 22:14 ` [FFmpeg-devel] [PATCH 2/2] configure: add libplacebo to the list of C++ dependencies Kacper Michajłow
2023-09-05 22:17 ` [FFmpeg-devel] [PATCH 1/2] configure: don't force specific C++ standard library linking Hendrik Leppkes
2023-09-05 23:32 ` Kacper Michajlow
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