[syslinux] Syslinux 2.00 build problems on redhat 8.0

Jeff Mock jeff at mock.com
Fri Dec 27 20:23:41 PST 2002

Okay, I've looked into this a little further, and I would like
some feedback if anybody else really knows what's going on.

In redhat 8.0, the locale is setup to be "en_US.UTF-8" by default
with the LANG environment variable.  Perl 5.8 looks at this variable
and does file I/O using utf8 as a result.  This screws up the scripts
that are munging binary files.  So, there are a couple of ways to

Unset the LANG environment varable or set it to "en_US" instead.
This variable is set in /etc/sysconfig/i18n.  syslinux builds fine with
no patches.

On further reflection, I think the 3 perl scripts below should
have the following at the beginning instead of the pragma I used

     use open  IO => ":bytes";
     binmode (STDIN, ":bytes");
     binmode (STDOUT, ":bytes");

With the above, syslinux will build regardless of the setting of
the LANG environment variable and error messages and such will honor
the current locale settings.


At 12:32 AM 12/27/2002 -0800, Jeff Mock wrote:
>I apologize if this has already been covered, I did a half-hearted
>search of the mail archives but couldn't find anything, although I
>did find a couple of posts elsewhere of people having similar trouble
>with ppmtolss16.
>I'm having a few build problems on redhat 8.0, the first failure
>in the build is a fatal error from findpatch.pl early in the build.
>Bumbling through that problem there were a couple of other failures.
>It looks like all of the problems are related to the way perl is
>built on redhat 8.0 to handle unicode strings.  This screws up the perl
>scripts in the build that are munging binary files.
>So, my fix is to patch the following scripts:
>     findpatch.pl
>     bin2hex.pl
>     ppmtolss16
>I add the following to the beginning of each of the scripts:
>     eval("no encoding") if $] >= 5.008;
>This says to use the "no encoding" pragma if the perl version is
>5.8.0 or later and seems to fix the unicode craziness gnarling
>things up.  This seems to work okay on older systems and
>the build seems to work fine on redhat 8.0.
>Has anyone else run into this problem or have a more elegant
>SYSLINUX mailing list
>Submissions to SYSLINUX at zytor.com
>Unsubscribe or set options at:
>Please do not send private replies to mailing list traffic.

More information about the Syslinux mailing list