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 A729C4651D for ; Thu, 18 Jan 2024 03:39:05 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3976A68D060; Thu, 18 Jan 2024 05:39:02 +0200 (EET) Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id EBA2868CD09 for ; Thu, 18 Jan 2024 05:38:55 +0200 (EET) Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-a2a17f3217aso1288914666b.2 for ; Wed, 17 Jan 2024 19:38:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705549134; x=1706153934; darn=ffmpeg.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=AXocJn4SFMBmXkSsRg33Sa5b2ZIOMtim+4FzJ7XLUF0=; b=k9aR8I1MgcdhnzGTWakoCfEtcaGAdd1ULRRwXAVYBcDmyE0sYpxjgpVlsy8tvC+e2Q jyJaw0Tv7iOn4I29Y1VRj4g1n2N8Reb6QpsbfLbrqveRyddLNuV+iDZhZn1S7P3cUzZ5 QX9PG893WLVxpKRkKkj0x9FJZuSS1y2YbZpqhBtZ9vtYJqhwcDupFuL/3i+lRn4lC9h4 UQ+rcApd4XLm3qG/g0JpqgIpjwe62LN6Xssk9KvuGNfOTMlU7IjV7jbjoVRedr/Lmdh3 EcALghS0m9abWWrqG/uBIUeZRZbEVf1JsL0lKN4IPM+NYBA+ljBQkdtk3xpzc5u9n99d lxPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705549134; x=1706153934; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=AXocJn4SFMBmXkSsRg33Sa5b2ZIOMtim+4FzJ7XLUF0=; b=WCw5EhshIIHMSMgovURz2kdFLn2ARwasF3ykAVFjflfy3qF0fy5ySi4wzcdmBX3wro pkkETn9N4TT5hhO/fe8r2wCEGx8+l2J+vsf5M3oQwT/9l6JG26E1xmnrDla/gFWHN/6h CfaOU0IAi/TfjWEbhZWGbFQUOw02Vw8C2cBOTzO5mzyoJT+hBWHgWCBcT3AouJpj4+2s pmfq4qrv4qH4k4kncn/qWx5NesWJWAZUsBO3OM0B4dSQY1NTiV0O5LOP9TMAKMw7a/Ve DOAlEuYZQJ7tbaePDd3yAh/LHiazqQnjOUum3mIuM2FbKt6dVgoGg0q65RAkHet1D87H LC1A== X-Gm-Message-State: AOJu0Yx0DVPKF2lTze0XC1+d49LoZQNNrKDh/Uq2VlZo1BTCjDIANXz+ ZdvjAxhFMZXWgB2JEQUpLuV7BtSqQ1yFBsax4VLE/OTG70npy3vomGlSXLUHza+af5rhJmP5v31 Sv2SV2Z3/7pga1VIaGqkKXtdY5OKkzdLEdKW+EdXF X-Google-Smtp-Source: AGHT+IHIJySF7MDsx0Qx4e4GmNKrP/5BS6sOZe52K2PPzzMtWOl/7vL+Y7HJV+5rnxjwJG+TRufh20dFLuO2mBh27gs= X-Received: by 2002:a17:906:4748:b0:a2d:9de0:4e4 with SMTP id j8-20020a170906474800b00a2d9de004e4mr105115ejs.70.1705549134506; Wed, 17 Jan 2024 19:38:54 -0800 (PST) MIME-Version: 1.0 From: Roger Pack Date: Wed, 17 Jan 2024 20:38:42 -0700 Message-ID: To: FFmpeg development discussions and patches Subject: [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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: 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? 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".