Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Jul 2001 06:38:49 +0100
From:      "Richard Smith" <rdls@satamatics.com>
To:        "Mike Meyer" <mwm@mired.org>
Cc:        <questions@freebsd.org>
Subject:   RE: applixware
Message-ID:  <703AB71471B6024CB86D219058DB64FB02E148@matrix.satamatics.net>

next in thread | raw e-mail | index | archive | help
> -----Original Message-----
> From: Mike Meyer [mailto:mwm@mired.org]
> Sent: 25 July 2001 05:31
> To: Richard Smith
> Cc: questions@freebsd.org
> Subject: Re: applixware
>=20
>=20
> Richard Smith <rdls@satamatics.com> types:
> > On Tue, Jul 24, 2001 at 01:13:19AM -0700, zer0700@excite.com wrote:
> > > after installing a fresh copy of 4.3 release and the=20
> applixware 5.0 suite
> > > that came with my copy of 4.1 release, i get this error:
> > >=20
> > > $applix
> > > /usr/libexec/ld-elf.so.1: /usr/X11R6/lib/libgtk12.so.2:=20
> Undefined symbol
> > > "getresuid"
> > > axnet error, axmain already started.
> > The simplest solution I've found (here, I think) is as follows:
> > Create the file `getresuid.c' containing the offending symbol:
> >     void getresuid(void){}
> > Install it somewhere with:
> > 	# cc -shared -fPIC -DPIC -o /usr/local/lib/getresuid.so=20
> getresuid.c
> > Then start applix with this script:
> > 	#!/bin/sh -
> > 	export LD_PRELOAD=3D/usr/local/lib/getresuid.so
> > 	applix $*
>=20
> However, gtk is expecting a return value from getresuid, and you're
> not seting one, so you are returning garbage. Should that garbage
> happen to be 0, applix will fail looking for getresgid. The easy fix
> is to provide a return value indicating failure - 1 - which will make
> gtk use the same method it uses if you don't have getresuid. I also
> plugged in the proper argument decelerations, because I can't stand
> sloppy code:

Cheek :-) I must admit that I thought I was fixing up a linker problem,=20
I didn't much care that the function was actually being called. The=20
instructions which I read here somewhere (or was it on -stable :-/),=20
simply said "make yourself a getresuid.so", so I did.

=20
> #include <sys/types.h>
> int getresuid(uid_t *a, uid_t *b, uid_t *c) { return 1; }

Pretty, but:

    int getresuid(uid_t *, uid_t *, uid_t *) { return 1; }

would be better. I don't like sloppy code either ;-)


> On the shell script - /usr/local/bin/applix is a shell script that
> sets one environment variable and starts the binary, so I just fixed

Good idea.


> it. It also passes it's arguments to the binary with "$@" instead $*
> (yes, you want the quotes in it). That way, if someone says "applix
> '~/docs/my current resume'", it will invoke applix with one argument
> instead of three.

I been caught by that one before.

--
Richard Smith
Network Systems Director
Satamatics Ltd
Green Lane, Tewkesbury, GL20 8HD, United Kingdom
Tel: +44 1684 278610
Fax: +44 1684 278611

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?703AB71471B6024CB86D219058DB64FB02E148>