Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 766354

Summary: x11-libs/libXt fails to build on gcc-config[-native-symlinks]: configure: error: x86_64-pc-linux-gnu-gcc -m32 -E defines unix with or without -undef. I don't know what to do.
Product: Gentoo Linux Reporter: Sergei Trofimovich (RETIRED) <slyfox>
Component: Current packagesAssignee: Gentoo X packagers <x11>
Status: RESOLVED FIXED    
Severity: normal Keywords: PATCH
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 243502    

Description Sergei Trofimovich (RETIRED) gentoo-dev 2021-01-21 07:32:09 UTC
Build failure:

```
checking for i686-pc-linux-gnu-cpp... no
checking for cpp... no
checking if x86_64-pc-linux-gnu-gcc -m32 -E requires -undef... x86_64-pc-linux-gnu-gcc: fatal error: no input files
compilation terminated.
x86_64-pc-linux-gnu-gcc: fatal error: no input files
compilation terminated.
x86_64-pc-linux-gnu-gcc: fatal error: no input files
compilation terminated.
configure: error: x86_64-pc-linux-gnu-gcc -m32 -E defines unix with or without -undef.  I don't know what to do.
```

https://cgit.freedesktop.org/xorg/util/macros/commit/?id=bd66ce3ba4a9d1d1490cb5775a2fdd0b408879b6 should fix it, but it needs ./configure regeneration.
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2021-01-21 07:37:06 UTC
The following seems to be enough to build a library and pass tests:

--- a/x11-libs/libXt/libXt-1.2.0.ebuild
+++ b/x11-libs/libXt/libXt-1.2.0.ebuild
@@ -5,7 +5,7 @@ EAPI=7

 XORG_DOC=doc
 XORG_MULTILIB=yes
-inherit xorg-3
+inherit toolchain-funcs xorg-3

 DESCRIPTION="X.Org X Toolkit Intrinsics library"

@@ -29,3 +29,10 @@ pkg_setup() {
                --without-fop
        )
 }
+
+src_prepare() {
+       xorg-3_src_prepare
+
+       # bug #766354
+       export CPP=$(tc-getPROG CPP cpp)
+}
Comment 2 Larry the Git Cow gentoo-dev 2021-01-24 14:51:34 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cfae04837c12839f82daa604806e451dbc775427

commit cfae04837c12839f82daa604806e451dbc775427
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2021-01-24 14:48:05 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2021-01-24 14:51:11 +0000

    x11-libs/libXt: Version bump to 1.2.1
    
    Closes: https://bugs.gentoo.org/766354
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 x11-libs/libXt/Manifest           |  1 +
 x11-libs/libXt/libXt-1.2.1.ebuild | 31 +++++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+)