Building Frobtads 1.2.2 Errors

Hey guys,

I’m trying to get the most recent version of frobtads running on my server: a Linux box with CentOS 4.4. Now, Centos 4.4 is practically a dead distro – all the repositories have pulled the plug and it’s essentially obsolete. It is an RPM-managed system, though, so I had been using that for my installations. The only RPM file for frobtads that I found online was for an old deprecated version (0.11, I think) and that does have support for the functionality I need (WebUI).

So, naturally, I try to download and compile the source code for the most recent version. I couldn’t find an RPM file for it, so I went straight for the source. Problem is, I get some errors building. Running ‘make’, I see…

In file included from ./tads2/os.h:86, from ./tads2/osstzprs.h:45, from src/osportable.cc:9: ./tads2/h_ix86_64.h:58:2: #error SIZEOF_INT must be defined in your makefile - set SIZEOF_INT to the number of bytes in an 'int' for your compiler ./tads2/h_ix86_64.h:66:2: #error SIZEOF_SHORT must be defined in your makefile - set SIZEOF_SHORT to the number of bytes in a 'short' for your compiler In file included from ./tads2/os.h:213, from ./tads2/osstzprs.h:45, from src/osportable.cc:9: ./tads2/osifc.h:1386: error: `uint32_t' does not name a type ./tads2/osifc.h:1387: error: `uint32_t' does not name a type src/osportable.cc: In function `int os_file_stat(const char*, int, os_file_stat_t*)': src/osportable.cc:548: error: 'struct os_file_stat_t' has no member named 'sizelo' src/osportable.cc:548: error: `uint32_t' was not declared in this scope src/osportable.cc:549: error: 'struct os_file_stat_t' has no member named 'sizehi' src/osportable.cc:550: warning: right shift count >= width of type make[1]: *** [src/osportable.o] Error 1 make: *** [all] Error 2

Think any one can help me? My goal here isn’t entirely to get frobtads to compile – if that’s necessary, so be it – but I’d just really like to have an up-to-date running version of the interpreter on my machine.

Thanks for seeing my plea.
John

Some of these errors (SIZEOF_* must be defined) seems familiar to me. About a year ago I was trying to build and run frob on a really ancient machine and since I’m not a root of that machine I’ve worked in home only trying to build newer autotools and such dependencies. I’ve tried to overcome this error by defining size of int by myself and after a lot of hacks I’ve actually managed to obtain a binary. Hovewer when running that binnary, it always crashed in one minute after starting. So sorry, no happyend :frowning:

The first errors, regarding SIZEOF_INT and SIZEOF_SHORT indicate that the configure script did not work properly, since configure should put those values into the Makefile. I’m sorry for the patronizing question, but did you run configure? If you did, you can instead try running the bootstrap script contained in the package, which will regenerate configure, and then re-run configure.

On the other hand, the later errors seem to indicate a glibc error. It could be that your glibc package is horribly out of date.

With the disclaimer that this is a bit of self-promotion, since I’m its maintainer, one thing you can try is to put GSRC on there to install the latest versions of libc and autoconf. Then, you can try building Frobtads using those new versions. I mention this because it would be painful to replace glibc system-wide on that computer, whereas GSRC will let you install, for example, in a user’s home directory or under /opt. Then, when you build and run Frobtads, just preface your commands with LD_LIBRARY_PATH=/path/to/gsrc. If you go this route and you need a hand, feel free to contact me!

Otherwise, where’s RealNC…he’s a Gentoo guy so he might have a bit clearer of an idea about what exactly is going wrong.

I’ll install CentOS 4.4 in a VM and have a look at what’s causing this.

OK, I’ve installed it now and can’t reproduce the specific error you’re getting. However, even if that error was not there, you won’t be able to build it because of the libcurl version in CentOS 4.4. It ships with version 7.12. That’s too old. If you are able to install a newer version of libcurl (I think that it should start working with 7.18 and higher), then you might be able to compile it.

Another unrelated error showed up, which is easily fixable. Edit the file “src/osfrobtads.h” and in line 22, where it says:

#include <stdio.h>

insert “#include <stdarg.h>” in a new line, so that afterwards it looks like this:

#include <stdio.h>
#include <stdarg.h>

If you’re able to install a recent libcurl and also apply the above fix, you might be able to build.

I will fix the missing <stdarg.h> for the next version, but you’ll still need a recent libcurl (it’s required for WebUI.)

I’m an idiot…I didn’t realize you wrote Frobtads :blush:

Hey RealNC, thanks for helping me out here.

I saw the libcurl problem a bit ago (before I posted here, even) and knew to fix that. I found an rpm online and installed libcurl/7.28.1, so that didn’t throw any more temper tantrums.
I modified the src/osfrobtabs.h like you said, and unfortunately I’m still getting the exact same error…

