From patchwork Sat Mar 23 19:05:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: admin@shaoxia.xyz X-Patchwork-Id: 47382 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:c889:b0:1a3:b6bb:3029 with SMTP id hb9csp361662pzb; Sat, 23 Mar 2024 12:05:49 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVKwNXoBuVLCBL0IKIf7GTc8l9ag8K32W1BN69eTBd34pVKKw0ZHpqIyAnAc1ww9G9uPAIw91HwADk9S6w7KVqRelVh1+wcv76gjQ== X-Google-Smtp-Source: AGHT+IG3j0UhctXEMGe/2DggYV0WfW9Czx1XmP6yHREvnoiFbY6U96lHu1BfBFVBn8n9ha7OHtKY X-Received: by 2002:a17:906:55cc:b0:a46:d789:812d with SMTP id z12-20020a17090655cc00b00a46d789812dmr2143227ejp.52.1711220749128; Sat, 23 Mar 2024 12:05:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711220749; cv=none; d=google.com; s=arc-20160816; b=VZk2XlddZIKBqvN8eUosfZVa7qc4nY96ymM72usgpFL5A0mewPgAi7YTGbpnT2bley C0DdQj7tR4hUxow1XvtjDrP7fiurtnnww78DIEnU1TaTY45M7mZ27Eljt0zUp3f2yjYd 53ezr+76Ad3cmjxM7ZX0eul7zYNswxqVEHEPrKAmsmrMASA4W6grbXYPaY8p8MtxNsnI TKB0BbScMjI0J6SJBYnh++5o2SCd/buhjobGAofLq10lTdRP7Opxcml2FcCul/qsWmUI nbi8LBHrYNvG36BSMLpDJ8kMTffc5Hu3BCJOF7vEBDqTX5AnS/sQmApapUauf17qZhL/ KnQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:message-id:date:to:from :delivered-to; bh=rKtW+2hH+T59vBx8GOBPYEt6v4OQ4blJVEIo1prULyY=; fh=SEnDqZ3WFkndM0SM3t6AsZ2q2agjLAkmaolCUdvVQFI=; b=hjFCbco+5EG2d8g89aoxpNawe52u3Tvnq3/bs5P4TFcLBchNKIegs2at0U98lxS5KB NvCDEAZIEnYp/uZ9603WFCG+z6/Iny3d9z9a70+anSId5goRQMVf4SYDF3lGXQrSf+hI yJt6VVierBuN+j9AIaXAqXawzLAPOYktbX6Qw1XfQ7pjMBq4buRUwjQrYC5/kGjjE9un r6zmDB36IEJ/yVOTDdDNK+RhoW/eK5TdoBcauGQgDq91cueh6FivuXW5nPkb/Eb4RLkh LxHi3mNE5ayq0AGZl2JgxarIUO8ZUFnp/3KtRu4VtxfW+L3SqM3mezup4knFg0PrYbKL 1qJg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id i16-20020a170906a29000b00a461a8f8beesi1018032ejz.978.2024.03.23.12.05.44; Sat, 23 Mar 2024 12:05:49 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 277EB68D495; Sat, 23 Mar 2024 21:05:42 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from out28-61.mail.aliyun.com (out28-61.mail.aliyun.com [115.124.28.61]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E7E3768D15F for ; Sat, 23 Mar 2024 21:05:34 +0200 (EET) X-Alimail-AntiSpam: AC=CONTINUE; BC=0.1743853|-1; CH=green; DM=|CONTINUE|false|; DS=CONTINUE|ham_alarm|0.00416323-7.94226e-05-0.995757; FP=0|0|0|0|0|-1|-1|-1; HT=ay29a033018047198; MF=admin@shaoxia.xyz; NM=1; PH=DS; RN=2; RT=2; SR=0; TI=SMTPD_---.WuYO2p9_1711220729; Received: from localhost.localdomain(mailfrom:admin@shaoxia.xyz fp:SMTPD_---.WuYO2p9_1711220729) by smtp.aliyun-inc.com; Sun, 24 Mar 2024 03:05:30 +0800 From: admin@shaoxia.xyz To: ffmpeg-devel@ffmpeg.org Date: Sun, 24 Mar 2024 03:05:18 +0800 Message-ID: <20240323190518.1031-1-admin@shaoxia.xyz> X-Mailer: git-send-email 2.41.0.windows.3 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] libavformat\file:Fix duplicate JNI symbols 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 Cc: =?utf-8?b?6IGU55uf5bCR5L6g?= Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: WZzDhx//R5R1 From: 联盟少侠 The errors indicate that there are multiple definitions of several JNI (Java Native Interface) symbols in the FFmpeg library. Specifically, the linker ld.lld has found duplicate definitions for the following symbols: - ff_jni_get_env - ff_jni_jstring_to_utf_chars - ff_jni_utf_chars_to_jstring - ff_jni_exception_get_summary - ff_jni_exception_check - ff_jni_init_jfields - ff_jni_reset_jfields These symbols are defined in both libavcodec.a and libavformat.a archives, leading to conflicts during the linking process. The duplicates are found in the same source file ffjni.c, but they are being compiled into two different static libraries. To resolve these errors, ensure that each symbol is defined only once across all linked libraries, or if these symbols are required in both libraries, they should be marked as weak symbols to allow the linker to handle them appropriately. Additionally, check for any build script misconfigurations that may be causing the same file to be included in multiple libraries. --- libavformat/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/file.c b/libavformat/file.c index dd5819c..fa13ae9 100644 --- a/libavformat/file.c +++ b/libavformat/file.c @@ -43,7 +43,7 @@ #if CONFIG_ANDROID_CONTENT_PROTOCOL #include #include "libavcodec/jni.h" -#include "libavcodec/ffjni.c" +#include "libavcodec/ffjni.h" #endif