LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-05-2020, 02:08 AM   #1
nobodino
Senior Member
 
Registered: Jul 2010
Location: Near Bordeaux in France
Distribution: slackware, slackware from scratch, LFS, slackware [arm], linux Mint...
Posts: 1,564

Rep: Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892
glibc-2.30 doesn't build with gcc-10.2.0


While trying to build glibc-2.30 with gcc-10.2.0 an error occured:
-----------------------
libc-tls.c: In function '__libc_setup_tls':
libc-tls.c:209:30: error: array subscript 1 is outside the bounds of an interior zero-length array 'struct dtv_slotinfo[0]' [-Werror=zero-length-bounds]
209 | static_slotinfo.si.slotinfo[1].map = main_map;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from ../sysdeps/x86/ldsodefs.h:64,
from ../sysdeps/gnu/ldsodefs.h:46,
from ../sysdeps/unix/sysv/linux/ldsodefs.h:25,
from libc-tls.c:21:
../sysdeps/generic/ldsodefs.h:406:7: note: while referencing 'slotinfo'
406 | } slotinfo[0];
-----------------------

And according to this message, glibc-2.30 has non backported patch to build with gcc-10.2.0 : https://gcc.gnu.org/legacy-ml/gcc-pa.../msg00449.html
 
Old 12-06-2020, 01:55 AM   #2
3rensho
Senior Member
 
Registered: Mar 2008
Location: Deutschland
Distribution: Slackware64-current
Posts: 1,024

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
As I reported this morning in the 14.2->15.0 thread, glibc-2.32 does build without problems using gcc-10.2.0. So, either the 2.30 code needs to be patched or -current needs to jump to 2.32.
 
1 members found this post helpful.
Old 12-13-2020, 09:52 AM   #3
nobodino
Senior Member
 
Registered: Jul 2010
Location: Near Bordeaux in France
Distribution: slackware, slackware from scratch, LFS, slackware [arm], linux Mint...
Posts: 1,564

Original Poster
Rep: Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892
Finally got glibc-2.30 built with gcc-10.2.0, follow link for the details:
https://github.com/nobodino/slackwar...urrent/l/glibc

Last edited by nobodino; 12-14-2020 at 10:53 AM.
 
1 members found this post helpful.
Old 12-31-2020, 05:42 PM   #4
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,545

Rep: Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313
Quote:
Originally Posted by nobodino View Post
Finally got glibc-2.30 built with gcc-10.2.0, follow link for the details:
https://github.com/nobodino/slackwar...urrent/l/glibc
Thanks. I needed this for ARM and AArch64.
Happy new year! :-)
 
Old 01-01-2021, 03:31 AM   #5
3rensho
Senior Member
 
Registered: Mar 2008
Location: Deutschland
Distribution: Slackware64-current
Posts: 1,024

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Thank you nobodino. glibc built fine now with 10.2.0
 
Old 01-02-2021, 02:16 PM   #6
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,545

Rep: Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313
Quote:
Originally Posted by drmozes View Post
Thanks. I needed this for ARM and AArch64.
Happy new year! :-)
It turns out that this patch breaks the build on ARM and isn't required because --disable-werror is a default configuration option on SlackARM. glibc should build on x86/64 without patching when you use this option.
 
Old 01-03-2021, 11:59 AM   #7
the3dfxdude
Member
 
Registered: May 2007
Posts: 731

Rep: Reputation: 358Reputation: 358Reputation: 358Reputation: 358
I was looking at this happening a few days ago, and skipped patching, since I could just use Pat's glibc anyway. This is one of those things that makes recompiling things reproducibly (or a slackware from scratch) pretty much a chore. The way to get to what Pat has would be to go through the steps of old gcc > glibc 2.30 -> new gcc. If you patch glibc to make it compile, now you are compiling a different (how much?) glibc than what is in slackware.

What drmozes says of using --disable-werror actually brings you closer to the actual glibc built, as long as gcc 9.3.0 and gcc 10.2.0 didn't really diverge in code generation. If you want to be like LFS and teach/show people what slackware is like, I would actually just put the ignore in rather than patch things to compile on things like this. And I think the project makes more sense to me to base on a stable series of Slackware. But I know you only recently got started during this -current.

Also, I was looking at the bug report for glibc concerning gcc 10.2 and it looked like some patches were applied, and more were needed later for other platforms. So how would one handle multiple platforms, in a source based distro, on a platform that slackware was not initially tested on?
 
Old 01-05-2021, 01:05 AM   #8
nobodino
Senior Member
 
Registered: Jul 2010
Location: Near Bordeaux in France
Distribution: slackware, slackware from scratch, LFS, slackware [arm], linux Mint...
Posts: 1,564

Original Poster
Rep: Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892
the -current slackware git tree has been updated to allow glibc-2.30 to build with gcc-10.2.0 follow link: https://git.slackware.nl/current/dif...518ca5fffdc694
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Upcoming pain with glibc-2.14 and Linux-PAM: RPC build supt. is removed from glibc! JoelPB Linux From Scratch 6 12-13-2011 06:31 AM
ERROR:During Making of glibc-build(GLIBC-2.12.1) gau190188 Linux From Scratch 1 01-04-2011 05:19 AM
RH 9.0 glibc rpm says it needs glibc-common, but glibc-common is installed whitshade Red Hat 2 04-28-2007 05:49 PM
Glibc-2.3.6 build issue ---- wordexp.o not build Dhana_pal Linux - Software 0 12-27-2006 01:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration