Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

AlmaLinux9 cperl build error #432

Open
Andolini-Corleone opened this issue Feb 14, 2023 · 17 comments
Open

AlmaLinux9 cperl build error #432

Andolini-Corleone opened this issue Feb 14, 2023 · 17 comments

Comments

@Andolini-Corleone
Copy link

Hello,

Is cperl available on AlmaLinux9?

I tried to build many times with/without the latest write_buildcustomize.pl.
My compile script and options are as follows and the error log is attached.

Please advise.

Thanks in advance.

Best regards,
Ando

P.S.
Btw, it takes too long time on 2core / 2GB memory / 3GB swap VPS...
Build Started : Mon Feb 13 19:16:26 UTC 2023
Error Ended : Tue Feb 14 00:16 UTC 2023
We strongly hope RPM repository.

======================

uname -a
Linux i-51100000461557 5.14.0-70.13.1.el9_0.x86_64 #1 SMP PREEMPT Tue May 17 15:53:11 EDT 2022 x86_64 x86_64 x86_64 GNU/Linux

yum -y install tar gcc gperf perl-Time-HiRes perl-Data-Dumper perl-ExtUtils*

cd /usr/local/src
curl -OLk https://github.com/perl11/cperl/releases/download/cperl-5.30.0/cperl-5.30.0.tar.gz
tar xzf cperl-5.30.0.tar.gz

curl -k https://raw.githubusercontent.com/perl11/cperl/master/write_buildcustomize.pl > /usr/local/src/cperl-5.30.0/write_buildcustomize.pl

cd cperl-5.30.0
./Configure -sde -Dprefix=/opt/cperl -Dinstallusrbinperl=N
make -s -j4 test
make install

======================

grep -v ok$ nohup.out > error_log.txt
error_log.txt

@Andolini-Corleone
Copy link
Author

Hello again,

I think almost OK. Just one test problem remains in error_log.txt like this.

Failed 1 test out of 2553, 99.96% okay.
porting/libperl.t

Please give us a clue.

We have been using perlcc for over 20 years since it was included in Perl.
It is great job.

AlmaLinux9/Rocky Linux9 wil be very long support term.
Cperl and perlcc will be very useful for more long time in the future if it is OK on new el9 Linux.

Thank you. (^_^)

@Andolini-Corleone
Copy link
Author

Sorry for big font. My mistake.

@rurban
Copy link
Member

rurban commented Feb 14, 2023

Please post the failing test line. Doesn't seem too problematic

@Andolini-Corleone
Copy link
Author

Thank you so much for your reply.
Right. Doesn't seem too problematic. Maybe small issue.
I just retry install from scratch on newly setup AlmaLinux9 and post again.

@rurban
Copy link
Member

rurban commented Feb 14, 2023

Failed test 5 - has PL_no_mem at porting/libperl.t line 371
No need to worry

And libffi-devel is missing.

@Andolini-Corleone
Copy link
Author

Thank you. I appreciate your help so much.
I just completed to setup a new AlmaLinux9 server.
Now I retry to install with libffi-devel.

@Andolini-Corleone
Copy link
Author

Hello,

Completed. Thank you so much!

But, it looks a little different than before, CentOS7 on a perl&B-C basis server.

My main concern is about option "-B" warning/error messages as follows.

[root@i ~]# cat test.pl
#!/usr/bin/perl
print "OK\n";
[root@i ~]# /opt/cperl/bin/perlcc -o test_B test.pl -B
/opt/cperl/bin/perlcc: Unexpected compiler output
Name "B::C::Regexp" used only once: possible typo at test.pl line 2.
[root@i ~]# ./test_B
OK
[root@i ~]#

These warning/error messages were not displayed before on CentOS7 perl&B-C server.
And I found an ERROR in "make test" log as follows.

cpan/B-C/t/e_perlcc ........................................... ERROR Invalid bytecode: bad magic (want 0x43424c50 PLBC or 0x434a4c50 PLJC, got 0x2f202123) at pcc.plc line 1.
ok

It is "ok", though...

My next concern is script compile time. It takes long time, about 1 minutes, to compile without "-B" as follows.

