#4563: file-5.38
--------------------+------------------------------
Reporter: bdubbs | Owner: pierre.labastie
Type: task | Status: assigned
Priority: normal | Milestone: 9.1
Component: Book | Version: SVN
Severity: normal | Resolution:
Keywords: |
--------------------+------------------------------
Comment (by pierre.labastie):
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...
--
Ticket URL: <http://wiki.linuxfromscratch.org/lfs/ticket/4563#comment:2>
LFS Trac <http://wiki.linuxfromscratch.org/lfs/>
Linux From Scratch: Your Distro, Your Rules.
--
http://lists.linuxfromscratch.org/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page