LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 05-13-2019, 09:32 AM   #1
coltson
Member
 
Registered: Oct 2010
Posts: 149

Rep: Reputation: 3
Floating point exception when compiling libX11 1.0


Hello, I was trying to compile lib X11 1.0.0 when this error came up during the compilation:

Quote:
make[2]: Leaving directory `/media/34GB/Arquivos-de-Programas-Linux/libX11-1.0.0/src/util'
../src/util/makekeys < /media/34GB/Arquivos-de-Programas-Linux/Xorgproto-2018.1/include/X11/keysymdef.h > ks_tables_h
/bin/bash: line 1: 10799 Floating point exception../src/util/makekeys < /media/34GB/Arquivos-de-Programas-Linux/Xorgproto-2018.1/include/X11/keysymdef.h > ks_tables_h
make[1]: *** [ks_tables.h] Error 136
make[1]: Leaving directory `/media/34GB/Arquivos-de-Programas-Linux/libX11-1.0.0/src'
make: *** [all-recursive] Error 1
leopoldo@leopoldo-desktop:/media/34GB/backup/Arquivos-de-Programas-Linux/libX11-1.0.0$ gedit src/util/makekeys /media/34GB/Arquivos-de-Programas-Linux/Xorgproto-2018.1/include/X11/keysymdef.h
Suggestions on how I can fix it?
 
Old 05-14-2019, 01:51 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,879

Rep: Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317
http://www.catb.org/esr/faqs/smart-q...html#beprecise
 
Old 05-14-2019, 06:40 PM   #3
coltson
Member
 
Registered: Oct 2010
Posts: 149

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by pan64 View Post
Some extra data that might be useful, although I believe almost the relevant information is contained in the first post.

Configure command:
Code:
./configure PKG_CONFIG_PATH=/media/34GB/Arquivos-de-Programas-Linux/Xorgproto-2018.1/share/pkgconfig/:/media/34GB/Arquivos-de-Programas-Linux/Xau-1.0.3/lib/pkgconfig/:/media/34GB/Arquivos-de-Programas-Linux/Xtrans-1.0.0/lib/pkgconfig/:/media/34GB/Arquivos-de-Programas-Linux/Xdmcp-1.0.0/lib/pkgconfig/
Final info provided by the configure command:
Quote:
X11 will be built with the following settings:
Loadable i18n module support: no
Loadable xcursor library support: yes
Threading support: yes
Use Threads safe API: yes
Threads stubs in libX11: no
XCMS: yes
Internationalization support: yes
XF86BigFont support: yes
XKB support: yes
XLOCALEDIR environment variable support: yes
Manual pages installed:
Ubuntu 10.04

I opened the file keysymdef.h, all there is there is a bunch of
Code:
#define
with a bunch of hexadecimal values. The makekeys file int the error message is a binary file. The ks_tables_h is an empty text file.
 
Old 05-15-2019, 12:26 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,879

Rep: Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317
where is this makekeys coming from?
 
Old 05-16-2019, 03:26 AM   #5
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616

Rep: Reputation: 167Reputation: 167
The current version of libX11 is 1.6.7, perhaps you should start with a package newer than one released in 2006.
 
Old 05-16-2019, 03:48 AM   #6
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616

Rep: Reputation: 167Reputation: 167
Quote:
Originally Posted by pan64 View Post
where is this makekeys coming from?
Its part of the package in ./src/utils, according to it's C source comments...

Code:
/* Constructs hash tables for XStringToKeysym and XKeysymToString. */
But, if he's using the 1.0 version of the package, it starts like this...

Code:
#include <X11/X.h>
#include <X11/Xos.h>
#include <X11/keysymdef.h>
#include <stdio.h>
#include <stdlib.h>
#if defined(macII) && !defined(__STDC__)  /* stdlib.h fails to define these */
char *malloc();
#endif /* macII */

typedef unsigned long Signature;

#define KTNUM 3000
Whereas, the current version looks like this...

Code:
#include <X11/X.h>
#include <X11/Xos.h>
#include <X11/Xresource.h>
#include <X11/keysymdef.h>
#include <stdio.h>
#include <stdlib.h>

#include "../Xresinternal.h"

#define KTNUM 4000
1.0 is so old there's still ifdefs in there for Mac OS9- , is it any wonder it isn't handling some numeric types properly? I suspect this person is trying to compile on 64 bits as well.

Last edited by Luridis; 05-16-2019 at 03:56 AM.
 
Old 05-16-2019, 05:35 AM   #7
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,879

Rep: Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317
looks like that makekeys is a text file (shell script). Can you post the first few lines of it?
 
Old 05-21-2019, 12:51 PM   #8
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616

