On 12/20/2019 6:33 PM, Douglas R. Reno via lfs-dev wrote:

On 12/20/19 2:53 PM, Bruce Dubbs via lfs-dev wrote:
On 12/20/19 2:29 PM, Pierre Labastie via lfs-dev wrote:
Here is the error I get:
   CCLD     libmagic.la
/mnt/lfs/tools/bin/../lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-li nux-gnu/bin/ld: /mnt/lfs/tools/bin/../lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../..
/../lib/libbz2.a(bzlib.o): relocation R_X86_64_32S against symbol
`BZ2_crc32Table' can not be used when making a shared object; recompile with -fPIC /mnt/lfs/tools/bin/../lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /mnt/lfs/tools/bin/../lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../lib/libbz2.a(compress.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a
shared object; recompile with -fPIC
/mnt/lfs/tools/bin/../lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /mnt/lfs/tools/bin/../lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../lib/libbz2.a(decompress.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared
object; recompile with -fPIC
/mnt/lfs/tools/bin/../lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /mnt/lfs/tools/bin/../lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../lib/libbz2.a(blocksort.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a
shared object; recompile with -fPIC
/mnt/lfs/tools/bin/../lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld:
final link failed: nonrepresentable section on output
collect2: error: ld returned 1 exit status

There are two possibilities: coerce file to build only a static library
(--enable-static --disable-shared), or generate a dynamic one for libbz2.

Or maybe disable bz2. I see in the changelog that there was no bzip
decompressor builtin in 5.37...

Thoughts?

There already is /tools/lib/libbz2.a.  Can we force that?

Or disable bz2 for Chapter 5.  It's almost certainly not needed.

  -- Bruce

I'm leaning towards suggesting --enable-static --disable-shared. It's chapter 5, and File gets rebuilt rather early on in Chapter 6 if I recall correctly. The problem here is that it's trying to link a shared object against a static library, which isn't supported. I could be incorrect here though, but I remember reading something about that and -fPIC in the GCC documentation a long time ago. My memory is quite fuzzy on this.

On the other hand, because File is rebuilt early on in chapter 6, I think we can live without BZ2 support :-)

I tend to shy away from static linking wherever possible. FYI, IPFire, who use an LFS build style (and IIRC, still use nALFS as the bootstrap build tool), wound up going with --disable-bzlib.

https://lists.ipfire.org/pipermail/development/2019-December/006767.html

--DJ

--
http://lists.linuxfromscratch.org/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to