Bug 104034 - Mesa/Radeonsi does not compile on musl due to endianess check
Summary: Mesa/Radeonsi does not compile on musl due to endianess check
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/radeonsi (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact: Default DRI bug account
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-02 11:23 UTC by Lucas Francesco
Modified: 2018-04-05 00:39 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
the updated hack/fix (1.46 KB, patch)
2017-12-02 22:40 UTC, Lucas Francesco
Details | Splinter Review

Description Lucas Francesco 2017-12-02 11:23:10 UTC
https://lists.freedesktop.org/archives/mesa-dev/2016-November/134355.html

used to need to apply this patch and everything went fine(mainline still wasnt compiling patchless anyway)
but recently the source files changed and the patch does not work anymore
the patch fails to apply and if i build it without the patch i get 

In file included from /var/tmp/portage/media-libs/mesa-9999/work/mesa-9999/src/amd/addrlib/gfx9/gfx9addrlib.cpp:36:0:
/var/tmp/portage/media-libs/mesa-9999/work/mesa-9999/src/amd/addrlib/inc/chip/gfx9/gfx9_gb_reg.h:44:2: error: #error "BIGENDIAN_CPU or LITTLEENDIAN_CPU must be defined"
 #error "BIGENDIAN_CPU or LITTLEENDIAN_CPU must be defined"
  ^~~~~


which is the behavior i was having already w/o the patch since 2016

would you guys mindig fixing endianess dectection on musl libc?
Comment 1 Lucas Francesco 2017-12-02 22:40:45 UTC
Created attachment 135881 [details] [review]
the updated hack/fix

well, it seems the inclusion of /addrlib/gfx9/chip on /Makefile.addrlib.am broke the old patch, so this is the new, updated patch, it would still be nice to have dectection mainline while using musl anyways
Comment 2 Timothy Arceri 2018-04-05 00:39:54 UTC
Should be fixed by:

commit cbee1bfb34274668a05995b9d4c78ddec9e5ea4c
Author: Eric Engestrom <eric.engestrom@imgtec.com>
Date:   Wed Mar 21 17:04:06 2018 +0000

    meson/configure: detect endian.h instead of trying to guess when it's available
    
    Cc: Maxin B. John <maxin.john@gmail.com>
    Cc: Khem Raj <raj.khem@gmail.com>
    Cc: Rob Herring <robh@kernel.org>
    Suggested-by: Jon Turney <jon.turney@dronecode.org.uk>
    Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
    Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
    Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
    Cc: <mesa-stable@lists.freedesktop.org>


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.