[SOLVED] Problem installing perl-5.34.1 using perlbrew

Post Reply
kayesk
Crewman
Posts: 4
Joined: Sun Jan 15, 2023 1:37 pm

Good morning !

First time posting. I am new to linux and very new to archlinux.

I am not sure whether I can post a question related to ArcoLinuxL, as the forum says "ArcoLinux-D-B-Forum". I apologize if it is not the right place.

Code: Select all

ksundhar@tuxlegion
------------------
OS: ArcoLinux
Host: 82JW Legion 5 15ACH6
Kernel: 6.1.6-arch1-1
Uptime: 42 mins
Packages: 1473 (pacman)
Shell: bash 5.1.16
Resolution: 1920x1080
DE: Xfce 4.18
WM: Xfwm4
WM Theme: Default-hdpi
Theme: Arc-Dark [GTK2/3]
Icons: Sardi-Flat-Arc [GTK2], Sardi-Arc [GTK3]
Terminal: alacritty
CPU: AMD Ryzen 7 5800H with Radeon Graphics (16) @ 3.200GHz
GPU: NVIDIA GeForce RTX 3050 Mobile
Memory: 2.27GiB / 15.48GiB (14%)
GPU Driver: NVIDIA 525.78.01
CPU Usage: 2%
Disk (/): 24G / 115G (22%)
Font: Noto Sans 12 [GTK2], Noto Sans 11 [GTK3]
Version of perl that came installed with ArcoLinux installation is 5.36.0. For training purpose I have to use perl-5.34.1.

I installed perlbrew using pacman.
And I am trying to install perl-5.34.1 version using perlbrew.

Code: Select all

perlbrew install perl-5.34.1
And it ends up in installation failed. Please find build log link below.
https://gist.github.com/kayesk/4e7cb77 ... 9de4a42fb
Error starts at line number 2658 in build log.

Code: Select all

config.h:1232:17: warning: missing terminating " character
 1232 | #define ARCHLIB "/home/ksundhar/perl5/perlbrew/perls/perl-5.34.1/lib/5.34.1/
      |                 ^
The file in question config.h has some multi-line #define with unicode characters. Build errors with missing terminating character.

And in quite a many places in same config.h, build errors "stray character in program".

Code: Select all

config.h:1312:42: error: stray ‘\342’ in program
 1312 | <U+001B>[1m<U+001B>[31m       <U+25A0><U+25A0><U+25A0>     <U+001B>[1m<U+001B>[32m       <U+25A0><U+25A0><U+25A0>     <U+001B>[1m<U+001B>[33m       <U+25A0><U+25A0><U+25A0>    <U+001B>[1m<U+001B>[34m        <U+25A0><U+25A0><U+25A0>      <U+001B>[1m<U+001B>[35m      <U+25A0><U+25A0><U+25A0>     <U+001B>[1m<U+001B>[0m
      |                                             

I tried installing previous versions of perl the same way. It all ends up with same errors.

Please help.

Thanks
KS
User avatar
erikdubois
Captain
Posts: 5353
Joined: Tue Nov 07, 2017 3:45 pm
Location: Belgium
Contact:

This is not my cup of tea.

I hope someone else can assist.

I would post this question on several forums.
Learn, have fun and enjoy.
But first use the power of the Arch Wiki
use the tutorials on https://www.youtube.com/erikdubois
then use the power of google
then use the power of our moderators.
kayesk
Crewman
Posts: 4
Joined: Sun Jan 15, 2023 1:37 pm

Thanks you very much !
User avatar
fennec
Crewman
Posts: 25
Joined: Wed Dec 28, 2022 9:54 pm

Unfortunately, I wasn't able to replicate this inside a VM.

Kernel: 6.1.6-arch1-1
DE: Xfce 4.18
WM: Xfwm4

The steps I did were.

Install perlbrew since this was missing.

Code: Select all

sudo pacman -S perlbrew
Then perlbrew init to initialize $HOME/perl5/perlbrew

Code: Select all

perlbrew init
Finally install

Code: Select all

perlbrew install perl-5.34.1
Check install

Code: Select all

perlbrew list
perl-5.34.1
The install log file generated has no mention of those errors mentioned.

$HOME/perl5/perlbrew/perls/perl-5.34.1/lib/5.34.1/config.h - this file doesn't even exist.


Maybe try doing a perlbrew clean, install and attempt again ?
kayesk
Crewman
Posts: 4
Joined: Sun Jan 15, 2023 1:37 pm

Thanks for the help. The config.h is generated automatically by perlbrew using config_h.sh. So we would not see it initially in perl-5.34.1 source directory.

I am able to identify the problem. The perlbrew build process needs to know the system architecture while doing the build. The file $HOME/perl5/perlbrew/build/perl-5.34.1/perl-5.34.1/Configure has a logic to identify archname. Below is the snippet.

Code: Select all

: determine the architecture name
echo " "
if xxx=`./loc arch blurfl $pth`; $test -f "$xxx"; then
	tarch=`arch`"-$osname"
elif xxx=`./loc uname blurfl $pth`; $test -f "$xxx" ; then
	if uname -m > tmparch 2>&1 ; then
		tarch=`$sed -e 's/ *$//' -e 's/ /_/g' \
			-e 's/$/'"-$osname/" tmparch`
	else
		tarch="$osname"
	fi
	$rm -f tmparch
else
	tarch="$osname"
fi
If we notice the third line

Code: Select all

 tarch=`arch`"-$osname"
, it executes a script 'arch'.

In ArcoLinuxL, $HOME/.bin directory contains 'arch' executable script. This directory is in $PATH as well.
Running this script from terminal produces a color pattern output.

Code: Select all

[ksundhar@tuxlegion .bin]$ arch

        ■              ■              ■              ■              ■
       ■■■            ■■■            ■■■            ■■■            ■■■
      ■■■■■          ■■■■■          ■■■■■          ■■■■■          ■■■■■
     ■(   )■        ■(   )■        ■(   )■        ■(   )■        ■(   )■
    ■■■■ ■■■■      ■■■■ ■■■■      ■■■■ ■■■■      ■■■■ ■■■■      ■■■■ ■■■■
   ■■       ■■    ■■       ■■    ■■       ■■    ■■       ■■    ■■       ■■
Wherever the build process refers $archname, the pattern above is used as value. This breaks build process.

As a workaround, I renamed ~/.bin/arch to ~/.bin/arch.bak. Then ran perlbrew to install perl-5.34.1. Process went through fine. Once finished, I renamed the file back to ~/.bin/arch.

I tried this workaround to install some other version of perl using perlbrew and it worked.

Thanks
KS
Last edited by kayesk on Mon Jan 16, 2023 5:09 am, edited 1 time in total.
User avatar
fennec
Crewman
Posts: 25
Joined: Wed Dec 28, 2022 9:54 pm

Glad you got it working, :)

That is an interesting find on the `arch` command, it explains why it didn't cause an issue in my VM.

Code: Select all

arch
bash: arch: command not found
User avatar
erikdubois
Captain
Posts: 5353
Joined: Tue Nov 07, 2017 3:45 pm
Location: Belgium
Contact:

We have it on ArcoLinux.

Just a fun script.

Nothing important.
Learn, have fun and enjoy.
But first use the power of the Arch Wiki
use the tutorials on https://www.youtube.com/erikdubois
then use the power of google
then use the power of our moderators.
kayesk
Crewman
Posts: 4
Joined: Sun Jan 15, 2023 1:37 pm

Marking it as resolved. Thanks for the support.

Regards
KS
Post Reply

Return to “Installation of Software (pacman, AUR, ...)”