Any command output I can offer up to help diagnose this more? I’m at a loss, myself…

Thanks again, though, guys,

I was able to reproduce the error. It happens here when I set custom LDFLAGS or CPPFLAGS. Looks like the Autoconf macros that perform these checks don’t work well with GCC 3. I will need to investigate this.

As a workaround, after you’ve run ./configure, edit the file “config.h” and replace this:

[code]/* The size of `int’, as computed by sizeof. */
#define SIZEOF_INT 0

/* The size of `long’, as computed by sizeof. */
#define SIZEOF_LONG 0

/* The size of `short’, as computed by sizeof. */
#define SIZEOF_SHORT 0[/code]
with this:

[code]
/* The size of `int’, as computed by sizeof. */
#define SIZEOF_INT 4

/* The size of `long’, as computed by sizeof. */
#define SIZEOF_LONG 4

/* The size of `short’, as computed by sizeof. */
#define SIZEOF_SHORT 2[/code]

I assume you’re on a 32-bit system. If you’re on 64-bit, you need to use “SIZEOF_LONG 8” (instead of “4”).

Note that “config.h” is generated by the ./configure script. If you run the script, you need to edit “config.h” again. So first do a ./configure, then edit “config.h”, and then do the make && make install step.

It compiled fine for a while, but suddenly I got a mass of errors late in the process.

src/tadswindow.h: In member function `int FrobTadsWindow::enableScrolling(bool)': src/tadswindow.h:92: error: 'class FrobTadsWindow' has no member named 'fWin' src/tadswindow.h:92: error: `scrollok' was not declared in this scope src/tadswindow.h: In member function `int FrobTadsWindow::flush()': src/tadswindow.h:98: error: 'class FrobTadsWindow' has no member named 'fWin' src/tadswindow.h:98: error: `wrefresh' was not declared in this scope src/tadswindow.h: In member function `int FrobTadsWindow::touch()': src/tadswindow.h:105: error: 'class FrobTadsWindow' has no member named 'fWin' src/tadswindow.h:105: error: `touchwin' was not declared in this scope src/tadswindow.h: In member function `int FrobTadsWindow::keypadMode(bool)': src/tadswindow.h:113: error: 'class FrobTadsWindow' has no member named 'fWin' src/tadswindow.h:113: error: `keypad' was not declared in this scope src/tadswindow.h: In member function `int FrobTadsWindow::input8bit(bool)': src/tadswindow.h:120: error: 'class FrobTadsWindow' has no member named 'fWin' src/tadswindow.h:120: error: `meta' was not declared in this scope In file included from src/frobtadsappcurses.cc:16: src/frobtadsappcurses.h: At global scope: src/frobtadsappcurses.h:23: error: ISO C++ forbids declaration of `chtype' with no type src/frobtadsappcurses.h:23: error: expected `;' before '*' token src/frobtadsappcurses.h: In member function `virtual void FrobTadsApplicationCurses::print(int, int, int, const char*)': src/frobtadsappcurses.h:53: error: 'class FrobTadsApplicationCurses' has no member named 'fDispBuf' src/frobtadsappcurses.h:54: error: 'class FrobTadsApplicationCurses' has no member named 'fDispBuf' src/frobtadsappcurses.h:55: error: 'class FrobTadsApplicationCurses' has no member named 'fDispBuf' src/frobtadsappcurses.h: In member function `virtual void FrobTadsApplicationCurses::sleep(int)': src/frobtadsappcurses.h:76: error: `napms' was not declared in this scope src/frobtadsappcurses.cc: In constructor `FrobTadsApplicationCurses::FrobTadsApplicationCurses(const FrobTadsApplication::FrobOptions&)': src/frobtadsappcurses.cc:64: error: class `FrobTadsApplicationCurses' does not have any field named `fDispBuf' src/frobtadsappcurses.cc:86: error: `initscr' was not declared in this scope src/frobtadsappcurses.cc:90: error: `cbreak' was not declared in this scope src/frobtadsappcurses.cc:93: error: `noecho' was not declared in this scope src/frobtadsappcurses.cc:98: error: `curs_set' was not declared in this scope src/frobtadsappcurses.cc:104: error: `nonl' was not declared in this scope src/frobtadsappcurses.cc:107: error: `has_colors' was not declared in this scope src/frobtadsappcurses.cc:109: error: `start_color' was not declared in this scope src/frobtadsappcurses.cc:114: error: `use_default_colors' was not declared in this scope src/frobtadsappcurses.cc:124: error: `COLOR_BLACK' was not declared in this scope src/frobtadsappcurses.cc:124: error: `init_pair' was not declared in this scope src/frobtadsappcurses.cc:125: error: `COLOR_RED' was not declared in this scope src/frobtadsappcurses.cc:126: error: `COLOR_GREEN' was not declared in this scope src/frobtadsappcurses.cc:127: error: `COLOR_YELLOW' was not declared in this scope src/frobtadsappcurses.cc:128: error: `COLOR_BLUE' was not declared in this scope src/frobtadsappcurses.cc:129: error: `COLOR_MAGENTA' was not declared in this scope src/frobtadsappcurses.cc:130: error: `COLOR_CYAN' was not declared in this scope src/frobtadsappcurses.cc:142: error: `COLOR_WHITE' was not declared in this scope src/frobtadsappcurses.cc: In destructor `FrobTadsApplicationCurses::~FrobTadsApplicationCurses()': src/frobtadsappcurses.cc:204: error: `curs_set' was not declared in this scope src/frobtadsappcurses.cc:214: error: `endwin' was not declared in this scope src/frobtadsappcurses.cc:217: error: 'class FrobTadsApplicationCurses' has no member named 'fDispBuf' src/frobtadsappcurses.cc: In member function `virtual void FrobTadsApplicationCurses::init()': src/frobtadsappcurses.cc:272: error: `endwin' was not declared in this scope src/frobtadsappcurses.cc:273: error: `refresh' was not declared in this scope src/frobtadsappcurses.cc:275: error: `stdscr' was not declared in this scope src/frobtadsappcurses.cc:275: error: `wclear' was not declared in this scope src/frobtadsappcurses.cc:291: error: 'class FrobTadsApplicationCurses' has no member named 'fDispBuf' src/frobtadsappcurses.cc:291: error: 'class FrobTadsApplicationCurses' has no member named 'fDispBuf' src/frobtadsappcurses.cc:292: error: 'class FrobTadsApplicationCurses' has no member named 'fDispBuf' src/frobtadsappcurses.cc:292: error: `chtype' has not been declared src/frobtadsappcurses.cc: In member function `virtual void FrobTadsApplicationCurses::clear(int, int, int, int, int)': src/frobtadsappcurses.cc:317: error: `chtype' does not name a type src/frobtadsappcurses.cc:320: error: `c' was not declared in this scope src/frobtadsappcurses.cc: In member function `virtual void FrobTadsApplicationCurses::scrollRegionUp(int, int, int, int, int)': src/frobtadsappcurses.cc:333: error: `chtype' does not name a type src/frobtadsappcurses.cc:334: error: `c' was not declared in this scope src/frobtadsappcurses.cc:339: error: `chtype' does not name a type src/frobtadsappcurses.cc:340: error: `c' was not declared in this scope src/frobtadsappcurses.cc: In member function `virtual void FrobTadsApplicationCurses::scrollRegionDown(int, int, int, int, int)': src/frobtadsappcurses.cc:354: error: 'class FrobTadsWindow' has no member named 'charAt' src/frobtadsappcurses.cc:357: error: `chtype' does not name a type src/frobtadsappcurses.cc:358: error: `c' was not declared in this scope src/frobtadsappcurses.cc: In member function `virtual int FrobTadsApplicationCurses::getRawChar(bool, int)': src/frobtadsappcurses.cc:384: error: `curs_set' was not declared in this scope src/frobtadsappcurses.cc:404: error: `erasechar' was not declared in this scope src/frobtadsappcurses.cc:404: error: `KEY_BACKSPACE' was not declared in this scope src/frobtadsappcurses.cc:407: error: `killchar' was not declared in this scope src/frobtadsappcurses.cc:407: error: `KEY_DL' was not declared in this scope src/frobtadsappcurses.cc:409: error: `curs_set' was not declared in this scope

This is by no means all of it – only what I could see in my terminal at maximum size. I can see a sure lot of ncurses errors, though…

Only the first error is relevant (which isn’t visible here.) The rest is virtually always only a meaningless chain reaction due to the first error.

Well, okay, here goes. This obviously goes on for a while, but this is the first thing that I see from redirecting standard error.

n file included from src/frobtadsappcurses.h:9, from src/frobtadsappcurses.cc:16: src/tadswindow.h:17: error: ISO C++ forbids declaration of `WINDOW' with no type src/tadswindow.h:17: error: expected `;' before '*' token src/tadswindow.h:71: error: `chtype' has not been declared src/tadswindow.h:71: error: ISO C++ forbids declaration of `str' with no type src/tadswindow.h:77: error: expected `,' or `...' before "ch" src/tadswindow.h:77: error: ISO C++ forbids declaration of `chtype' with no type src/tadswindow.h:81: error: `chtype' does not name a type src/tadswindow.h: In constructor `FrobTadsWindow::FrobTadsWindow(int, int, int, int)': src/tadswindow.h:24: error: class `FrobTadsWindow' does not have any field named `fWin' src/tadswindow.h:24: error: `newwin' was not declared in this scope

Is this the preprocessor not finding the ncurses include, or…?