Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 896032 - lxde-base/lxdm-0.5.3-r4 fails to compile (MUSL-CLANG-SYSTEM): lxcom.c:120:43: error: incompatible pointer to integer conversion initializing int with an expression of type char[1024] [-Wint-conversion]
Summary: lxde-base/lxdm-0.5.3-r4 fails to compile (MUSL-CLANG-SYSTEM): lxcom.c:120:43:...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Brian Evans (RETIRED)
URL:
Whiteboard: fixed in 0.5.3-r4
Keywords: PATCH
Depends on:
Blocks: c99-porting
  Show dependency tree
 
Reported: 2023-02-23 13:27 UTC by Agostino Sarubbo
Modified: 2024-10-30 11:12 UTC (History)
2 users (show)

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


Attachments
build.log (build.log,121.51 KB, text/plain)
2023-02-23 13:27 UTC, Agostino Sarubbo
Details
lxdm-0.5.3-portable-msghdr.patch (file_896032.txt,486 bytes, patch)
2023-03-18 23:54 UTC, Sam James
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2023-02-23 13:27:55 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: lxde-base/lxdm-0.5.3-r4 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-02-23 13:27:57 UTC
Created attachment 854102 [details]
build.log

build log and emerge --info
Comment 2 Brian Evans (RETIRED) gentoo-dev 2023-03-18 20:58:13 UTC
This is strictly a musl problem.

lxcom.c:120:43: error: incompatible pointer to integer conversion initializing 'int' with an expression of type 'char[1024]' [-Wint-conversion]
        struct msghdr h={&peer,sizeof(peer),&v,1,ctrl,sizeof(ctrl),0};
                                                 ^~~~
lxcom.c:120:48: error: incompatible integer to pointer conversion initializing 'void *' with an expression of type 'unsigned long' [-Wint-conversion]
        struct msghdr h={&peer,sizeof(peer),&v,1,ctrl,sizeof(ctrl),0};
                                                      ^~~~~~~~~~~~

The msghdr struct is different in glibc where ctrl is a void* and sizeof(ctrl) is size_t.

Not sure what the musl spec is for msghdr or how to make it work for both.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-18 23:54:29 UTC
Created attachment 858259 [details, diff]
lxdm-0.5.3-portable-msghdr.patch

This should work. The difference is padding.
Comment 4 Larry the Git Cow gentoo-dev 2023-03-26 01:31:52 UTC
The bug has been closed via the following commit(s):

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

commit f9f0e0bab1bb8213223e5fe44b3f2d7b7d44ead4
Author:     Brian Evans <grknight@gentoo.org>
AuthorDate: 2023-03-26 01:28:45 +0000
Commit:     Brian Evans <grknight@gentoo.org>
CommitDate: 2023-03-26 01:28:45 +0000

    lxde-base/lxdm: Patch socket header failure on musl + clang:16
    
    Makes struct members explicit
    
    Closes: https://bugs.gentoo.org/896032
    Patch-by: Sam James <sam@gentoo.org>
    Signed-off-by: Brian Evans <grknight@gentoo.org>

 lxde-base/lxdm/files/lxdm-0.5.3-portable-msghdr.patch | 18 ++++++++++++++++++
 lxde-base/lxdm/lxdm-0.5.3-r4.ebuild                   | 14 +++++++++-----
 2 files changed, 27 insertions(+), 5 deletions(-)