From owner-freebsd-questions Tue Jul 24 22:39:27 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mail17.messagelabs.com (mail17.messagelabs.com [62.231.131.67]) by hub.freebsd.org (Postfix) with SMTP id 9811B37B403 for ; Tue, 24 Jul 2001 22:39:21 -0700 (PDT) (envelope-from rdls@satamatics.com) X-VirusChecked: Checked Received: (qmail 31038 invoked from network); 25 Jul 2001 05:38:10 -0000 Received: from smtp-3.star.net.uk (212.125.75.72) by server-12.tower-17.messagelabs.com with SMTP; 25 Jul 2001 05:38:10 -0000 Received: (qmail 10109 invoked from network); 25 Jul 2001 05:39:14 -0000 Received: from unallocated.star.net.uk (HELO ns.hq.satamatics.net) (62.231.144.7) by smtp-3.star.net.uk with SMTP; 25 Jul 2001 05:39:14 -0000 Received: from matrix.satamatics.net (matrix.satamatics.net [10.24.1.1]) by ns.hq.satamatics.net (8.11.3/8.11.3) with ESMTP id f6P6ggu06577 for ; Wed, 25 Jul 2001 06:42:42 GMT (envelope-from rdls@satamatics.com) Subject: RE: applixware Date: Wed, 25 Jul 2001 06:38:49 +0100 Message-ID: <703AB71471B6024CB86D219058DB64FB02E148@matrix.satamatics.net> X-MS-Has-Attach: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-MS-TNEF-Correlator: Thread-Topic: applixware Thread-Index: AcEUwqAI0DFHPuGURnCYI7Pem6WhrAABoW0Q From: "Richard Smith" To: "Mike Meyer" content-class: urn:content-classes:message X-MimeOLE: Produced By Microsoft Exchange V6.0.4417.0 Cc: Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > -----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 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 > 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