Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
apache2 useflag xml2enc proxy_html cannot compile
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
honeymak
Guru
Guru


Joined: 30 Dec 2002
Posts: 537

PostPosted: Wed Jan 31, 2024 2:32 am    Post subject: apache2 useflag xml2enc proxy_html cannot compile Reply with quote

i could compile apache before
but suddenly it raise xmlChar * error - undefined

i don't know why

posted build.log here
https://98036119lmak.ftp.sh/apache-build.log

:oops:
_________________
hackers - make sth real
academics - read sth said to be real
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1669

PostPosted: Wed Jan 31, 2024 4:52 pm    Post subject: Reply with quote

My guess
www-servers/apache-2.4.58
either
Requires not greater than dev-libs/libxml2-2.11.6

Or

Needs a small patch to modules/filters/mod_xml2enc.c
around line 212 there is a line:

Code:
ctx->xml2enc = xmlDetectCharEncoding((const xmlChar*)ctx->buf,

that should be changed to
Code:
ctx->xml2enc = xmlDetectCharEncoding((const unsigned char*)ctx->buf,

_________________
Donate to Gentoo
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1669

PostPosted: Wed Jan 31, 2024 5:35 pm    Post subject: Reply with quote

Easist way to try is to make a user patch:
Code:

mkdir /etc/portage/patches/www-servers/apache-2.4.58/


Then add this file to that directory as mod_xml2enc.c.patch
Code:

--- httpd-2.4.58/modules/filters/mod_xml2enc.c  2020-02-20 16:33:40.000000000 -0800
+++ /tmp/mod_xml2enc.c  2024-01-31 09:09:03.347845942 -0800
@@ -209,7 +209,7 @@
   
     /* to sniff, first we look for BOM */
     if (ctx->xml2enc == XML_CHAR_ENCODING_NONE) {
-        ctx->xml2enc = xmlDetectCharEncoding((const xmlChar*)ctx->buf,
+        ctx->xml2enc = xmlDetectCharEncoding((const unsigned char*)ctx->buf,
                                              ctx->bytes);
         if (HAVE_ENCODING(ctx->xml2enc)) {
             ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(01432)


When you emerge again you should see a message like:
Quote:
* Applying user patches from /etc/portage/patches ...
* Applying mod_xml2enc.c.patch ... [ ok ]
* User patches applied.

_________________
Donate to Gentoo
Back to top
View user's profile Send private message
honeymak
Guru
Guru


Joined: 30 Dec 2002
Posts: 537

PostPosted: Sat Feb 03, 2024 1:40 pm    Post subject: Reply with quote

turtles wrote:
Easist way to try is to make a user patch:
Code:

mkdir /etc/portage/patches/www-servers/apache-2.4.58/


Then add this file to that directory as mod_xml2enc.c.patch
Code:

--- httpd-2.4.58/modules/filters/mod_xml2enc.c  2020-02-20 16:33:40.000000000 -0800
+++ /tmp/mod_xml2enc.c  2024-01-31 09:09:03.347845942 -0800
@@ -209,7 +209,7 @@
   
     /* to sniff, first we look for BOM */
     if (ctx->xml2enc == XML_CHAR_ENCODING_NONE) {
-        ctx->xml2enc = xmlDetectCharEncoding((const xmlChar*)ctx->buf,
+        ctx->xml2enc = xmlDetectCharEncoding((const unsigned char*)ctx->buf,
                                              ctx->bytes);
         if (HAVE_ENCODING(ctx->xml2enc)) {
             ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(01432)


When you emerge again you should see a message like:
Quote:
* Applying user patches from /etc/portage/patches ...
* Applying mod_xml2enc.c.patch ... [ ok ]
* User patches applied.


will this lead to security problem?
btw, i was able to compile this version of apache several days before
just suddenly it appears to be like this....what i did was "emerge -Deu world"
then it breaks in the middle when apache is re-emerge
_________________
hackers - make sth real
academics - read sth said to be real
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1669

PostPosted: Sat Feb 03, 2024 8:50 pm    Post subject: Reply with quote

honeymak wrote:

will this lead to security problem?

No it is a backport of a recent fix:
https://lists.apache.org/thread/3wlp34pdbno3kgssn9m9c9qw96df28n3
_________________
Donate to Gentoo
Back to top
View user's profile Send private message
honeymak
Guru
Guru


Joined: 30 Dec 2002
Posts: 537

PostPosted: Sat Feb 10, 2024 2:47 am    Post subject: Reply with quote

Code:
[ebuild     U  ] dev-libs/libxml2-2.12.5:2::gentoo [2.12.4:2::gentoo] USE="ftp icu python readline -debug -examples -lzma -static-libs -test" ABI_X86="(64) -32 (-x32)" PYTHON_TARGETS="python3_11 -python3_10 (-python3_12)" 2582 KiB


is this a hint? any special changes in libxml2 cause this apache xml2enc problem?

:oops:
_________________
hackers - make sth real
academics - read sth said to be real
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum