Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 900398 - app-i18n/xvnkb-0.2.11 fails to configure with Modern C
Summary: app-i18n/xvnkb-0.2.11 fails to configure with Modern C
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: CJK Team
URL:
Whiteboard: horror from the depths
Keywords: PullRequest
: 919407 (view as bug list)
Depends on:
Blocks: c99-porting gcc-14-stable
  Show dependency tree
 
Reported: 2023-03-08 14:15 UTC by Agostino Sarubbo
Modified: 2025-02-10 09:43 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,44.63 KB, text/plain)
2023-03-08 14:15 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2023-03-08 14:15:09 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: app-i18n/xvnkb-0.2.11 fails to compile (MUSL-CLANG-SYSTEM).
Discovered on: amd64 (internal ref: tinderbox_musl)

NOTE:
(MUSL-CLANG-SYSTEM) in the summary means that bug was found on a machine that runs MUSL libc + clang16 but this bug MAY or MAY NOT BE related to musl/clang16.
Comment 1 Agostino Sarubbo gentoo-dev 2023-03-08 14:15:11 UTC
Created attachment 856834 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2023-03-08 14:15:12 UTC
Error(s) that match a know pattern:


 * 	dobin: xvnkb does not exist
 * QA Notice: file does not exist:
!!! dobin: xvnkb does not exist
Comment 3 Agostino Sarubbo gentoo-dev 2023-12-21 08:02:30 UTC
*** Bug 919407 has been marked as a duplicate of this bug. ***
Comment 4 Eli Schwartz gentoo-dev 2024-03-03 05:24:32 UTC
>>> Configuring source in /var/tmp/portage/app-i18n/xvnkb-0.2.11/work/xvnkb-0.2.11 ...

Configuration for xvnkb 0.2.11 on Linux

  Type "./configure --help" for more information

Checking uchar... no
Checking ushort... no
Checking uint... no
Checking ulong... no
Checking dynamic linking loader... no
>>> Source configured.
>>> Compiling source in /var/tmp/portage/app-i18n/xvnkb-0.2.11/work/xvnkb-0.2.11 ...
>>> Source compiled.
>>> Test phase [not enabled]: app-i18n/xvnkb-0.2.11

>>> Install app-i18n/xvnkb-0.2.11 into /var/tmp/portage/app-i18n/xvnkb-0.2.11/image
!!! dobin: xvnkb does not exist
 * ERROR: app-i18n/xvnkb-0.2.11::gentoo failed (install phase):
 *   dobin failed



This bug doesn't seem to make a whole lot of sense. Somehow it is running an empty test phase instead of emake.

The configure script output looks horribly suspicious, as though it doesn't generate a Makefile at all, but also doesn't exit with failure if it fails?
Comment 5 Eli Schwartz gentoo-dev 2024-03-03 05:27:38 UTC
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA


echo -n "Checking dynamic linking loader... "
$xcc config/dl.c >/dev/null 2>&1
if [ $? != 0 ]; then
        $xcc config/dl.c -ldl >/dev/null 2>&1
        if [ $? != 0 ]; then
                rm -f a.out
                echo no
                exit
        fi
        lib_dl=-ldl
else
        lib_dl=
fi
rm -f a.out
echo yes


The entire script has ZERO concept of error checking.
Comment 6 Eli Schwartz gentoo-dev 2024-03-03 05:31:51 UTC
Fails if I export CC=clang, the issue is that config/dl.c has implicit-int inside of it.
Comment 7 Larry the Git Cow gentoo-dev 2024-03-03 05:52:09 UTC
The bug has been referenced in the following commit(s):

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

commit bf8021b7878ce7a4dbd92639ca20ef93084514dc
Author:     Eli Schwartz <eschwartz93@gmail.com>
AuthorDate: 2024-03-03 05:32:08 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-03-03 05:51:12 +0000

    app-i18n/xvnkb: error out immediately if no Makefile exists
    
    This package is absolutely horrible. It has the world's worst homebrew
    "configure" script, which fails but doesn't *error out* with
    -Wimplicit-int as a compiler default error, and also has:
    
    config.h:1:1: error: expected identifier or ‘(’ before ‘-’ token
        1 | -e #ifndef __VK_CONFIG_H
    
    which is just... dandy... I too love unix command flags echo'ed into my
    headers...
    
    It's a wreck but we can at least detect when it cannot compile anything
    and abort with a clearer message.
    
    Bug: https://bugs.gentoo.org/900398
    Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 app-i18n/xvnkb/xvnkb-0.2.11.ebuild | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Comment 8 NHO 2025-01-31 21:07:41 UTC
I feel that only way to fix it is to port it to modern build system. My experiments with that show that if it's pinned to gnu17, then it compiles and appears to be running.
Can not verify if it's running correctly, at this time, but it refuses to close and needs to be killed.

Also, mandatory LD_PRELOAD? That's icky and incompetent.
Comment 9 NHO 2025-01-31 21:44:36 UTC
Just in case:
https://github.com/NHOrus/xvnkb-meson/blob/master/meson.build
https://github.com/NHOrus/xvnkb-meson/blob/master/meson.options
https://github.com/NHOrus/xvnkb-meson/blob/master/config.h.in
It builds everything current ebuild builds, artifacts don't crash instantly and appear to be working.

Will update ebuild with this and hopefully preserve sanity of next maintainer tomorrow.
Comment 10 Larry the Git Cow gentoo-dev 2025-02-10 09:43:05 UTC
The bug has been referenced in the following commit(s):

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

commit f1c74fe44f995f117b055389b06999e353d1eeea
Author:     NHOrus <jy6x2b32pie9@yahoo.com>
AuthorDate: 2025-02-01 07:12:28 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-02-10 09:41:10 +0000

    app-i18n/xvnkb: Add meson build manifest instead of bash
    
    Package has two problems: It's doesn't compile with c23 and it's
    build system is badly handwritten, and fails to configure due to
    changes to bash and build environment.
    It also makes Eli Schwartz scream (# 900398#c5 ).
    Fix build by limiting C version to gnu17.
    Fix configure by rewriting build in Meson.
    New build artifacts are running, can't test if they are working
    correctly - original build fails to configure on my system at all.
    
    Bug: https://bugs.gentoo.org/879631
    Bug: https://bugs.gentoo.org/926090
    Bug: https://bugs.gentoo.org/900398
    Signed-off-by: NHOrus <jy6x2b32pie9@yahoo.com>
    Closes: https://github.com/gentoo/gentoo/pull/40404
    Signed-off-by: Sam James <sam@gentoo.org>

 app-i18n/xvnkb/files/config.h.in      |  5 +++
 app-i18n/xvnkb/files/meson.build      | 72 +++++++++++++++++++++++++++++++++++
 app-i18n/xvnkb/files/meson.options    | 20 ++++++++++
 app-i18n/xvnkb/xvnkb-0.2.11-r1.ebuild | 59 ++++++++++++++++++++++++++++
 4 files changed, 156 insertions(+)