LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   xv can't find X11 header files (https://www.linuxquestions.org/questions/linux-software-2/xv-cant-find-x11-header-files-24580/)

tunedLow 06-29-2002 02:09 AM

xv can't find X11 header files
 
My X11 header files are under /usr/X11R6/include/X11.

The makefile suggests the following:### In general, if your X11 include files and libX11.a library aren't in the
### 'standard' places in which the C compiler looks, you should add '-L' and
### '-I' options on the CCOPTS line to tell the compiler where said files are.

Although I don't understand how the -L and -I options work, I added:

CCOPTS = -O -L/usr/X11R6/include/X11-I/usr/X11R6/include/X11
- tried adding just one and not the other both ways.

The error I get when I run make is:

[root /usr/local/src/xv-3.10a]# make
cc -O -L/usr/X11R6/include/X11 -I/usr/X11R6/include/X11 -DDOJPEG -Ijpeg -DDOTIFF -Itiff -DDOPDS -DLINUX -L/usr/X11R6/include/X11 -c xv.c
In file included from xv.c:11:
xv.h:72: X11/Xos.h: No such file or directory
In file included from xv.c:11:
xv.h:174: X11/Xlib.h: No such file or directory
xv.h:175: X11/Xutil.h: No such file or directory
xv.h:176: X11/cursorfont.h: No such file or directory
xv.h:177: X11/keysym.h: No such file or directory
xv.h:178: X11/Intrinsic.h: No such file or directory
xv.h:179: X11/Xatom.h: No such file or directory
xv.h:180: X11/Xmd.h: No such file or directory
xv.c:20: X11/Xatom.h: No such file or directory
make: *** [xv.o] Error 1


So I looked at the xv.h file and there are include lines like #include <X11/Xos.h>

How can I change these? The closest thing I could find was in the Makefile - a line towards the end reads:
LIBS = -lX11 $(JPEGLIB) $(TIFFLIB) -lm

I tried changing the X11 to the entire path to my X11 headers to no avail.

Thanks!

neo77777 06-29-2002 03:06 AM

Quote:

My X11 header files are under /usr/X11R6/include/X11.
and according the header file' s include statement
#include<X11/Xos.h> etc.
So I suggest changing
CCOPTS = -O -L/usr/X11R6/include/X11-I/usr/X11R6/include/X11
to
CCOPTS = -O -L/usr/X11R6/include/-I/usr/X11R6/include/
try it and see what happens.

tunedLow 06-29-2002 04:02 AM

Thank you very much for your reply. That got the ball rolling, and it started to compile but then I run into more errors.

I don't know if you can help me any further but here it goes.

Under the options in the Makefile, there is a line to uncomment if you have a SysV machine. Which I believe mine is:

#----------System V----------

# if you are running on a SysV-based machine, such as HP, Silicon Graphics,
# Solaris, etc., uncomment the following line to get mostly there.
UNIX = -DSVR4


When that line is uncommented I get the following error:

[root /usr/local/src/xv-3.10a]# make
cc -O -L/usr/X11R6/include/ -I/usr/X11R6/include/ -DDOJPEG -Ijpeg -DDOPDS -DSVR4 -DLINUX -c xv.c
In file included from /usr/X11R6/include/X11/Xos.h:284,
from xv.h:72,
from xv.c:11:
/usr/X11R6/include/X11/Xarch.h:48: sys/byteorder.h: No such file or directory
make: *** [xv.o] Error 1

Unfortunately, I can't find a byteorder.h.


Now, if I leave the SysV line commented out, I get the following error:

[root /usr/local/src/xv-3.10a]# make
cc -O -L/usr/X11R6/include/ -I/usr/X11R6/include/ -DDOJPEG -Ijpeg -DLINUX -c xv.c
In file included from xv.c:11:
xv.h:119: conflicting types for `sys_errlist'
/usr/include/stdio.h:552: previous declaration of `sys_errlist'
make: *** [xv.o] Error 1


And here is the line from xv.h it seems to be complaining about:

/* note: 'string.h' or 'strings.h' is included by Xos.h, and it
guarantees index() and rindex() will be available */

#ifndef VMS
# include <errno.h>
extern int errno; /* SHOULD be in errno.h, but often isn't */
# ifndef __NetBSD__
extern char *sys_errlist[]; /* this too... */
# endif
#endif


Sigh. Thanks again for your help, any more would be appreciated.

CragStar 06-29-2002 07:30 AM

Try to do a search for byteorder.h in /usr by typing at the command line:

find /usr -name byteorder.h

It may be in a location not expected by the Makefile. Or you may need to install some dependencies, but they should be picked up in ./configure (you did run that before running make?).

neo77777 06-29-2002 11:03 AM

You see where is can't find sys/byteorder.h try modifying the /usr/X11R6/include/X11/Xarch.h file add #include <asm/byteorder.h>
and see what happens

tunedLow 06-29-2002 02:27 PM

Thank you both.

No, there was no configure, I was just supposed to edit the Makefile and run make. Err, I guess actually looking for byteorder.h might have helped! Sorry, I was really tired. Thanks CragStar.

In editing the Xarch.h file, there was an include that pointed to sys, and I changed it to asm and that fixed that problem, thanks neo.

However, once that was solved it just moved onto the next issue from my previous post:

[root /usr/local/src/xv-3.10a]# make
cc -O -L/usr/X11R6/include/ -I/usr/X11R6/include/ -DDOJPEG -Ijpeg -DSVR4 -DLINUX -c xv.c
In file included from xv.c:11:
xv.h:119: conflicting types for `sys_errlist'
/usr/include/stdio.h:552: previous declaration of `sys_errlist'
make: *** [xv.o] Error 1


I'll keep screwing with options in the make file.

Thanks again.

CragStar 06-30-2002 05:22 AM

Found this at ftp://ftp.trilon.com/pub/xv/xv-redhat6-readme.txt

First, in the header file xv.h lines 119-121 should be commented out,
otherwise you get an "already defined in stdio.h" error and compilation
aborts:

/* # ifndef __NetBSD__
extern char *sys_errlist[]; this too...
# endif */

CragStar 06-30-2002 05:23 AM

BTW if you do manage to get XV to compile can you let me know if it allows you to view png images? I can't seem to work out how (if it does) to get this working.

tunedLow 06-30-2002 01:59 PM

CragStar - thank you, that did it. I had commented out the entire line -doh! Nor did I have the lib path included in the linux specific option. It was nice to get this going after all the trouble I'm having installing qtella (can't find qtlibs but that's another post...)

I can't view .png images, it just gives me an error window that displays a bunch of memory addresses. However, the man doesn't list that type in its list of supported types.

Thanks again all.

CragStar 07-02-2002 01:21 PM

No probs, installing from source isn't that hard, you just need to do a little reading and ask qustions cus everybody is bound to have a similar problem. I actually had that error the first time I installed XV, sorry I couldn't help earlier.

I didn't think it could view .png, thanks for letting me know anyway.


All times are GMT -5. The time now is 11:51 PM.