Subject: Re: xv compilation on Solaris 2.2

From: [email-masked] (Paul Pomes - UofIllinois CCSO)
Date: 16 Sep 1993 04:31:19 GMT

[email-masked] (James A de Haseth) writes:

>I have tried to compile xv on a SPARC Classic running Solaris 2.2. 
>The problem is that some symbols are undefined, and I am used
>to seeing these in the ucb libraries.

What goes around, comes around.

From: [email-masked] (Bob Friesenhahn)
Date: Mon, 26 Jul 1993 20:52:16 GMT
Newsgroup: comp.unix.solaris
Message-Id: <[email-masked]>
Subject: Re: XV compiled for Solaris 2.1?

In article <[email-masked]>, [email-masked] (Scott King) writes:
|> Has anyone had any luck compiling xv for Solaris 2.1.  When I try to compile
|> it, everything goes fine until I get to the last step when I get the
|> following error:
|> 
|> Undefined                       first referenced
|>  symbol                             in file
|>  sigblock                            xvmisc.o
|> 
|> Does anyone know how I can get this to work?  

Make sure that these definitions occur in your xv.h file and
define SVR4 for Solaris:

/* signal macros */
#if defined(SVR4) && !defined(HPUX7) && !(defined(_AUX_SOURCE))
#define HOLD_SIG         sighold(SIGALRM)  /* block ALRM sig from occurring */
#define RELEASE_SIG      sigrelse(SIGALRM)
#define PAUSE_SIG        sigpause(SIGALRM) /* sleep until ALRM signal */
#else
#define HOLD_SIG         sigblock(sigmask(SIGALRM))
#define RELEASE_SIG      sigblock(0)
#define PAUSE_SIG        sigpause(0)
#endif

This is what I use in the Makefile:
# Solaris Open Windows config:
CCOPTS = -DSVR4 -DSOLARIS -O2 -funroll-loops -L/usr/openwin/lib -R/usr/openwin/lib -I/usr/openwin/include

I cheat and claim that I do have the random function.  I then use GNU's liberty.a
library (supplied with GDB & libg++) as follows:

LIBS = -lX11 $(LIBJPEG) $(LIBTIFF) -lm -liberty -lnsl

BTFW that if you choose to use usleep(), you will have to modify the code
since usleep takes a different size argument than the xv source assumes.

Hope this helps,

Bob
-- 
Bob Friesenhahn, Interphase
[email-masked]
-- 
The only thing that will be remembered about my enemies after they're
dead is the nasty things I've said about them.	--Camille Paglia

---

From: [email-masked] (Bob Friesenhahn)
Date: Fri, 17 Sep 1993 23:40:49 GMT

In article [email-masked], [email-masked] (Paul Pomes - UofIllinois CCSO) writes:
> |> Does anyone know how I can get this to work?  > 

> CCOPTS = -DSVR4 -DSOLARIS -O2 -funroll-loops -L/usr/openwin/lib -R/usr/openwin/lib -I/usr/openwin/include

I'd like to add that when I added the -mv8 option to the CCOPTS line when
using gcc (on SPARCclassic or LX), xv performed measurably faster.

Also, retrieve the xv patches from export.lcs.mit.edu in the contrib directory.
The patch "xv-3.00.j1.unofficial.patch" leads to very significant speedups displaying
JPEG pictures on 8 bit displays.

Bob
---