Rep: Reputation: 167Reputation: 167
Quote:
Originally Posted by pan64 View Post
looks like that makekeys is a text file (shell script). Can you post the first few lines of it?
It is not, as I noted before, it appears to be a made on the fly utility that is part of the build tree. It is in <libX11-source>/src/utils/makekeys.c. This person's problem is that they are trying to build a 16 year old version of the package (1.0.0), when the current iteration is 1.6.7. Like I said before, there are still #ifdefs in there for Mac OS9 and lower. Likely that version of the source is using numeric types for x686 and probably doesn't have the #defines and macros to handle being built on AMD64, hence the floating point exception. That's without mentioning that the person is trying to use the proto headers from 2018 with it, which would likely cause further breakage in the build even if that utility didn't puke after it was compiled. There's been something like 750,000 lines removed from xorg in the last decade...

Last edited by Luridis; 05-21-2019 at 12:54 PM.
 
Old 05-25-2019, 06:07 PM   #9
coltson
Member
 
Registered: Oct 2010
Posts: 149

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by Luridis View Post
It is not, as I noted before, it appears to be a made on the fly utility that is part of the build tree. It is in <libX11-source>/src/utils/makekeys.c. This person's problem is that they are trying to build a 16 year old version of the package (1.0.0), when the current iteration is 1.6.7. Like I said before, there are still #ifdefs in there for Mac OS9 and lower. Likely that version of the source is using numeric types for x686 and probably doesn't have the #defines and macros to handle being built on AMD64, hence the floating point exception. That's without mentioning that the person is trying to use the proto headers from 2018 with it, which would likely cause further breakage in the build even if that utility didn't puke after it was compiled. There's been something like 750,000 lines removed from xorg in the last decade...
Your advice is then to compile a more modern version of libX11? I was trying to avoid to do so, because I already compiled several libraries that libX11 needs (Xau, Xdmcp, Xtrans). The modern xorgproto headers is because I did not find an older version when starting all this process. Then someone on unix stack exchange gave me the link to it. After that I found an older version of proto, however I think it alone did not provide all the files, unlike xorgproto.

Btw, I thought this floating point stuff was low level stuff related to assembly that only few software needs to use. Curious to know why libX11 needs it

P.S: Tried to configure the newer libX11 and this came up:

Quote:
checking keysym definitions... configure: error: /X11 doesn't exist or isn't a directory
Where can I find (in which package) the definitions of keysym?

Last edited by coltson; 05-25-2019 at 07:07 PM. Reason: forgot info
 
Old 05-26-2019, 12:01 AM   #10
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616

Rep: Reputation: 167Reputation: 167
Quote:
Originally Posted by coltson View Post
Your advice is then to compile a more modern version of libX11? I was trying to avoid to do so, because I already compiled several libraries that libX11 needs (Xau, Xdmcp, Xtrans).
Libraries get update for reasons. Notably, the dependencies change. For instance, the version of glibc that was in use when libX11 1.0.0 was released was 2.3.6. The current glibc is up to 2.29. So, I'm surprised you got as far as you did. Starting over should not take that long. I can compile the entire xorg stack, including wayland, the font libraries, cairo & mesa in under an hour on an Ivy Bridge laptop...

Quote:
The modern xorgproto headers is because I did not find an older version when starting all this process. Then someone on unix stack exchange gave me the link to it. After that I found an older version of proto, however I think it alone did not provide all the files, unlike xorgproto.
That's because, prior to the 2018 release you have downloaded, the X.org protocol headers were packaged individually. You're probably missing some other things like util-macros as well.

Quote:
Btw, I thought this floating point stuff was low level stuff related to assembly that only few software needs to use. Curious to know why libX11 needs it
All software is related to machine language (ML), which is the only thing your CPU understands. Everything above that, from assembly to BASIC ends up as ML through some form of translation. As to why it needs floating point numbers, perhaps it is because it is trying to setup a hash table, as was noted in the comment I quoted from the source code. Aside from that, can you seriously not think of any other reasons a graphics library might have some need for irrational numbers?

Quote:
P.S: Tried to configure the newer libX11 and this came up:
...
Where can I find (in which package) the definitions of keysym?
At a quick glance, and that's all I can do because your error description is extremely terse, keysym.h appears to be generated by an internal hash utility called makekeys.c, which failed to compile in your previous atttempt.

Is this your first attempt to compile something from scratch? If so, you might want to begin with something less complex than X.org.

Last edited by Luridis; 05-26-2019 at 12:03 AM.
 
Old 05-26-2019, 04:06 AM   #11
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,879

Rep: Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317Reputation: 7317
(or just try to focus on that FPE, probably there is a solution for that).
 
Old 05-28-2019, 05:43 PM   #12
coltson
Member
 
Registered: Oct 2010
Posts: 149

Original Poster
Rep: Reputation: 3
Thanks Luridis

