Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
undefined symbol: apreq_handle_apache2 with perl -c
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
clms
n00b
n00b


Joined: 15 May 2024
Posts: 2

PostPosted: Wed May 15, 2024 7:38 pm    Post subject: undefined symbol: apreq_handle_apache2 with perl -c Reply with quote

I'm developing some code usage with mod_perl on Apache2. I check the syntax of the code with perl -c -I. My_mod_perl_stuff.pm. This worked fine for years.

After switching to a 2023 profile and doing the recommended "emerge --ask --emptytree @world" this perl -c syntax check returns
Quote:
Can't load '/usr/lib64/perl5/vendor_perl/5.38/x86_64-linux-thread-multi/auto/APR/Request/Apache2/Apache2.so' for module APR::Request::Apache2: /usr/lib64/perl5/vendor_perl/5.38/x86_64-linux-thread-multi/auto/APR/Request/Apache2/Apache2.so: undefined symbol: apreq_handle_apache2 at /usr/lib64/perl5/5.38/x86_64-linux-thread-multi/DynaLoader.pm line 206.
at /usr/lib64/perl5/vendor_perl/5.38/x86_64-linux-thread-multi/Apache2/Request.pm line 3.
Compilation failed in require at /usr/lib64/perl5/vendor_perl/5.38/x86_64-linux-thread-multi/Apache2/Request.pm line 3.

Now I found out, that I don't get an error when I start Apache2 with my code. On the webserver it is working fine. The error only occurs if I start Perl standalone without Apache2.
I assume, I need to set some links or fix some search path to make perl -c work again with the Apache modules.
But which?
Back to top
View user's profile Send private message
sam_
Developer
Developer


Joined: 14 Aug 2020
Posts: 1707

PostPosted: Wed May 15, 2024 9:24 pm    Post subject: Reply with quote

This might be related to `default-now`. Could you give me a way to reproduce this please? (Some small sample mod_perl script and tell me how to set it up.)
Back to top
View user's profile Send private message
clms
n00b
n00b


Joined: 15 May 2024
Posts: 2

PostPosted: Wed May 15, 2024 10:49 pm    Post subject: Reply with quote

As the error is caused by loading the Apache module, you can strip the module file down to
Code:
use APR::Request::Apache2;

Put this line into file tmp.pm and then run
Code:
perl -c tmp.pm

Since last weekend I get
Quote:
Can't load '/usr/lib64/perl5/vendor_perl/5.38/x86_64-linux-thread-multi/auto/APR/Request/Apache2/Apache2.so' for module APR::Request::Apache2: /usr/lib64/perl5/vendor_perl/5.38/x86_64-linux-thread-multi/auto/APR/Request/Apache2/Apache2.so: undefined symbol: apreq_handle_apache2 at /usr/lib64/perl5/5.38/x86_64-linux-thread-multi/DynaLoader.pm line 206.
at tmp.pm line 1.
Compilation failed in require at tmp.pm line 1.
BEGIN failed--compilation aborted at tmp.pm line 1.

for it. Before it would have been "tmp.pm syntax OK"
Back to top
View user's profile Send private message
sam_
Developer
Developer


Joined: 14 Aug 2020
Posts: 1707

PostPosted: Thu May 16, 2024 12:11 am    Post subject: Reply with quote

Thank you! I will have a look.
Back to top
View user's profile Send private message
sam_
Developer
Developer


Joined: 14 Aug 2020
Posts: 1707

PostPosted: Mon May 20, 2024 8:02 am    Post subject: Reply with quote

Would you mind filing a Gentoo bug for this so I can cite it? Thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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