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: 5

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: 1972

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: 5

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: 1972

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: 1972

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
clms
n00b
n00b


Joined: 15 May 2024
Posts: 5

PostPosted: Sat Jun 15, 2024 7:32 pm    Post subject: Reply with quote

After my vacation, I did some further debug:
It looks, I need /usr/lib64/apache2/modules/mod_apreq2.so. It provides apreq_handle_apache2.
Unfortunately, I have no idea how to tell Perl, to load this shared library.
Back to top
View user's profile Send private message
clms
n00b
n00b


Joined: 15 May 2024
Posts: 5

PostPosted: Sat Jun 15, 2024 8:50 pm    Post subject: Reply with quote

Created bug 934379
Back to top
View user's profile Send private message
sMueggli
Guru
Guru


Joined: 03 Sep 2022
Posts: 496

PostPosted: Mon Jun 17, 2024 4:39 pm    Post subject: Reply with quote

What shows
Code:
emerge -pv www-apache/libapreq2
? Maybe it is related to the PERL_FEATURES change.
Back to top
View user's profile Send private message
clms
n00b
n00b


Joined: 15 May 2024
Posts: 5

PostPosted: Mon Jun 17, 2024 6:05 pm    Post subject: Reply with quote

Code:
> emerge -pv www-apache/libapreq2

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 5.34 s (backtrack: 0/20).

[ebuild   R    ] www-apache/libapreq2-2.17:2::gentoo  USE="perl -test" PERL_FEATURES="ithreads (-debug) -quadmath" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB
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