SGI: Development

rxvt-unicode / urxvt

Hi,

I managed to compile rxvt-unicode (aka urxvt) for Irix (it's not yet in nekoware).
It took quite a bit of patching and messing around to get the latest version to compile.

The patched source is here: http://linkerror.com/programs/rxvt-unicode-irix.tar.bz2

It's not really pretty, lots of platform-specific tests were hacked around and are now irix-specific -
I also edited the configure script directly here and there, so if you run autogen.sh it will be overwritten.

It can be compiled with following configure options:

Code:
./configure --disable-lastlog --disable-xim


You might run into an issue with perl :

Code:
gcc: error: unrecognized command line option '-woff'
gcc: error: 1184,1552: No such file or directory


If that happens during the make process, just cd into the source directory, copy paste the last g++ command, and remove the -woff 1184,1552 - it should finish fine, then cd .. and re-run make, and it should continue happily. (Thankfully this is just one file)

If you don't want perl, you can also get around it with --disable-perl passed to ./configure - but perl plugins is kind of a major feature of urxvt, so it's nice to have.

Since the build is still rather hairy, I also made a tarball with the compiled binary (basically everything it installs into /usr/local)
You can download this here: http://linkerror.com/programs/rxvt-unic ... ry.tar.bz2

This also includes the tabbedex perl extension (it allows you to name your tabs) - which doesn't come with urxvt by default.

Here is an example of the resources you can put in ~/.Xdefaults to configure your urxvt with tabs and what not:

http://www.linkerror.com/stuff/Xdefaults.txt

If someone has more time than me, maybe a more polished tardist can be made ;)


----



urxvt is a terminal emulator with support for 256 colors, unicode, and perl extensions.
Some of the nice perl extensions it ships with provide support for url matching, url logging, and tabs.

Obligatory screenshot:

http://www.linkerror.com/stuff/urxvt-on ... h-perl.png
Hello, thanks for the port. I'm going to try it as soon as possible.
Does your version have "up arrow" (to repeat the last command) and backspace working correctly? Because I've been trying to figure that our for years, on mine up arrow just prints random characters and backspace goes forward unless I've got the control key down... :(

_________________
Project:
Movin' on up, toooo the east side
Plan:
World domination! Or something...
Ihave tried to run the urxvt. I have got some errors like this: 1628:urxvtd: rld: Error: unresolvable symbol in urxvtd: PL_stack_base

Can you please advice me what version of the Perl I have to use?

Anyway, many thanks for your work!

_________________
:O2: :Indy: :Indy:
vishnu wrote:
Does your version have "up arrow" (to repeat the last command) and backspace working correctly? Because I've been trying to figure that our for years, on mine up arrow just prints random characters and backspace goes forward unless I've got the control key down.


Yep, works fine.


jirka wrote:
Ihave tried to run the urxvt. I have got some errors like this: 1628:urxvtd: rld: Error: unresolvable symbol in urxvtd: PL_stack_base


I used 5.8.9 from nekoware current

Code:
onyx:~> ldd `which urxvt`
libX11.so.1  =>    /usr/lib32/libX11.so.1
libperl.so  =>    /usr/nekoware/lib/perl5/5.8.9/irix-n32/CORE/libperl.so
libm.so  =>    /usr/lib32/libm.so
libc.so.1  =>    /usr/lib32/libc.so.1


I also have one installed system-wide that comes with irix.

Code:
onyx:~> ls /usr/bin/perl
lrwxr-xr-x    1 root     sys           19b May 14 19:34 /usr/bin/perl -> ../sbin/perl5.00405


I set PERL="/usr/nekoware/bin/perl" before running ./configure so in theory it should use the nekoware version.
It uses perl itself to grab the compiler flags, here's the output of that:

Code:
onyx:~/development/rxvt-unicode> /usr/nekoware/bin/perl -MExtUtils::Embed -e ccopts
-D_BSD_TYPES -D_BSD_TIME -woff 1184,1552 -I/usr/gnu/include -DLANGUAGE_C  -I/usr/nekoware/lib/perl5/5.8.9/irix-n32/CORE

onyx:~/development/rxvt-unicode> /usr/nekoware/bin/perl -MExtUtils::Embed -e ldopts
-Wl,-rpath,/usr/nekoware/lib/perl5/5.8.9/irix-n32/CORE -Wl,-woff,84 -L/usr/nekoware/lib -Wl,-rpath -Wl,/usr/nekoware/lib -L/usr/local/lib -Wl,-rpath -Wl,/usr/local/lib -L/usr/gnu/lib -Wl,-rpath -Wl,/usr/gnu/lib  -L/usr/nekoware/lib/perl5/5.8.9/irix-n32/CORE -lperl -lm -lc


So it does look like it specifically and correctly points to the nekoware libraries for perl and not the system-wide ones.
It also appears that the nekoware libperl.so I have does have the symbol:

Code:
onyx:~/development/rxvt-unicode> grep -i PL_stack_base /usr/nekoware/lib/perl5/5.8.9/irix-n32/CORE/libperl.so
Binary file /usr/nekoware/lib/perl5/5.8.9/irix-n32/CORE/libperl.so matches


So in theory, if you grab the same version from nekoware it should work :)
jns wrote:
The patched source is here: http://linkerror.com/programs/rxvt-unicode-irix.tar.bz2
It can be compiled with following configure options:

