LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 07-21-2017, 04:19 PM   #1
joakim12
Member
 
Registered: Nov 2003
Location: Estonia
Distribution: Ubuntu 18.04
Posts: 82

Rep: Reputation: 15
fatal error: X11/Xlib.h: No such file or directory


Hei.

I completed Xorg Libraries and started to compile Tk-8.6.6 and I got the following error:
Code:
gcc -c -O2  -pipe -m64  -Wall -fPIC -DBUILD_tk -I/home/lfs/BLFS/tk8.6.6/unix/../unix -I/home/lfs/BLFS/tk8.6.6/unix/../generic -I/home/lfs/BLFS/tk8.6.6/unix/../bitmaps -I/usr/include/generic -I/usr/include/unix  -DPACKAGE_NAME=\"tk\" -DPACKAGE_TARNAME=\"tk\" -DPACKAGE_VERSION=\"8.6\" -DPACKAGE_STRING=\"tk\ 8.6\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DHAVE_PTHREAD_ATTR_SETSTACKSIZE=1 -DHAVE_PTHREAD_ATFORK=1 -DTCL_THREADS=1 -DMODULE_SCOPE=extern\ __attribute__\(\(__visibility__\(\"hidden\"\)\)\) -DHAVE_HIDDEN=1 -DTCL_CFG_DO64BIT=1 -DHAVE_CAST_TO_UNION=1 -DTCL_SHLIB_EXT=\".so\" -DNDEBUG=1 -DTCL_CFG_OPTIMIZED=1 -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_IS_LONG=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_INTPTR_T=1 -DHAVE_UINTPTR_T=1 -DHAVE_PW_GECOS=1 -DXKEYCODETOKEYSYM_IS_DEPRECATED=1      -DTCL_NO_DEPRECATED  -DUSE_TCL_STUBS /home/lfs/BLFS/tk8.6.6/unix/../generic/tkStubLib.c
In file included from /home/lfs/BLFS/tk8.6.6/unix/../generic/tkPort.h:21:0,
                 from /home/lfs/BLFS/tk8.6.6/unix/../generic/tkInt.h:19,
                 from /home/lfs/BLFS/tk8.6.6/unix/../generic/tkStubLib.c:14:
/home/lfs/BLFS/tk8.6.6/unix/../generic/tk.h:96:25: fatal error: X11/Xlib.h: No such file or directory
 #   include <X11/Xlib.h>
                         ^
compilation terminated.
make: *** [Makefile:1160: tkStubLib.o] Error 1
lfs:~/BLFS/tk8.6.6/unix$
I tried the the solution from FAQ, but I do not have X11R6 directory so it doesn't work. Xorg Libraries compilation went without problems.
 
Old 07-21-2017, 07:07 PM   #2
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
command line add
Code:
-lX11
Code:
gcc -c -O2  -pipe -m64 -lX11 -Wall
 
Old 07-21-2017, 07:20 PM   #3
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Quote:
Originally Posted by BW-userx View Post
command line add
Code:
-lX11
Code:
gcc -c -O2  -pipe -m64 -lX11 -Wall
thiz is not a link problem it cant find the include file so that wont work.
where have you installed xorg? looks like none of the include dircetives are pointing to the right place.
more info please
what is ghe op from the version script, what host are you using are you buikding in a vm are you buikding in a chroot
 
Old 07-21-2017, 07:24 PM   #4
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by Keith Hedger View Post
thiz is not a link problem it cant find the include file so that wont work.
where have you installed xorg? looks like none of the include dircetives are pointing to the right place.
more info please
what is ghe op from the version script, what host are you using are you buikding in a vm are you buikding in a chroot
that is what I did to correct that no x11.h it worked for me.

or make sure that libx11-dev is installed.

Last edited by BW-userx; 07-21-2017 at 07:30 PM.
 
Old 07-21-2017, 07:34 PM   #5
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
there iz no such thing as libx11-dev on lfs, everythkng on b/lfs is compiled from source
 
Old 07-21-2017, 07:41 PM   #6
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
that not what he says
https://stackoverflow.com/questions/...ound-in-ubuntu
 
Old 07-21-2017, 07:55 PM   #7
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
that link is about UBUNTU this is LFS please stop posting fixes for debian based distros those solutions will NOT work with lfs as it doesn't use apt
 
Old 07-22-2017, 02:04 AM   #8
Terry Coats
Member
 
Registered: Mar 2017
Posts: 122

Rep: Reputation: 54
My tk8.6.6 source here shows an Xlib.h. Maybe that's what it's looking for.
Code:
/sources/blfs/sources/xc/tk8.6.6/xlib/X11/Xlib.h
 
Old 07-22-2017, 06:30 AM   #9
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
no that is not the file its looking for and cant find, please post the answers to my previous post so we can help you better
 
Old 07-22-2017, 06:52 AM   #10
joakim12
Member
 
Registered: Nov 2003
Location: Estonia
Distribution: Ubuntu 18.04
Posts: 82

Original Poster
Rep: Reputation: 15
I installed Xorg to /usr
I booted up LFS and install form there.
The command: find /usr -iname Xlib.h
shows nothing.
 
Old 07-22-2017, 07:44 AM   #11
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Then somthing went wrong with the install of the xlibs the file you need should be at /usr/include/X11/Xlib.h, try
Code:
stat /usr/include/X11/Xlib.h
You should get somthing like this
Code:
  File: /usr/include/X11/Xlib.h
  Size: 99532     	Blocks: 208        IO Block: 4096   regular file
Device: 80ah/2058d	Inode: 185980      Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2017-07-21 20:16:14.890997193 +0100
Modify: 2017-07-09 20:46:14.000000000 +0100
Change: 2017-07-09 20:53:50.000000000 +0100
 Birth: -
If not you need to revisit installing the x librarys
 
Old 07-22-2017, 08:21 AM   #12
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
see it is a, do you have them installed, problem?

I was right after all.

anyways ... moving forward. ... :

Last edited by BW-userx; 07-22-2017 at 08:22 AM.
 
Old 07-22-2017, 08:56 AM   #13
joakim12
Member
 
Registered: Nov 2003
Location: Estonia
Distribution: Ubuntu 18.04
Posts: 82

Original Poster
Rep: Reputation: 15
I figured out my problem. I did not have "Setting up the Xorg Build Environment" set up correctly. Now it works.

Thank you.
 
  


Reply



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
[SOLVED] Centos 7 grabclient.c:32:55: fatal error: X11/Intrinsic.h: No such file or directory Ztcoracat CentOS 15 10-07-2015 04:09 PM
NS2.35 installation in Ubuntu 12.10 -error: X11/Xlib.h: No such file or directory nemesis98 Linux - Networking 2 01-18-2015 04:32 PM
error: X11/Xlib.h: No such file or directory mswamy78 Linux - Newbie 5 08-02-2011 05:16 AM
installing qmake X11/Xlib.h: No such file or directory eolmsan Linux - Newbie 3 12-01-2008 04:09 AM
error while trying to install program: "X11/Xlib.h: No such file or directory" nate1 Linux - Newbie 3 05-21-2004 08:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 06:23 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
Open Source Consulting | Domain Registration