[SOLVED] Making FrobTADS on CentOS 7

I posted instructions for CentOS 5. FrobTADS 2.0 was released last month and I have an update for CentOS 7. The latest FrobTADS can be found on github: Releases · realnc/frobtads · GitHub

After you untar the files, doc/INSTALL is pretty clear. But I had to use cmake3 in place of cmake, install a new gcc, and fix a build error. This article describes installation of gcc 6 or 7: https://linuxize.com/post/how-to-install-gcc-compiler-on-centos-7/ , but I installed 8:

$ sudo yum install centos-release-scl
$ sudo yum install devtoolset-8
$ scl enable devtoolset-8 bash
$ gcc --version
gcc (GCC) 8.3.1 20190311 (Red Hat 8.3.1-3)
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO

NB: This enables gcc 8.3.1 for (only) the bash session in which you issued the scl enable command.

YMMV, but I needed to install cmake3, ncurses, and curl and I cast my net broadly:

sudo cmake cmake3
sudo yum install ncurses ncurses-devel ncurses-libs ncurses-static ncurses-base ncurses-term
sudo yum install libcurl  libcurl-devel curl

Then I could build the source:

$ ls
frobtads-2.0/  frobtads-2.0.tar.gz
$ cd frobtads-2.0
$ mkdir build
$ cd build
$ cmake3 ..
$ vi ../doc/INSTALL
$ cmake3 --build .

At this point, I got errors about frobtads-2.0/tads2/ostzposix.c:

/home/amead/projects/tads/source/frobtads-2.0/tads2/ostzposix.c: In function ‘os_get_timezone_info’:
/home/amead/projects/tads/source/frobtads-2.0/tads2/ostzposix.c:298:31: error: ‘const struct tm’ has no member named ‘tm_gmtoff’
             info->dst_ofs = tm->tm_gmtoff;
/home/amead/projects/tads/source/frobtads-2.0/tads2/ostzposix.c:299:67: error: ‘const struct tm’ has no member named ‘tm_zone’
             safe_strcpy(info->dst_abbr, sizeof(info->dst_abbr), tm->tm_zone);

A little googling suggested an answer: 'struct tm' has no member named 'tm_gmtoff'

Edit ../tads2/ostzposix.c to add the lines #if defined (HAVE_STRUCT_TM_GMTOFF) and # endif as shown below.

/* Get timezone information. This can be used as a fallback if the a
 * zoneinfo key isn't available, or if the caller doesn't use zoneinfo
 * data.
os_get_timezone_info( struct os_tzinfo_t *info )
    /* try parsing environment variable TZ as a POSIX timezone string */
    const char *tz = getenv("TZ");
    if (tz != 0 && oss_parse_posix_tz(info, tz, strlen(tz), TRUE))
        return TRUE;

    /* fall back on localtime() - that'll at least give us the current
     * timezone name and GMT offset in most cases
    time_t timer = time(0);
    const struct tm *tm = localtime(&timer);
    if (tm != 0)
        memset(info, 0, sizeof(*info));
        info->is_dst = tm->tm_isdst;
        if (tm->tm_isdst)
            info->dst_ofs = tm->tm_gmtoff;
            safe_strcpy(info->dst_abbr, sizeof(info->dst_abbr), tm->tm_zone);
            info->std_ofs = tm->tm_gmtoff;
            safe_strcpy(info->std_abbr, sizeof(info->std_abbr), tm->tm_zone);
        return TRUE;
# endif

    /* no information is available */
    return FALSE;

Then you should be able to build and install:

$ vi ../doc/INSTALL
$ cmake3 --build .
$ cmake3 --build . --target install

The INSTALL describes how to modify the installation directory, I preferred to install the files manually so I could preserve the previous versions (tadsrc is new) and choose the installation directory:

$ sudo cp -p /usr/local/bin/tadsc /usr/local/bin/old_tadsc
$ sudo cp tadsc /usr/local/bin/
$ sudo cp -p /usr/local/bin/frob /usr/local/bin/old_frob
$ sudo cp frob /usr/local/bin/
$ sudo cp -p /usr/local/bin/t3make /usr/local/bin/old_t3make
$ sudo cp t3make /usr/local/bin/
$ sudo cp tadsrsc /usr/local/bin/

Excellent work!

Have you considered working with a Raspberry Pi?

I am going to try your modifications and see if they might work.

Thank you!

I got a previous version of FrobTADS working. The Pi was a perfect host for FrobTADS. On the Pi 2, IIRC.

I’ll be happy to help if there’s an issue, but I don’t recall it being difficult. Full disclosure: I posted the above instructions for myself as much as anyone else. I’ll probably have to reconstruct my CentOS 7 server in 2021 and I’ll have to repeat the above steps.

1 Like

As yet, I have been unable to get FrobTADS to work on any of my RPis. I’m going to try again in the next day or so. I appreciate your offer of assistance. It would be very nice. TADS is about the only thing I am doing on my Win10 computer. I would like to do everything on the RPi.

Thank you

Which PI and which OS are you using? I’ll snag a copy so I have the same environment.

I may have only compiled and used T2. So, maybe T3 is an issue.

And, of course, everything is slower on the Pi, but IIRC T2 playback was reasonable.

One reason I think it was easier to compile FrobTADS on Pi is that I was probably using something like Pidora, which is based on a recent Fedora, which is a lot more current than CentOS. I believe the build problem I described in my OP was because the GLIBC in CentOS is very old. The work-around I found was from 2011. CentOS and RHEL have some very old components. I think Pi tends to have fresher components.

1 Like

I am using the RPi 4 with 4 Gigs of ram. It is surprisingly with 4 cores. I am using the current Raspi OS with updates which used to be Raspbian.

Quite a number of RPi users would find this useful.

Thank you very much!

1 Like

Sweet, I’m getting a new Pi. I’ll have it this weekend.

1 Like