From patchwork Fri Dec 27 17:42:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3763 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 96CE440CF8 for ; Fri, 27 Dec 2024 18:42:52 +0100 (CET) Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-5d3fe991854sf8354372a12.0 for ; Fri, 27 Dec 2024 09:42:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1735321372; cv=pass; d=google.com; s=arc-20240605; b=caxSX/uxxRdYW0TzwbJqc8MLf0lzV/20KccZGfRm//lhh+KL1GoWfPLaTglX8IFBDC Ktl+wI/9zKjnN8DanbSyH9mi6hvNzSbVRYgYsl1si2vJR7eNsHQiQ/grz3p//GEEuf+U OPKvZOdn3vwca6Dh+FhOaP7WUHTFQfY08HlMH3AO8QelbxhKDxRO54icP2fXTEGy60KI /VdDArCBr00HpTWjJzlC4hrTldWUKFJsJZhFH8E64sOZ70EVOIu1Azbjgc/YeMQO2GAq 48Gh6iE0YPzuA0puGGKCwAmRr1SYNQTpElV/G/7FKF7wn3BVXOb1OsgageCN9hTBJNuR gi0A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=TeDapRa4WpQj/P7cfdXbvj+6nuNqjEwwsQX6aF/3cvg=; fh=0uL03c/5HKPeWdXnLyl8Z6pEE20nr9ZgF71irgfD4mo=; b=TX0Dxt7GD+cDntZq0kTXApfXYVFYzowiBzBvLwTM8G6/ud8nv0e79wXaICzcCLxG1P vU0aUmWJYqpTT0xf9IvHvf8/GAnOjkSqBguWjKyNVW1+w2lG8wa8fpJKgUDJQm9qQKp/ 2v2W9gSHlSDYlo+9EBHPx5FQFV0XUlvGv6aK90LqK4A+TlJ0JFBGO3qFEn0SGBCpv686 tW0tKL5mTBtYgUWxxa52sL91DXOWpgHVQaWtfW/VsMpiHaT8y0k/kMyZdOgEzD7Vu7E3 QTTroIaXcK57DmM/zE7WpoA1fbtHrNE8D/54TYiGluENhkmb971gCG0YHBpZJw/7OAGy I4lw==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Poz58qZt; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1735321372; x=1735926172; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:content-transfer-encoding:mime-version:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=TeDapRa4WpQj/P7cfdXbvj+6nuNqjEwwsQX6aF/3cvg=; b=PBTs88MLmS3zHjKTp+MkocLWHFvhXrEXr9F8AqHGW/DZyIbZCvGpeck8iaVxhNC0eP MoPNpv2hrMTlnPrQUF2e+8u3PJbDXGaPLP0ElSVzXYvr0lLKKMP+zgjCLx31U2YaQf5a 2ZZuMsEzvxNuaOcAxjnM6i9rcd6cTOhWJm2dA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735321372; x=1735926172; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-beenthere:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=TeDapRa4WpQj/P7cfdXbvj+6nuNqjEwwsQX6aF/3cvg=; b=XkN4anMGtni1n0Hrrv37DFB4ld9wzOK8XAjiQM5kaEFHPjlT8l+JYL70vWiBEhZQP2 exJLx5fBkamhxgTD8Px5hR5mq8ukqe7G33WkktMeiCOMprejAjHxy8Fc7o0p22+M9wcj Dg8WuGsQNJaQBz4ysWyJ1dNFRekpdNWIzlALViD1a/M7laInyOyLx+FRVEhIN8usGToO I1fF4U7rM8yShIlsCTCSPla4+ozeBVEF33KpwFPUjOCVyvZvYg6i2/ukk5VzWgXqtUnC pc4du+aQFnzWc2prgVbDVZSqd+y7teW41KpzP4L3m4Jc+ySAxLMKYxAt+mqdeFjTCj6d ZkXA== X-Forwarded-Encrypted: i=2; AJvYcCV7VmLbGKBC/bOrJj1M7gm49/hUbA/N6vY9qhVs79V7xkzGUwu/YygOURL/O+oyigE5wIqZnqzugzQYELxf@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YwbzSTbQenF3LW0wlCbl5W1Ul3Gq0foVwljQVQs5GxJ0LltL3uh LhUp9Co0+SAo3LSMGKmHVc3Fu5pmX3jU27COx9rzqLTR6vx5536q1swj4wgfzCr62A== X-Google-Smtp-Source: AGHT+IHGXNxAAa9f+OXL8ZUCFKu7a8KKPZzgibv2MTj2+M3QMqSr3BkJGAZr6N2e8ZlpvHn4U+yWOA== X-Received: by 2002:a05:6402:40d4:b0:5d0:b4ea:9743 with SMTP id 4fb4d7f45d1cf-5d81dd9a85amr24721270a12.8.1735321372036; Fri, 27 Dec 2024 09:42:52 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a50:c04b:0:b0:5d3:ea2f:696f with SMTP id 4fb4d7f45d1cf-5d8a270555cls410713a12.0.-pod-prod-01-eu; Fri, 27 Dec 2024 09:42:50 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWf5M/bfoXInz3L3JuV33fcnNMMLnhYrxk5RgM/66Eey0ZvffcNuq/uSbOZgLe8AVKGIoc2axP3NHDOb3l8@amarulasolutions.com X-Received: by 2002:a17:906:dc89:b0:aa6:af4b:7c89 with SMTP id a640c23a62f3a-aac3446dd7cmr2268285166b.61.1735321370119; Fri, 27 Dec 2024 09:42:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1735321370; cv=none; d=google.com; s=arc-20240605; b=NNor+txUSMXdU7a0DeZCFyKxE+O2Gy6fU1d0rS87+ZR5B1ZCMlwgDRBPIC7A3r4EFH fR46zcHb3xvCoIfWIfUSqKBquHim7Dx/Ch109aBesMrm4WpPS6l2/2aJvZurwFebgHDJ ZaZ1I6UI3c2oVjr0ijufDhjOAdoDY2xk66XKRLUuR6YLFAbzZA13jJmkLF3Lxbcswvjz PpPd4Tnp4uzKK2mKYxgbJMjppOexv4Y3JH8wit/dHbacK2P0K4MDiJXGkuTYRK7VV60d RFiMi1a8KVJ3v2dKxCNaNd2/w4f4cEGxCoWPL1acu5Gd84V8wYkEe0q9EJZQdQ2choIv +kag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=BwxUjRoyJ4R0c7VOqBf84KQguF9XWHir/Ghs2m9SmzM=; fh=8OOQBXUzdeP1UccJA13unkxGiTe27BM1OWJAs9qNVX4=; b=ih/njL5mVZXolYoAvs2a77YXSlyD6CL/i5/uhom7xR6uA84seE4/D6FiOj2aZSgrCy AlRJIhUV7H2R0R98hOCKyOaeW9iJcgu+gm1C87zNlbsKE+JPZPuUO6M5G+1Gz1czFFnC irSlomVHVm4eZq/TbkuE4/N5JlDQqkPanmSYxNkdrFqG90vfjcO8I2xNgWYmlNgoaGGM OKb/mVQr0mvYur87qQ8b0Bg2K3evAx7R1PXEdgG9vjxKlhdeQU/4GBH89OmOTyeHw7iU ECX5Y6DQ3rtssify1o53KvjJosp8TY1IhlqupALvW4M4xaN1sOSg2atsdfA4r5STyDyk iA9A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Poz58qZt; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id a640c23a62f3a-aac0efe49aasor664294966b.17.2024.12.27.09.42.50 for (Google Transport Security); Fri, 27 Dec 2024 09:42:50 -0800 (PST) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Forwarded-Encrypted: i=1; AJvYcCULut+fFzLMy/tWAcCMdHH3zkTgFeQO8KIeQm8E5iIsRAE06M4/oCTVosARh105iyIJ0SDrsXn0P9bLiZR2@amarulasolutions.com X-Gm-Gg: ASbGncvx3X/fhMus1By6yEhFQU0c/cVezVhuQSxmR+LtT3T5KnxYRLA0TW/uReT4LxH ikAYsIr8zugPaara9+LR+UT76IaNTFJ69QqR2nRWu83Ip2hyBi/Q/XyDPuRplNUqRKpWtPwPsnn vh2l1Y1CikRTv0e7oCo+3cj9l371C90Podhx0dpRDnw5Fnm3JhLR1Cv+0SEiKFKJFo+m4iaKvSs BRVGTucxbG0r7lfOEKD2BgBW1vVgvJmfNJa9m9xS6NCCM9fFCiwFdz+3Z6mYYBoQ70KfMOzvIB/ ucTEc+/xVL785+4Cr2Oh5A== X-Received: by 2002:a17:907:6d01:b0:aaf:1183:e9be with SMTP id a640c23a62f3a-aaf1183ea03mr884827266b.2.1735321369616; Fri, 27 Dec 2024 09:42:49 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.. ([2.196.43.175]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aae984dba62sm919934466b.7.2024.12.27.09.42.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Dec 2024 09:42:49 -0800 (PST) From: Dario Binacchi To: buildroot@buildroot.org Cc: Pierre-Jean Texier , linux-amarula@amarulasolutions.com, Dario Binacchi Subject: [PATCH v3 1/1] package/libxml2: fix compilation with uclibc Date: Fri, 27 Dec 2024 18:42:46 +0100 Message-ID: <20241227174246.3905068-1-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Poz58qZt; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The patch fixes the following errors and warnings raised by the compilation of the library with uClibc: encoding.c: In function ‘xmlEncInputChunk’: encoding.c:2209:32: warning: comparison between pointer and integer 2209 | else if (handler->iconv_in != NULL) { | ^~ encoding.c: In function ‘xmlEncOutputChunk’: encoding.c:2269:33: warning: comparison between pointer and integer 2269 | else if (handler->iconv_out != NULL) { | ^~ encoding.c: In function ‘xmlCharEncCloseFunc’: encoding.c:2681:29: warning: comparison between pointer and integer 2681 | if ((handler->iconv_out != NULL) || (handler->iconv_in != NULL)) { | ^~ encoding.c:2681:60: warning: comparison between pointer and integer 2681 | if ((handler->iconv_out != NULL) || (handler->iconv_in != NULL)) { | ^~ encoding.c:2683:32: warning: comparison between pointer and integer 2683 | if (handler->iconv_out != NULL) { | ^~ encoding.c:2686:32: error: assignment to ‘iconv_t’ {aka ‘long int’} from ‘void *’ makes integer from pointer without a cast [-Wint-conversion] 2686 | handler->iconv_out = NULL; | ^ encoding.c:2688:31: warning: comparison between pointer and integer 2688 | if (handler->iconv_in != NULL) { | ^~ encoding.c:2691:31: error: assignment to ‘iconv_t’ {aka ‘long int’} from ‘void *’ makes integer from pointer without a cast [-Wint-conversion] 2691 | handler->iconv_in = NULL; | ^ make[4]: *** [Makefile:1147: libxml2_la-encoding.lo] Error 1 The regression was partially introduced in version 2.1.0: 496a1cf59284 ("496a1cf59284 revamped the encoding support, added iconv support, so now libxml if") and partially in version 2.2.3: 87b953957305 ("Large sync between my W3C base and Gnome's one:") So the regression was already present in the first version of libxml2 (2.6.29) in Buildroot. Signed-off-by: Dario Binacchi --- Changes v2 -> v3: - Update the commit message adding info about the version introduced the regression. Changes v1 -> v2: - Update the patch to the merged .../0001-Fix-compilation-with-uclibc.patch | 114 ++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 package/libxml2/0001-Fix-compilation-with-uclibc.patch diff --git a/package/libxml2/0001-Fix-compilation-with-uclibc.patch b/package/libxml2/0001-Fix-compilation-with-uclibc.patch new file mode 100644 index 000000000000..857f6ca2a2a1 --- /dev/null +++ b/package/libxml2/0001-Fix-compilation-with-uclibc.patch @@ -0,0 +1,114 @@ +From fc72e0833a4e5724aef604e2fd9adb1014cb4844 Mon Sep 17 00:00:00 2001 +From: Dario Binacchi +Date: Mon, 16 Dec 2024 17:23:23 +0100 +Subject: [PATCH] Fix compilation with uclibc +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The patch fixes the following errors and warnings raised by the +compilation of the library with uClibc: + +encoding.c: In function ‘xmlEncInputChunk’: +encoding.c:2209:32: warning: comparison between pointer and integer + 2209 | else if (handler->iconv_in != NULL) { + | ^~ +encoding.c: In function ‘xmlEncOutputChunk’: +encoding.c:2269:33: warning: comparison between pointer and integer + 2269 | else if (handler->iconv_out != NULL) { + | ^~ +encoding.c: In function ‘xmlCharEncCloseFunc’: +encoding.c:2681:29: warning: comparison between pointer and integer + 2681 | if ((handler->iconv_out != NULL) || (handler->iconv_in != NULL)) { + | ^~ +encoding.c:2681:60: warning: comparison between pointer and integer + 2681 | if ((handler->iconv_out != NULL) || (handler->iconv_in != NULL)) { + | ^~ +encoding.c:2683:32: warning: comparison between pointer and integer + 2683 | if (handler->iconv_out != NULL) { + | ^~ +encoding.c:2686:32: error: assignment to ‘iconv_t’ {aka ‘long int’} from ‘void *’ makes integer from pointer without a cast [-Wint-conversion] + 2686 | handler->iconv_out = NULL; + | ^ +encoding.c:2688:31: warning: comparison between pointer and integer + 2688 | if (handler->iconv_in != NULL) { + | ^~ +encoding.c:2691:31: error: assignment to ‘iconv_t’ {aka ‘long int’} from ‘void *’ makes integer from pointer without a cast [-Wint-conversion] + 2691 | handler->iconv_in = NULL; + | ^ +make[4]: *** [Makefile:1147: libxml2_la-encoding.lo] Error 1 + +Signed-off-by: Dario Binacchi +Upstream: https://gitlab.gnome.org/GNOME/libxml2/-/merge_requests/292 +--- + encoding.c | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) + +diff --git a/encoding.c b/encoding.c +index 14ffafddbc02..41ecde1885e4 100644 +--- a/encoding.c ++++ b/encoding.c +@@ -1264,7 +1264,7 @@ DECLARE_ISO_FUNCS(16) + #endif /* LIBXML_ISO8859X_ENABLED */ + + #ifdef LIBXML_ICONV_ENABLED +- #define EMPTY_ICONV , (iconv_t) 0, (iconv_t) 0 ++ #define EMPTY_ICONV , (iconv_t) -1, (iconv_t) -1 + #else + #define EMPTY_ICONV + #endif +@@ -1389,8 +1389,8 @@ xmlNewCharEncodingHandler(const char *name, + handler->name = up; + + #ifdef LIBXML_ICONV_ENABLED +- handler->iconv_in = NULL; +- handler->iconv_out = NULL; ++ handler->iconv_in = (iconv_t) -1; ++ handler->iconv_out = (iconv_t) -1; + #endif + #ifdef LIBXML_ICU_ENABLED + handler->uconv_in = NULL; +@@ -2200,7 +2200,7 @@ xmlEncInputChunk(xmlCharEncodingHandler *handler, unsigned char *out, + } + } + #ifdef LIBXML_ICONV_ENABLED +- else if (handler->iconv_in != NULL) { ++ else if (handler->iconv_in != (iconv_t) -1) { + ret = xmlIconvWrapper(handler->iconv_in, out, outlen, in, inlen); + } + #endif /* LIBXML_ICONV_ENABLED */ +@@ -2260,7 +2260,7 @@ xmlEncOutputChunk(xmlCharEncodingHandler *handler, unsigned char *out, + } + } + #ifdef LIBXML_ICONV_ENABLED +- else if (handler->iconv_out != NULL) { ++ else if (handler->iconv_out != (iconv_t) -1) { + ret = xmlIconvWrapper(handler->iconv_out, out, outlen, in, inlen); + } + #endif /* LIBXML_ICONV_ENABLED */ +@@ -2672,17 +2672,17 @@ xmlCharEncCloseFunc(xmlCharEncodingHandler *handler) { + * Iconv handlers can be used only once, free the whole block. + * and the associated icon resources. + */ +- if ((handler->iconv_out != NULL) || (handler->iconv_in != NULL)) { ++ if ((handler->iconv_out != (iconv_t) -1) || (handler->iconv_in != (iconv_t) -1)) { + tofree = 1; +- if (handler->iconv_out != NULL) { ++ if (handler->iconv_out != (iconv_t) -1) { + if (iconv_close(handler->iconv_out)) + ret = -1; +- handler->iconv_out = NULL; ++ handler->iconv_out = (iconv_t) -1; + } +- if (handler->iconv_in != NULL) { ++ if (handler->iconv_in != (iconv_t) -1) { + if (iconv_close(handler->iconv_in)) + ret = -1; +- handler->iconv_in = NULL; ++ handler->iconv_in = (iconv_t) -1; + } + } + #endif /* LIBXML_ICONV_ENABLED */ +-- +2.43.0 +