LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 04-24-2023, 04:54 PM   #1
jr_bob_dobbs
Member
 
Registered: Mar 2009
Distribution: Bedrock, Devuan, Slackware, Linux From Scratch, Void
Posts: 651
Blog Entries: 135

Rep: Reputation: 188Reputation: 188
LFS 11.3 x86_64 zlib warning in binutils configure phase


I'm currently in the middle of a LFS build. I'm following the LFS 11.3 book on my x86_64 computer, except for six deviations.

One. As I did in my previous LFS 8.0, 8.1 and 11.2 installs, I am using the Slackware package tools as the package manager for my LFS. This is verified stable technology that I've used before. For LFS 11.2 on, a newer version of the tools was used, with the advantage of not needing a special version of tar as previous versions did. The Slackware package manager is briefly mentioned in Section 8.2.2.7, paragraph four of the LFS 11.3 book. Naturally this means the packages will not be compiled in the $LFS/sources directory but in a different directory tree, in which each package is compiled and packed in its own directory, while the package contents are installed to the usual locations.

Two. The "which" command is a dependency of one of the Slackware tools. I installed the shell script version from the BLFS book, along with the Slackware tools, before the first package of Chapter 8.

Three. This LFS build, as was done in previous successful builds, is being done in multiple sessions. $LFS is defined for all required users and scripting was created for mistake-free chrooting. The LFS volume is in /etc/fstab and is mounted at boot time.

Four. I'll be installing my text editor instead of vim.

Five. Before the system is bootable, cryptsetup, cpio and lvm-related programs will need to be compiled, because all Linux distros on my computer reside on thin-provisioned LVM partitions.

Six. I'm using the 5.15.86 version of the kernel, because that worked so well with my hardware in my LFS 11.2 system.

A pause to quote from Chapter One of the LFS 11.3 book:
Quote:
Deviating from this book does not mean that we will not help you. After all, LFS is about personal preference. Being up-front about any changes to the established procedure helps us evaluate and determine possible causes of your problem.
Having performed due-diligence as to disclosure about my deviations from the "established procedure," of the LFS 11.3 book, I will now begin my actual question.

In chapter 8, specifically 8.18. "Binutils-2.40", when checking the configure log (my slack-build for this package logs the output of the configure phase) I found the following warning:
Code:
*** This configuration is not supported in the following subdirectories:
     zlib
    (Any other directories should still work fine.)
The tests for binutils yielded twelve errors:
Code:
./gold/testsuite/test-suite.log:FAIL: weak_undef_test
./gold/testsuite/test-suite.log:FAIL: initpri3a
./gold/testsuite/test-suite.log:FAIL: script_test_1
./gold/testsuite/test-suite.log:FAIL: script_test_2
./gold/testsuite/test-suite.log:FAIL: justsyms
./gold/testsuite/test-suite.log:FAIL: justsyms_exec
./gold/testsuite/test-suite.log:FAIL: binary_test
./gold/testsuite/test-suite.log:FAIL: script_test_3
./gold/testsuite/test-suite.log:FAIL: tls_phdrs_script_test
./gold/testsuite/test-suite.log:FAIL: script_test_12i
./gold/testsuite/test-suite.log:FAIL: incremental_test_2
./gold/testsuite/test-suite.log:FAIL: incremental_test_5
The book says: "Twelve tests fail in the gold test suite when the --enable-default-pie and --enable-default-ssp options are passed to GCC."
From the configure of Pass 2 of GCC in 6.18.1.:
Code:
../configure                                       \
    --build=$(../config.guess)                     \
    --host=$LFS_TGT                                \
    --target=$LFS_TGT                              \
    LDFLAGS_FOR_TARGET=-L$PWD/$LFS_TGT/libgcc      \
    --prefix=/usr                                  \
    --with-build-sysroot=$LFS                      \
    --enable-default-pie                           \
    --enable-default-ssp                           \
    --disable-nls                                  \
    --disable-multilib                             \
    --disable-libatomic                            \
    --disable-libgomp                              \
    --disable-libquadmath                          \
    --disable-libssp                               \
    --disable-libvtv                               \
    --enable-languages=c,c++
it is apparent that those options were passed to GCC.

Is that configure warning from binutils something I should be concerned about? To phrase my question another way: does this mean that the binutils configure phase did not use the existing already installed zlib?

Thank you.
 
Old 04-25-2023, 05:49 AM   #2
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,651
Blog Entries: 19

Rep: Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480
From the way the warning is worded, I think these flags are a deviation from protocol that some people are expected to make out of necessity. In other words, the errors are expected failures, like the ones you often get with gcc. I don't know about the zlib thing.
 
Old 04-25-2023, 10:59 AM   #3
jr_bob_dobbs
Member
 
Registered: Mar 2009
Distribution: Bedrock, Devuan, Slackware, Linux From Scratch, Void
Posts: 651

Original Poster
Blog Entries: 135

Rep: Reputation: 188Reputation: 188
Quote:
Originally Posted by hazel View Post
I don't know about the zlib thing.
That's the part that really is the concern.

In LFS 11.2, my script didn't log the configure, just the tests, so I can't compare the 11.3 configure log against it. So today, I de-tarred and ran a configure of binutils 2.39 from LFS 11.2 in my regular Linux. It produced the exact same warning message. Hmm!

I looked through my 11.3 Slackbuild script again, ensuring that yes it corresponds to the LFS 11.3 book. It does.

I'd be curious, if anyone else has had that zlib warning.
 
Old 04-25-2023, 12:40 PM   #4
jr_bob_dobbs
Member
 
Registered: Mar 2009
Distribution: Bedrock, Devuan, Slackware, Linux From Scratch, Void
Posts: 651

Original Poster
Blog Entries: 135

Rep: Reputation: 188Reputation: 188
I de-tarred the (not yet installed) binutils slack package to a temp directory. Used ldd to see what libraries the programs of binutils needed and got this result:
Code:
/lib64/ld-linux-x86-64.so.2
libbfd-2.40.so
libc.so.6
libctf-nobfd.so.0
libctf.so.0
libfl.so.2
libgcc_s.so.1
libgprofng.so.0
libm.so.6
libopcodes-2.40.so
libsframe.so.0
libstdc++.so.6
libz.so.1
linux-vdso.so.1
Hmm: libz sounds suggestive of a file that could be part of zlib. A nice thing about using a package manager is that I can find out what package a given file belongs to, so let's do that:
Code:
(lfs chroot) root:~# grep libz /var/lib/pkgtools/packages/*
/var/lib/pkgtools/packages/zlib-1.2.13-x86_64-1_lfs:usr/lib/libz.so.1.2.13
/var/lib/pkgtools/packages/zstd-1.5.4-x86_64-1_lfs:usr/lib/libzstd.so.1.5.4
/var/lib/pkgtools/packages/zstd-1.5.4-x86_64-1_lfs:usr/lib/pkgconfig/libzstd.pc
(lfs chroot) root:~#
This indicates that libz,so.1, referenced by at least one of the binaries of the binutils package, is part of the zlib package. Aha! So, despite the warning, the configure process of binutils did set things up to use the zlib library. Looks good. My confidence level is now high enough to installpkg binutils and continue work on this LFS.
 
  


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
[SOLVED] building libpng-1.6.37 fails with call to zlib, but zlib is installed cpeognsoelds Linux - Software 3 03-01-2022 08:39 PM
[SOLVED] Multilib LFS-10: problem with zlib x32 build (LFS-9 as host) hazel Linux From Scratch 32 11-29-2020 02:56 AM
New to VPN's, need help setting IKE Phase 1 and Phase 2 strings for l2tp - Ubuntu 17.04 bvz Linux - Networking 1 08-10-2017 02:07 AM
no matching comp found: client zlib none, zlib@openssh.com lost connection jorge_ivan Linux - Networking 0 08-14-2006 07:09 PM
make configure-host for binutils-2.16.1 fails under 7.0-cross-lfs-20051019-x86_64 Basel Linux From Scratch 2 10-24-2005 11:07 PM

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

All times are GMT -5. The time now is 07:14 AM.

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