Opened 4 years ago

Closed 4 years ago

#4563 closed task (fixed)

file-5.38

Reported by: Bruce Dubbs Owned by: Pierre Labastie
Priority: normal Milestone: 9.1
Component: Book Version: SVN
Severity: normal Keywords:
Cc:

Description

New minor version.

Change History (6)

comment:1 by Pierre Labastie, 4 years ago

Owner: changed from lfs-book to Pierre Labastie
Status: newassigned

comment:2 by Pierre Labastie, 4 years ago

Started a thread on lfs-dev, but for some reason, I do not receive messages from this list, so moving it here. I got an error in chapter five:

  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

The problem is that there is only a static library libbz2.a, which cannot be included in a shared library (thanks to Douglas for the explanation).

There are three possibilities:

  • build a shared libbz2 library in chapter 5
  • build only a static library for file (--disable-shared --enable-static)
  • disable the use of bzip2 in file (--disable-bzlib): a builtin bzip2 decompressor has been added in version 5.38, and this is why the error shows up.

I'm inclined to use the first solution. The problem is that file is built early in chapter 6, before bzip2 is rebuilt, so, if the shared library is not built in chapter 5, it is still not there when we build file in chapter 6 either.

We may also try to move bzip2 before file in chapter 6...

comment:3 by Pierre Labastie, 4 years ago

Actually, there is another issue in chapter 6. For some reason, configure does not find libbz2 at all, but this does not prevent the system to build the decompressor, so that there are undefined symbols when linking. See report at https://bugs.astron.com/view.php?id=127

comment:4 by Pierre Labastie, 4 years ago

So here is what I propose:

  • build bzip2 shared in chapter 5. This adds less that 0.1 SBU.
  • build file in chapter 5 with the current instructions.
  • move bzip2 and xz before file in chapter 6: this allows building the builtin decompressors for bz2, xz, and lzma in file.

I'm testing a jhalfs build with this order ATM, to see whether anything breaks.

I plan to tweak the dependency appendix too if everything is OK.

comment:5 by Bruce Dubbs, 4 years ago

Sounds good.

comment:6 by Pierre Labastie, 4 years ago

Resolution: fixed
Status: assignedclosed

Fixed at r11711

Note: See TracTickets for help on using tickets.