[root@i ~]# date ; /opt/cperl/bin/perlcc -o test test.pl ; date
Wed Feb 15 10:15:16 UTC 2023
Wed Feb 15 10:16:19 UTC 2023
[root@i ~]# ./test
OK
[root@i ~]#

It is not occurred on CentOS7 perl&B-C server.

About install time, it took about 6 hours from start "Configure" to end "make install".
It seemed testing cpan/B-C/t/* was very long.
I think the long install time has something to do with the issue of "perlcc -o test test.pl".

And there are other warning/error messages as follows.

[root@i ~]# /opt/cperl/bin/perlcc --version
Use of uninitialized value $B::C::REVISION in concatenation (.) or string at /opt/cperl/bin/perlcc line 1059.
perlcc 2.24, B-C-1.57_01 built for /opt/cperl/bin/cperl x86_64-linux
[root@i ~]#

These message are displayed on CentOS7 perl&B-C server, too.

Please advise.

Thanks so much as usual. I appreciate your help.

Best regards,
Ando

@rurban
Copy link
Member

rurban commented Feb 15, 2023

-B the bytecode loader got broken upstream some time ago, and was not able to fix it.

@Andolini-Corleone
Copy link
Author

I know the bytecode loader/compiler is broken after Perl5.22.
Also Cperl broken?

@rurban
Copy link
Member

rurban commented Feb 15, 2023 via email

@Andolini-Corleone
Copy link
Author

It is just curious but you already fixed about Cperl as you wrote before in 2019.

[https://github.com/rurban/perl-compiler/issues/433]

Perl 5.22 broke bytecide compiler completely. You can only use cperl then, which has this fixed. p5p refuses to fix several compiler bugs for years.

As I said, perl 5.22 broke the bytecode compiler. You can only use cperl or any perl before 5.22.

Which is true? rurban2023? or rurban2019?

@rurban
Copy link
Member

rurban commented Feb 15, 2023

I was inexact. I did fix the compiler, but not the core code which the Byteloader uses, via some dirty trick. So it doesn't work.

@Andolini-Corleone
Copy link
Author

Anyway thank you so much. I appreciate your support.

@rurban
Copy link
Member

rurban commented Feb 15, 2023

I'll try to find some Alma, Rocky, CentOS dockers

@Andolini-Corleone
Copy link
Author

Thank you so much again.

I just found very interesting thing.
I think the cperl byteloader seems working.

[root@i- ~]# cat test2.pl
#!/usr/bin/perl
print "OK\n";
print "OK\n";

[root@i- ~]# cat test.pl
#!/usr/bin/perl
print "OK\n";

[root@i- ~]# /opt/cperl/bin/perlcc test2.pl -o test2 -B ; echo $?
0

[root@i- ~]# /opt/cperl/bin/perlcc test.pl -o test -B ; echo $?
/opt/cperl/bin/perlcc: Unexpected compiler output
Name "B::C::Regexp" used only once: possible typo at test.pl line 2.
0

[root@i- ~]# ./test2.pl
OK
OK

[root@i- ~]# ./test2
OK
OK

[root@i- ~]# ./test.pl
OK

[root@i- ~]# ./test
OK

But I found "Regexp::DESTROY" in both test and test2 binary file.

[root@i- ~]# grep Regexp::DESTROY test
grep: test: binary file matches

[root@i- ~]# grep Regexp::DESTROY test2
grep: test2: binary file matches

If "Regexp::DESTROY" is not harmful and the compiled program logic is OK and works correctly. I think it is OK. I will ignore these messages.

/opt/cperl/bin/perlcc: Unexpected compiler output
Name "B::C::Regexp" used only once: possible typo at test.pl line 2.

What do you think?

@rurban
Copy link
Member

rurban commented Feb 16, 2023

ignore the used only once warning. this can be patched away, but only when the bytecompiler works.
-B only works in some minor cases, but not generally. the testcases fail all over if I remember correctly a \r appears in the bytecode.

@Andolini-Corleone
Copy link
Author

I really appreciate your valuable information.
I think I understand. We can ignore it as warning. We use -B on a binary program test basis and have to be careful about \r.
We have been using -B for very long time. It seems working correctly. We think -B is useful. Compile is fast and binary file size is small. So we need to use -B...
Thank you so much again.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants