mrxvt on cygwin: configure: error: cannot compute sizeof (short)

This is about installing mrxvt on cygwin. I had some compile problems on 64 bit Windows, but I got a kludge to work in the end…

<img src="" alt="mrxvt running under cygwin on Windows 7 64 bit.” width=”519″ height=”292″ class=”size-large wp-image-1478″ /> mrxvt running under cygwin on Windows 7 64 bit.

As far as I know, you can’t install the excellent, tabbed terminal emulator mrxvt on cygwin through the cygwin setup.exe because there’s no package in the cygwin repository. So to compile from source:

(1) Go to mrxvt homepage (at moment or similar.)

(2) Get the source and unzip somewhere in you cygwin home space.

(3) ./configure --enable-everything --disable-debug

(4) Is anything missing? Does the compile need any libraries/binaries you don’t have? If so…

(5) Fire up cygwin’s setup.exe (or setup-x86.exe or whatever) and install missing bits if cygwin has them. I’m pretty sure it does have all the development tools you need. Maybe exit and restart. It can be pretty hard to work out which libraries/packages you need. You’ll need a pretty complete install of gcc, plus some other stuff like libiconv and various make utilities. You may find a useful place to start.

(6) Configure again. Do you get anything like

 configure: error: cannot compute sizeof (short)

If you get this, see below.

(7) make

(8) make install

(9) set up your personal config file.


Here is below.

On 32 bit cygwin (on Windows 7) I got a clean compile with no problems at all, once the various package dependencies were met. On a 64 bit machine (still Windows 7) I kept getting this:

checking size of short... configure: error: cannot compute sizeof (short)
See `config.log' for more details.

and I could not figure out what was wrong nor did a websearch find an answer.

Eventually, I decided the problem was with the mechanism that the configure script was using to determine the lengths of the types (INT, LONG, SHORT, etc). So I ran a few tests to find out the ones I needed, then hardwired these answers into configure. My modified configure used to be available for download here; grep for 888 in configure_hardwired to find modified lines. You may want to rename it to plain ‘configure’ before running it.

So the following commands interrogate cpp and it spits out various data type sizes. I can’t say I tested the results really throughly, but I can say mrxvt compiled and I can use it now.

$ echo __SIZEOF_SHORT__ | cpp | tail -1

$ echo __SIZEOF_INT__ | cpp | tail -1

$ echo __SIZEOF_LONG__ | cpp | tail -1

$ echo __SIZEOF_POINTER__ | cpp | tail -1

$ echo __SIZEOF_LONG_LONG__ | cpp | tail -1

OK, then I could run

./configure --enable-everything --disable-debug

and it worked and installed and I can use it now!

Other cygwin.


Tags: , , , , , , , ,

About Darren

I'm a scientist by training, based in Australia.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: