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 > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 11-28-2022, 09:40 AM   #1
theplatters
LQ Newbie
 
Registered: Nov 2022
Posts: 2

Rep: Reputation: 0
Unhappy Unable to compile glibc-2.36 in Chapter 5.5


Hello,

i tried compiling glibc today, but unfortunatly I ran into an error I could not resolve.

Code:
init-first.c:86:1: error: visibility attribute not supported in this configuration; ignored [-Werror=attributes]
cc1: all warnings being treated as errors
make[2]: *** [../o-iterator.mk:9: /mnt/lfs/sources/glibc-2.36/build/csu/init-first.o] Error 1
make[2]: Leaving directory '/mnt/lfs/sources/glibc-2.36/csu'
make[1]: *** [Makefile:484: csu/subdir_lib] Error 2
make[1]: Leaving directory '/mnt/lfs/sources/glibc-2.36'
make: *** [Makefile:9: all] Error 2
Here is the output of
Code:
../configure
: https://pastebin.com/9k911Xrc

And here the output of version_check.sh:

Code:
bash, version 5.2.9(1)-release
/bin/sh -> /usr/bin/bash
Binutils: version 2.38-25.fc37
bison (GNU Bison) 3.8.2
yacc is /usr/bin/yacc - 2.0 20220128
bzip2,  Version 1.0.8, 13-Jul-2019.
Coreutils:  9.1
diff (GNU diffutils) 3.8
find (GNU findutils) 4.9.0
GNU Awk 5.1.1, API: 3.1 (GNU MPFR 4.1.0-p13, GNU MP 6.2.1)
/usr/bin/awk -> /usr/bin/gawk
gcc (GCC) 12.2.1 20221121 (Red Hat 12.2.1-4)
g++ (GCC) 12.2.1 20221121 (Red Hat 12.2.1-4)
(GNU libc) 2.36
grep (GNU grep) 3.7
gzip 1.12
Linux version 6.0.9-300.fc37.x86_64 (mockbuild@bkernel01.iad2.fedoraproject.org) (gcc (GCC) 12.2.1 20220819 (Red Hat 12.2.1-2), GNU ld version 2.38-24.fc37) #1 SMP PREEMPT_DYNAMIC Wed Nov 16 17:36:22 UTC 2022
m4 (GNU M4) 1.4.19
GNU Make 4.3
GNU patch 2.7.6
Perl version='5.36.0';
Python 3.11.0
sed (GNU sed) 4.8
tar (GNU tar) 1.34
texi2any (GNU texinfo) 6.8
xz (XZ Utils) 5.2.5
g++ compilation OK
Can anybody resolve the issue, I tried my best googeling, but have not gotten smarter.
Thank you in advance.
 
Old 11-30-2022, 04:20 PM   #2
arch-linq
Member
 
Registered: Sep 2018
Location: Midwest, USA
Distribution: Arch,LFS,BLFS
Posts: 110

Rep: Reputation: Disabled
Did you set selinux to permissive or off? Fed is not a good host for noobs imo. Use arch and the dev-lfs-sysd book for best results. Or try the dev book once Fed selinux is off. Host with latest GCC etc wont build the stable books.

Last edited by arch-linq; 11-30-2022 at 04:27 PM.
 
Old 12-01-2022, 07:52 AM   #3
theplatters
LQ Newbie
 
Registered: Nov 2022
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by arch-linq View Post
Did you set selinux to permissive or off? Fed is not a good host for noobs imo. Use arch and the dev-lfs-sysd book for best results. Or try the dev book once Fed selinux is off. Host with latest GCC etc wont build the stable books.
Ok, thanks for the reply, it will probably be, that the gcc version is to new. I will try with arch as you said, although I don`t think, that Fedora is to blame here.
 
Old 12-13-2022, 06:10 PM   #4
xlfs-0.2
Member
 
Registered: Oct 2022
Posts: 207

Rep: Reputation: 44
I have a note on glibc-2.36. I tried compiling it with both gcc-4.7.4 gcc-10.2.0 many ways.

NEVER COULD GET IT TO COMPILE 32 bit - I believe it's broken. So I stuck with glibc-2.25 - which does.

(it compiles 64 bit and is less compatible with old software than glibc-2.25 which also isn't compatible but easier, far as I've seen)

https://sourceforge.net/projects/tot...t-linux-distro
https://totally-built-linux-distro.s...com/index.html

and gccc-12, that has "et phone home" built-in with no commandline option to disable phone-home during build
 
Old 12-13-2022, 06:19 PM   #5
xlfs-0.2
Member
 
Registered: Oct 2022
Posts: 207

Rep: Reputation: 44
So you didn't post enough of your error log. I'd need to have seen the whole commandline that failed and whole error message.

make[1]: *** [Makefile:484: csu/subdir_lib] Error 2

The above directory makes crti.o crtn.o - if these fail or aren't offset correctly the build might even complete but the chroot will fail (segfault when chrooting).

______________

So gcc10+ and glibc do not agree on everything.

init-first.c:86:1: error: visibility attribute not supported in this configuration; ignored [-Werror=attributes]

Did you try CFLAGS="-Wno-error=attributes" ?

______________
here's a clip from my script for glibc-2.25 which had compiled 2.36 (64bit only) at one time:

CFLAGS="-march=$lTUNE -O2 "
CXXFLAGS="-march=$lTUNE -O2 "
# CFLAGS="-march=$lTUNE -O2 $CFLAGS -Wno-error=zero-length-bounds -Wno-error=
undef"
## say NOTHING
CPPFLAGS=""
unset CPPFLAGS

Last edited by xlfs-0.2; 12-13-2022 at 06:20 PM.
 
Old 12-13-2022, 06:25 PM   #6
xlfs-0.2
Member
 
Registered: Oct 2022
Posts: 207

Rep: Reputation: 44
I have 3 sets of options for glibc and cannot get it to compile without custom options for each situation:

1) set of opts for compiling 32 to 32
2) set of opts for crossing 32/64 (2nd chroot)
*) compiling 64/64 (when neither of the above, normal compile)
 
  


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
LFS 7.9 - Unable to 'make test' glibc-2.23 (Chapter 6.9) Mordillo98 Linux From Scratch 4 05-30-2016 12:06 PM
Glibc won't compile in chapter 5.7.1 of the LFS 6.6 book bigaurian Linux From Scratch 5 09-10-2010 01:14 PM
[SOLVED] Why won't Glibc compile? (chapter 5.7.1) Lyle Linux From Scratch 5 05-05-2010 06:03 PM
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 compile fails in chapter 5 Weedman Linux From Scratch 6 01-25-2007 11:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 03:41 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