From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 480B147670 for ; Thu, 18 Jan 2024 13:31:08 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 14EAE68D00E; Thu, 18 Jan 2024 15:31:06 +0200 (EET) Received: from btbn.de (btbn.de [144.76.60.213]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 49CED68CFF2 for ; Thu, 18 Jan 2024 15:31:00 +0200 (EET) Received: from [authenticated] by btbn.de (Postfix) with ESMTPSA id 52F8128A8E308 for ; Thu, 18 Jan 2024 14:30:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rothenpieler.org; s=mail; t=1705584659; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SNKrUhY+m3U+nINJYnVWqNOG8rsCxCU5nZ1YXWGCjHE=; b=PA5DFGi7lG3ltbYJjRZKciIazw7x9sx9Jf/Wjfcl7zm+X4EzcGkL84pHOe7bDHJsiZiXwm PZYA1vq79z254xMWNjlZV9dRNc1+azcpuS+NpeexVz3HNwXcD4z2QOvbD6X/gmXRVReBtb +oyolr6Bn5b94duBt9z7duZBQbp0DQpGPFwJWqhehcH5iB9fqWOpN1kTzvnx0JRGsmZMAS jOOHnqCJeSh0Ri79NP4FYv+pkRJEjKZoSKWXakvRP0SACMuuu0RCeYDaihBTgIYt0xJ9Kq DuMJ4Wpl/D8/HIPFkaRzD9bTHp+eWfC2VuLQg+EpiWP6rflPgTM/+BHIO+IVtA== Message-ID: Date: Thu, 18 Jan 2024 14:31:10 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US, de-DE To: ffmpeg-devel@ffmpeg.org References: From: Timo Rothenpieler In-Reply-To: Subject: Re: [FFmpeg-devel] configure doesn't seem to use pkg-config flags? X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 18/01/2024 04:38, Roger Pack wrote: > Hello. > After compiling libx265 as a "static library" (mingw cross compiling > targeting win64) > > $ pkg-config --libs --static x265 > -L/home/rdp/new/sandbox/win64_static/build_files/lib -lx265 > /usr/lib/gcc/x86_64-w64-mingw32/10-win32/libstdc++.a -lgcc > > I get this failure at configure time: > > ./configure --enable-libx265 --arch=x86_64 --target-os=mingw32 > --cross-prefix=x86_64-w64-mingw32- --pkg-config=pkg-config > --pkg-config-flags=--static > > ERROR: x265 not found using pkg-config > > config.log (sorry it's verbose, first compile passes, second one fails linking) > > ... > require_pkg_config libx265 x265 x265.h x265_api_get > check_pkg_config libx265 x265 x265.h x265_api_get > test_pkg_config libx265 x265 x265.h x265_api_get > pkg-config --exists --print-errors x265 > check_func_headers x265.h x265_api_get > -I/home/rdp/new/sandbox/win64_static/build_files/include > -L/home/rdp/new/sandbox/win64_static/build_files/lib -lx265 > /usr/lib/gcc/x86_64-w64-mingw32/10-win32/libstdc++.a -lgcc > test_ld cc -I/home/rdp/new/sandbox/win64_static/build_files/include > -L/home/rdp/new/sandbox/win64_static/build_files/lib -lx265 > /usr/lib/gcc/x86_64-w64-mingw32/10-win32/libstdc++.a -lgcc > test_cc -I/home/rdp/new/sandbox/win64_static/build_files/include > -L/home/rdp/new/sandbox/win64_static/build_files/lib > /usr/lib/gcc/x86_64-w64-mingw32/10-win32/libstdc++.a > BEGIN /tmp/ffconf.L9GhKESq/test.c > 1 #include > 2 #include > 3 long check_x265_api_get(void) { return (long) x265_api_get; } > 4 int main(void) { int ret = 0; > 5 ret |= ((intptr_t)check_x265_api_get) & 0xFFFF; > 6 return ret; } > END /tmp/ffconf.L9GhKESq/test.c > x86_64-w64-mingw32-gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 > -D_LARGEFILE_SOURCE -U__STRICT_ANSI__ -D__USE_MINGW_ANSI_STDIO=1 > -D__printf__=__gnu_printf__ -D_WIN32_WINNT=0x0600 > -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -std=c11 > -fomit-frame-pointer > -I/home/rdp/new/sandbox/win64_static/build_files/include > -L/home/rdp/new/sandbox/win64_static/build_files/lib > /usr/lib/gcc/x86_64-w64-mingw32/10-win32/libstdc++.a -c -o > /tmp/ffconf.L9GhKESq/test.o /tmp/ffconf.L9GhKESq/test.c > /tmp/ffconf.L9GhKESq/test.c: In function 'check_x265_api_get': > /tmp/ffconf.L9GhKESq/test.c:3:40: warning: cast from pointer to > integer of different size [-Wpointer-to-int-cast] > 3 | long check_x265_api_get(void) { return (long) x265_api_get; } > | ^ > x86_64-w64-mingw32-gcc: warning: > /usr/lib/gcc/x86_64-w64-mingw32/10-win32/libstdc++.a: linker input > file unused because linking not done > x86_64-w64-mingw32-gcc -Wl,--nxcompat,--dynamicbase > -Wl,--high-entropy-va -Wl,--as-needed -Wl,--image-base,0x140000000 > -I/home/rdp/new/sandbox/win64_static/build_files/include > -L/home/rdp/new/sandbox/win64_static/build_files/lib > /usr/lib/gcc/x86_64-w64-mingw32/10-win32/libstdc++.a -o > /tmp/ffconf.L9GhKESq/test.exe /tmp/ffconf.L9GhKESq/test.o -lx265 -lgcc > /usr/bin/x86_64-w64-mingw32-ld: > /home/rdp/new/sandbox/win64_static/build_files/lib/libx265.a(api.cpp.obj):api.cpp:(.text+0xfb5): > undefined reference to `operator new(unsigned long long)' > /usr/bin/x86_64-w64-mingw32-ld: > /home/rdp/new/sandbox/win64_static/build_files/lib/libx265.a(api.cpp.obj):api.cpp:(.text+0x1303): > undefined reference to `operator delete(void*)' > ... > > So it seems to be linking it not using the output of pkg-config --libs > --static for linking or something? It's passing the pkg-config flags just fine. The x265 .pc file is just broken and does not state its dependency on libstdc++. > Workaround is --extra-libs=-lstdc++ but something seems confusing to me here. > Advice welcome. Or if I should file something let me know, thank you :) > > -=roger > _______________________________________________ > 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". _______________________________________________ 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".