Quote:
Originally Posted by Luridis View Post
At a quick glance, and that's all I can do because your error description is extremely terse, keysym.h appears to be generated by an internal hash utility called makekeys.c, which failed to compile in your previous atttempt.

Is this your first attempt to compile something from scratch? If so, you might want to begin with something less complex than X.org.
So no idea how to solve it. If not, I think I will choose random versions of X11 until I can find one that compiles.

And no, I already compiled dozens of packages.


Quote:
(or just try to focus on that FPE, probably there is a solution for that).
Sorry, I am not familiar with the term. What FPE stands for Pan ?



******EDITED******

Tried different version of X11 (slight newer). configure complains about a package called "xcb-xlib" that I did not compile so far.

I did not find one with the precise name, found one called libxcb, configured it, tried to compile it only to receive:

Quote:
gcc -DHAVE_CONFIG_H -I. -I. -I. -Wall -pedantic -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wnested-externs -I/media/34GB/Arquivos-de-Programas-Linux/LibXau-1.0.3//include -I/media/34GB/Arquivos-de-Programas-Linux/Xorgproto-2018.1/include -g -O2 -MT xcb_auth.lo -MD -MP -MF .deps/xcb_auth.Tpo -c xcb_auth.c -fPIC -DPIC -o .libs/xcb_auth.o
xcb_auth.c:29:23: error: X11/Xauth.h: No such file or directory
xcb_auth.c:82: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
xcb_auth.c:155: error: expected declaration specifiers or '...' before 'Xauth'
xcb_auth.c: In function 'compute_auth':
xcb_auth.c:157: error: 'authptr' undeclared (first use in this function)
xcb_auth.c:157: error: (Each undeclared identifier is reported only once
xcb_auth.c:157: error: for each function it appears in.)
xcb_auth.c: In function '_xcb_get_auth_info':
xcb_auth.c:238: error: 'Xauth' undeclared (first use in this function)
xcb_auth.c:238: error: 'authptr' undeclared (first use in this function)
xcb_auth.c:239: warning: ISO C90 forbids mixed declarations and code
xcb_auth.c:244: warning: implicit declaration of function 'get_authptr'
xcb_auth.c:244: warning: nested extern declaration of 'get_authptr'
xcb_auth.c:250: error: too many arguments to function 'compute_auth'
xcb_auth.c:257: warning: implicit declaration of function 'XauDisposeAuth'
xcb_auth.c:257: warning: nested extern declaration of 'XauDisposeAuth'
make[2]: *** [xcb_auth.lo] Error 1
make[2]: Leaving directory `/media/34GB/Arquivos-de-Programas-Linux/libxcb-1.0/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/media/34GB/Arquivos-de-Programas-Linux/libxcb-1.0/src'
make: *** [all-recursive] Error 1
Apparently all these errors are caused by the lack of Xauth.h? Anyone knows in what package it shall be? If not, may be better to try another version?

Last edited by coltson; 05-28-2019 at 06:32 PM. Reason: new information
 
Old 05-28-2019, 07:36 PM   #13
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616

Rep: Reputation: 167Reputation: 167
Remove anything related to X11 you have installed so far, look in these directories:

/lib
/usr/lib
/usr/local/lib
/usr/include
/usr/local/include

Do not remove everything in those directories, just the X11 stuff.

Follow these directions, using the versions listed in the book. You'll need to have already installed FreeType and FontConfig. If it complains about missing headers for anything, you made need to use your package manager to get a <package>-development supplement to pull down the headers.

http://www.linuxfromscratch.org/blfs...nstalling.html

Additionally, there are other dependencies... The build order for my Asus Laptop looks like this:

Code:
freetype, fontconfig, wayland, wayland-protocols, util-macros, x11-proto,
libxau, libxdmcp, xcb-proto, libxcb*, x11-libs(20+ in book), xcb-util, xcb-image,
xcb-keysyms, xcb-renderutil, xcb-wm, xcb-cursor
::

pixman, cairo, pyxdg(2&3), mako(py3 only), libdrm, libva, libvdpau, mesa,
graphite2, harfbuzz, fribidi, +freetype, +libva, intel-vaapi-driver, +cairo,
libepoxy
::

mtdev, libevdev, libinput, xbitmaps, x11-apps(20+ in book), xcursor-themes,
x11-fonts(9+ in book, unless you need legacy fonts), xkeyboard-config,
libxkbcommon, x11-server, xf86-input-libinput, xf86-video-fbdev,
xf86-video-<YOURcard>, xterm, xclock, xinit, x11-twm, +systemd, +dbus
The + before packages indicate rebuilds due to circular dependencies. That's the x11 + wayland stack, you'll need that whole thing if you plan to move on to building GTK, QT, browsers, multimedia, etc. i.e. It's not just a couple of libraries and startx (xorg-xinit). There's a lot to it.

Last edited by Luridis; 05-28-2019 at 07:48 PM.
 
Old 05-31-2019, 06:05 PM   #14
coltson
Member
 
Registered: Oct 2010
Posts: 149

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by Luridis View Post
Remove anything related to X11 you have installed so far, look in these directories:

/lib
/usr/lib
/usr/local/lib
/usr/include
/usr/local/include

Do not remove everything in those directories, just the X11 stuff.
There is nothing there, I do not work with Linux dir system. Everything goes to auto contained directories in /media/34GB/Arquivos-de-Programas


Quote:
Follow these directions, using the versions listed in the book. You'll need to have already installed FreeType and FontConfig. If it complains about missing headers for anything, you made need to use your package manager to get a <package>-development supplement to pull down the headers.
Well, I already these two (compiled from the source)

Quote:
http://www.linuxfromscratch.org/blfs...nstalling.html

Additionally, there are other dependencies... The build order for my Asus Laptop looks like this:

Code:
freetype, fontconfig, wayland, wayland-protocols, util-macros, x11-proto,
libxau, libxdmcp, xcb-proto, libxcb*, x11-libs(20+ in book), xcb-util, xcb-image,
xcb-keysyms, xcb-renderutil, xcb-wm, xcb-cursor
::

pixman, cairo, pyxdg(2&3), mako(py3 only), libdrm, libva, libvdpau, mesa,
graphite2, harfbuzz, fribidi, +freetype, +libva, intel-vaapi-driver, +cairo,
libepoxy
::

mtdev, libevdev, libinput, xbitmaps, x11-apps(20+ in book), xcursor-themes,
x11-fonts(9+ in book, unless you need legacy fonts), xkeyboard-config,
libxkbcommon, x11-server, xf86-input-libinput, xf86-video-fbdev,
xf86-video-<YOURcard>, xterm, xclock, xinit, x11-twm, +systemd, +dbus
The + before packages indicate rebuilds due to circular dependencies. That's the x11 + wayland stack, you'll need that whole thing if you plan to move on to building GTK, QT, browsers, multimedia, etc. i.e. It's not just a couple of libraries and startx (xorg-xinit). There's a lot to it.
Well, that seems an overkill. I am sure I won't need all of it.

However in your link it is said that the required libXau version for compiling libxcb 1.13.1 is 1.0.9. I had 1.0.3 installed. Looking for the file
Quote:
Xauth.h
I could see that it was not present in my system. Installed it and it become present. Then I was able to install libxcb. Will go back to libX11 now.
 
Old 05-31-2019, 11:33 PM   #15
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616

Rep: Reputation: 167Reputation: 167
Quote:
Originally Posted by coltson View Post
There is nothing there, I do not work with Linux dir system. Everything goes to auto contained directories in /media/34GB/Arquivos-de-Programas
So, you're already doing something outside of the normal setup. That's okay, but you should probably understand how it works in a normal setup before trying to modify it for something customized.

Quote:
Well, I already these two (compiled from the source)
What you have already done is irrelevant if it doesn't allow you to move forward.

Quote:
Well, that seems an overkill. I am sure I won't need all of it.
Seems? Your feelings about it are also irrelevant. I'm going to assume that because you're trying to build libX11 that the end goal is to build xorg-server. Building libX11 by itself makes little sense, because the library is useless without the server itself. That said, building a functionally useful xorg-server requires most, if not all of what is shown in that list, except for maybe the Wayland stuff. Follow this link and look at the packages listed as required dependencies. Then follow the links to those dependencies and see that they too have dependencies. That's why I referred to X11 as a software stack. It is not just one or two packages to build before it is ready to use.

Quote:
However in your link it is said that the required libXau version for compiling libxcb 1.13.1 is 1.0.9. I had 1.0.3 installed. Looking for the file I could see that it was not present in my system. Installed it and it become present. Then I was able to install libxcb. Will go back to libX11 now.
That is why I told you to use the latest versions. There have been lots of changes since the versions you chose to download. If you start by grabbing all the latest versions you'll side step a huge number of potential issues, including packages that may not compile at all in 2019.
 
  


Reply

Tags
compile error, libx11, xorglibs, xproto



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
Floating point exception compiling on Mandriva, run on Debian digdas Linux - Distributions 3 04-24-2007 11:18 AM
LILO 'Floating point Exception' error? fallout Slackware 17 07-27-2006 01:03 PM
Floating point exception error while starting parted drdosman Linux - Software 1 10-27-2004 11:11 AM
Depmod -> floating point exception Wynd Linux - General 0 06-26-2004 08:21 PM
[Kingpin] Floating Point Exception SiQDiZ Linux - Games 1 06-14-2004 02:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:08 PM.

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