Closed Bug 1588175 Opened 10 months ago Closed 3 months ago

Undefined subroutine utf8::SWASHNEW called at Bugzilla/Util.pm line 109.

Categories

(Bugzilla :: Installation & Upgrading, defect)

5.0.4
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jochen.wiedmann, Unassigned)

Details

Attachments

(1 file)

Attached file checksetup.pl.log

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36

Steps to reproduce:

1.) Simple installation of CentOS 7 on a VM (including Virtualbox Guest Additions, mariadb-server, and mariadb-devel
2.) Download, and extraction of perl-5.30.0.tar.gz
3.) Download, and extraction of bugzilla-5.0.6.tar.gz
4.) Perl Installation:

  cd /usr/local/install/perl-5.0.30
  ./Configure -des -Dprefix=/usr/local/perl-5.30.0
  make
  make test
  sudo make install

5.) Bugzilla Installation:

  cd /usr/local/bugzilla-5.0.6
  export PATH=/usr/local/perl-5.30.0/bin:$PATH
  /usr/local/perl-5.30.0/bin/perl checksetup.pl
  sudo /usr/local/perl-5.30.0/bin/perl install-module.pl --all

Actual results:

checksetpu.pl fails with the following error message (See attached log file):

Undefined subroutine utf8::SWASHNEW called at Bugzilla/Util.pm line 109.
Compilation failed in require at Bugzilla/Mailer.pm line 21, <DATA> line 755.
BEGIN failed--compilation aborted at Bugzilla/Mailer.pm line 21, <DATA> line 755.
Compilation failed in require at Bugzilla/Auth.pm line 22, <DATA> line 755.
BEGIN failed--compilation aborted at Bugzilla/Auth.pm line 22, <DATA> line 755.
Compilation failed in require at Bugzilla.pm line 23, <DATA> line 755.
BEGIN failed--compilation aborted at Bugzilla.pm line 23, <DATA> line 755.
Compilation failed in require at checksetup.pl line 76, <DATA> line 755.

Expected results:

Checksetup.pl should generate the localconfig file, and exit without error message.

The issue seems to be related to the Perl version. I encountered it originally on another machine, and could fix it by downgrading Perl to 5.16.3.
In fact, this smells like a bug in Perl. (See, for example, https://rt.perl.org/Public/Bug/Display.html?id=72942.)

However, I feel that the Bugzilla maintainers should

a) be more qualified than me to state the fact, and isolate the problem
b) be aware of the problem, and
c) suggest suitable workarounds, other than mine.

Thanks,

Jochen

Duplicate: #1558150
I workaround it with commenting the single line in Bugzilla/Util.pm:
$var =~ tr/\x{202a}-\x{202e}//d;

This only removes BiDi control characters, so it's not introducing any security issues to do so.

I don't understand what makes Perl 5.30.0 unhappy with this.

Upstream Perl bug report (thanks to many on freenode #perl): https://github.com/Perl/perl5/issues/17271

Do we need to work around this, perhaps?

This is fixed in the 5.2 branch

Status: UNCONFIRMED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.