Bug 14256

Summary: Compiling with static libraries on s390x error
Product: buildroot Reporter: Raul Cabello <raul.cabello>
Component: OtherAssignee: unassigned
Status: RESOLVED MOVED    
Severity: major CC: buildroot, yann.morin.1998
Priority: P5    
Version: 2021.08   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Host: Target:
Build:
Attachments: .config

Description Raul Cabello 2021-10-06 11:07:13 UTC
Hello,

When I try to compile using static libraries with s390x as a target I get the following error:
The directory that should contain system headers does not exist:
  /usr/src/buildroot/output/per-package/host-gcc-final/host/s390x-buildroot-linux-gnu/sysroot/usr/include

My .config file is attached. These are the steps I did to generate my .config file:

- make menuconfig
- Select Target -> Target Architecture -> s390x
- Select Build Options -> Libraries -> static only
- exit and save .config

Then if I run make with this config I get error I mentioned above.

It works fine if I select shared libraries instead of static.

Operating System: openSUSE Leap 15.3
Kernel: Linux 5.3.18-57-default
Architecture: x86-64

Thank you.
Comment 1 Raul Cabello 2021-10-06 11:13:00 UTC
Created attachment 9106 [details]
.config

.config file is bigger than 75KB, so I uploaded here https://raw.githubusercontent.com/raulcabello/buildroot-config/main/config
Comment 2 Arnout Vandecappelle 2021-10-06 20:25:59 UTC
That's because no libc is selected.

Only glibc has support for s390x, and glibc doesn't support static builds.

Buildroot should disallow static builds for s390x.
Comment 4 Raul Cabello 2021-10-07 07:37:15 UTC
ok, thank you for looking into this.
Comment 5 Mark Post 2021-10-08 19:46:08 UTC
(In reply to Arnout Vandecappelle from comment #2)

I'm confused by your comment. Of course glibc supports building static binaries, so you must mean something else is going on that makes this not work with your project. Could you explain what that might be, please? Thanks.
Comment 6 Yann E. MORIN 2024-06-15 14:59:54 UTC
Thank you for your report.

The issue tracker for the Buildroot project has been moved to
the Gitlab.com issue tracker:
    https://gitlab.com/buildroot.org/buildroot/-/issues

We are taking this opportunity to close old issues in this old
tracker. If you believe your issue is still relevant, please
open one in the new issue tracker.

Thank you!