Code:
./configure --disable-lastlog --disable-xim


I thought it would be fun to have a terminal that can display characters, so gave it a shot ... I get :

Code:
cc-1020 CC: ERROR File = rxvtimg.h, Line = 60
The identifier "RepeatNormal" is undefined.

rxvt_img (rxvt_screen *screen, XRenderPictFormat *format, int x, int y, int width, int height, int repeat = RepeatNormal);
^

and a lot of warnings. I don't envy you struggling with this thing !

_________________
waiting for flight 1203 ...
The c++ stuff I compiled with g++, which doesn't seem to fail on that part.
I'm not sure why g++ wouldn't fall over this, since RepeatNormal isn't defined in render.h on Irix,...and I don't see any precompiler statements that would only conditionally compile that line, or any other definitions of it.
In any event, normally RepeatNormal is defined in X11/extensions/render.h as:
Code:
#define RepeatNormal 1

You could try adding that to the header

[edit]
or pass it as a -D to CXXFLAGS
[/edit]
If it helps anyone trying to get this to compile, here is all the steps along with environment variables and output:

http://www.linkerror.com/stuff/urxvt-compile-log.txt
Ok, I figured out why I DIDN't get the RenderNormal error

As you can see in my above post, in the output of the configure script there is this line:

Code:
checking for pkg-config... /usr/people/john/pkg/bin/pkg-config


Before I had tried to manually patch rxvt-unicode I figured I would try the pkgsrc version, since I anticipated this being a pain, and there were some hints online that the netbsd folks were at least trying to put some effort in keeping irix compatibility in pkgsrc. (After patching and fixing bugs in a ton of pkgsrc packages I eventually gave up and realized it would be simpler to only have to patch rxvt-unicode)

The consequence of this is that it used the X11 headers from pkgsrc instead of those from nekoware:

Code:
onyx:~/pkg/include/X11/extensions> ~/pkg/bin/pkg-config --cflags xproto
-I/usr/people/john/pkg/include

onyx:~/pkg/include/X11/extensions> ~/pkg/bin/pkg-config --cflags renderproto
-I/usr/people/john/pkg/include

onyx:~/pkg/include/X11/extensions> grep -i repeatnormal ~/pkg/include/X11/extensions/*
/usr/people/john/pkg/include/X11/extensions/render.h:#define RepeatNormal


Bingo! :)

pkg-config gives no output for --libs on xproto and renderproto, so I think these are headers-only, so it might be safe to just grab the pkgsrc render.h for compiling rxvt-unicode.
I uploaded it for you guys here:

http://linkerror.com/stuff/render.h

After grabbing the file, the trick is going to be to make sure that version is used rather than the nekochan one,... you'll probably have to make sure the include path is listed before the nekochan path, so you might have to edit the configure script to inject it before the pkg-config output (or just do it the ugly hackidy way and add a define or a -DRepeatNormal cxxflag and hopefully that makes it happy : D)

...or if you want to completely re-create my environment, here's my entire ~/pkg folder ;) http://www.linkerror.com/stuff/pkg.tar.bz2 (5.3 MB)

hopefully that will save you the trouble from having to install pkgsrc and compiling a dozen or so dependancies.
jns wrote:
jirka wrote:
Ihave tried to run the urxvt. I have got some errors like this: 1628:urxvtd: rld: Error: unresolvable symbol in urxvtd: PL_stack_base


I used 5.8.9 from nekoware current

Code:
onyx:~> ldd `which urxvt`
libperl.so  =>    /usr/nekoware/lib/perl5/5.8.9/irix-n32/CORE/libperl.so




Thank you very much! I had the old Perl 5.8.8 for some reason. I have upgraded it to the current one (5.8.9) and now the urxvt works!

_________________
:O2: :Indy: :Indy:
jirka wrote:
jns wrote:
Thank you very much! I had the old Perl 5.8.8 for some reason. I have upgraded it to the current one (5.8.9) and now the urxvt works!


:-D Yay!