LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-29-2002, 03:09 AM   #1
tunedLow
Member
 
Registered: Sep 2001
Location: Salt Lake City
Distribution: Slackware 8.1
Posts: 133

Rep: Reputation: 15
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!
 
Old 06-29-2002, 04:06 AM   #2
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
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.
 
Old 06-29-2002, 05:02 AM   #3
tunedLow
Member
 
Registered: Sep 2001
Location: Salt Lake City
Distribution: Slackware 8.1
Posts: 133

Original Poster
Rep: Reputation: 15
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.
 
Old 06-29-2002, 08:30 AM   #4
CragStar
Senior Member
 
Registered: Oct 2000
Location: UK - Frome
Distribution: Ubuntu
Posts: 1,081

Rep: Reputation: 47
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?).
 
Old 06-29-2002, 12:03 PM   #5
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
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
 
Old 06-29-2002, 03:27 PM   #6
tunedLow
Member
 
Registered: Sep 2001
Location: Salt Lake City
Distribution: Slackware 8.1
Posts: 133

Original Poster
Rep: Reputation: 15
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.

Last edited by tunedLow; 06-29-2002 at 05:00 PM.
 
Old 06-30-2002, 06:22 AM   #7
CragStar
Senior Member
 
Registered: Oct 2000
Location: UK - Frome
Distribution: Ubuntu
Posts: 1,081

Rep: Reputation: 47
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 */
 
Old 06-30-2002, 06:23 AM   #8
CragStar
Senior Member
 
Registered: Oct 2000
Location: UK - Frome
Distribution: Ubuntu
Posts: 1,081

Rep: Reputation: 47
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.
 
Old 06-30-2002, 02:59 PM   #9
tunedLow
Member
 
Registered: Sep 2001
Location: Salt Lake City
Distribution: Slackware 8.1
Posts: 133

Original Poster
Rep: Reputation: 15
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.
 
Old 07-02-2002, 02:21 PM   #10
CragStar
Senior Member
 
Registered: Oct 2000
Location: UK - Frome
Distribution: Ubuntu
Posts: 1,081

Rep: Reputation: 47
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
php5 ./configure error: Cannot find MySQL header files ldp Linux - Software 28 08-26-2011 01:25 PM
Kernel header (include) files - where do i find these walkerx Mandriva 2 04-17-2005 09:19 AM
how to find the header files in c compiler ss100 Linux - Software 2 12-13-2004 12:04 AM
vmware error, cant find c header files artofluke Slackware 9 09-02-2003 08:35 AM
Where can I find C++ prgrams and header files? Travis86 Programming 11 03-31-2003 10:08 PM


All times are GMT -5. The time now is 10:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration