error while installing Bzip2(LFS-7.7,pg-111,section-6.18)
Linux From ScratchThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
error while installing Bzip2(LFS-7.7,pg-111,section-6.18)
i saw this error while compiling the Bzip2
this error comes when i used the following command :
Code:
make -f Makefile-libbz2_so
ERROR is
Code:
/usr/bin/ld: blocksort.o: relocation R_X86_64_32 against `.rodata.str1.1'
can not be used when making a shared object; recompile with -fPIC
blocksort.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile-libbz2_so:38: recipe for target 'all' failed
make: *** [all] Error 1
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
Impossible to know what you are doing. The other commands were not shown.
No errors here, a random 32bits OS, and a random Ubuntu 64bits. (15.04).
* Your OS is unknown. Must be specified by every question, like Ubuntu 14.04.3 - 64bit.
$ tar xvf bzip2-1.0.6.tar.gz && cd bzip2-1.0.6/
$ patch -Np1 -i ../bzip2-1.0.6-install_docs-1.patch
$ sed -i 's@\(ln -s -f \)$(PREFIX)/bin/@\1@' Makefile
$ sed -i "s@(PREFIX)/man@(PREFIX)/share/man@g" Makefile
$ make -f Makefile-libbz2_so
$ make clean
$ make
so now what should you recommend ?
should i start from scratch?
If I was in your shoes, I would start fresh, since noone knows what the problem is. The time spent on finding out where you (potentially) went wrong may not result in anything useful.
Since you have done the steps leading up to here, it should take you less time to do it the second time.
It's okay to have to redo things. Just be extra careful and pay closer attention to everything you do.
Suggestion for next time: If you use a virtual machine to create your LFS, take a snapshot at each step.
If not, a backup. Or perhaps an LVM snapshot works as well.
can anyone tell me what we have to do about the directories created in /sources/ directory after the 5th chapter of the book is completed. As it is written in the book that remove the extracted tarballs and the build directories.
presently, I am inside the chroot environment can i remove them now from the chroot environment?
please help
Hey stoat I reboot my system and again login to the chroot environment as instructed by the book but now after removing the extracted sources which we use in 5th chapter and now compiling the 6th chapter it is showing core dumped segmentation fault
i saw this error while compiling the Bzip2
this error comes when i used the following command :
Code:
make -f Makefile-libbz2_so
ERROR is
Code:
/usr/bin/ld: blocksort.o: relocation R_X86_64_32 against `.rodata.str1.1'
can not be used when making a shared object; recompile with -fPIC
blocksort.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile-libbz2_so:38: recipe for target 'all' failed
make: *** [all] Error 1
Please help.. ASAP
make clean and make will save you
Reason: the first pass you compile is not with -fPIC (not supposed to be as part of shared lib), and you do not remove at the second pass. So, make clean and recompile will solve.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.