lfs-scripts icon indicating copy to clipboard operation
lfs-scripts copied to clipboard

Pkgbuild errors out for me..

Open hyperclock opened this issue 4 years ago • 24 comments

here is the last few lines before the error:

pkgutil.cc:(.text.unlikely+0x541): undefined reference to `archive_errno'
/mnt/lfs/tools/bin/../lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: pkgutil.o: in function `pkgutil::pkg_footprint(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const [clone .cold]':
pkgutil.cc:(.text.unlikely+0xe2e): undefined reference to `archive_errno'
/mnt/lfs/tools/bin/../lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: pkgutil.cc:(.text.unlikely+0xed5): undefined reference to `archive_errno'
/mnt/lfs/tools/bin/../lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: pkgutil.cc:(.text.unlikely+0xf8d): undefined reference to `archive_errno'
/mnt/lfs/tools/bin/../lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: pkgutil.o:pkgutil.cc:(.text.unlikely+0x1035): more undefined references to `archive_errno' follow
collect2: error: ld returned 1 exit status
make: *** [Makefile:46: pkgadd] Error 1
!!! build pkgutils-5.40.7 failed !!!

I have not investigated it yet. I may be missing something on my build system. This is the setup I have: Intel Dual Core (? E5 something) 4 Gb Ram sda

  • 250Gb
  • Debian 10 netinstall sdb
  • 2Tb
  • /mnt/lfs

the above was a second run if that matters. The compilation stopped because something was missing, I don't remeber what, but I'll check that and report.

hyperclock avatar Jun 17 '20 17:06 hyperclock

rsync is what was missing. I'm going to format sdb again and start over. Mabe I needed to clean up first. I'll report back shortly.

hyperclock avatar Jun 17 '20 17:06 hyperclock

I ran this 2 more times with the same results. I'll test this on virtualbox, I don't think it'll wprk. I believe it's either the pkgutils is not finding `archive_errno' or it's not compiled elsewhere.

It might be the make file is corrupt , broken or missing something. I read this on stackoverflow about make:

The "Makefile" defines and controls the build dependencies.

For example, you can't build the main executable binary without first building the binary object/module files that go with it.

Could it be that `archive_errno' needs to be done before compiling pkgutils?

hyperclock avatar Jun 18 '20 10:06 hyperclock

I does compiled fine on my machine. The error is temporary toolchain, which is depends on host. Can you try with other distro as host? Debian is most likely problematic when building LFS.

emmett1 avatar Jun 19 '20 10:06 emmett1

Do you have a recommended or a preference? I just use Debian out of habit, since 2005. But any distro is ok with me

hyperclock avatar Jun 19 '20 20:06 hyperclock

Arch & its based distros should be perfect, met the requirement. Usually i’m building on manjaro. Make sure you run version-check.sh script to check reauirements.

emmett1 avatar Jun 19 '20 22:06 emmett1

I ran the version-check.sh on Debian and it passed. I'm testing Venom xorg right now, if that does not do it I'll try manjaro. Thanks. I'll report back. I've tested several scripts in the past 10-12 years, yours is one of the nicer ones, and hope this works for me. I'm getting tired of Ubuntu junk flowing into Debian and making it sluggish.

I had built a LFS 6.3 many years ago, manually. It was fun, but tedious.

hyperclock avatar Jun 20 '20 10:06 hyperclock

That good if you use venom as host because all those script is fully tested on venom. All requirement should met correctly.

I’m started with lfs 7.9, after successful build including X, i’m start writing my own stuff like package manager, initrd generator and etc. Then venom is born.

I’m thinking to make this script fully multilib. No choice to build 64bit only. I will seperate glibc 32bit, and user can remove glibc 32bit if they dont want multilib. I hope this is ok.

emmett1 avatar Jun 21 '20 12:06 emmett1

I treied to install Arch twice and both times I missed getting grub started, so I trieded Manjaro Architect 20.0.3 - I get going until this happens (twice).

/bin/ld: final link failed: No space left on device
collect2: error: ld returned 1 exit status
make[2]: *** [../../gcc/cp/Make-lang.in:59: xg++] Error 1
make[2]: *** Waiting for unfinished jobs....
../../gcc/config/i386/sync.md:297950:1: fatal error: error writing to /tmp/ccQ5xDDO.s: No space left on device
compilation terminated.
make[2]: *** [Makefile:1116: insn-output.o] Error 1
rm gcc.pod
make[2]: Leaving directory '/tmp/gcc/gcc-9.2.0/build/gcc'
make[1]: *** [Makefile:4306: all-gcc] Error 2
make[1]: Leaving directory '/tmp/gcc/gcc-9.2.0/build'
make: *** [Makefile:940: all] Error 2
!!! build gcc-9.2.0 failed !!!

the installation is simular to the debian, so why does it run out of space? the lfs books mention debian, so I may try that again with a slightly diffrent setup....

hyperclock avatar Jun 21 '20 16:06 hyperclock

It mean you have no space left. Check your free space again. If you build on live environtment, change WORKDIR in config file. Point it into directory that has enough space.

emmett1 avatar Jun 21 '20 16:06 emmett1

I didn't get an internet connection with VenomLinux and I never have used VI or VIM, so I went back and forth between Debian & Manjaro.

On both systems I get to where it: cannot find -lnettle cannot find -lzstd cannot find -lxml2

As I didn't feel experienced enough with Manjaro, I'm back on Debian. I am not giving up, this will work. Using 'locate' tells me the libs are installed. I may need to investigate pkgutils to see where it's looking at for those libs (should be the same, but probably isn't)

I wonder if this makes a difference: Debian has "/lib/x86_64-linux-gnu" and the script has "lib/x86_64-pc-linux-gnu"

One thing is for sure, IT'S NOT Your scripts causing the probs, as I first thought. As soon as I get this worked out I'll report back and maybe write a tutorial on the intended project site. I'll let you know.

hyperclock avatar Jun 25 '20 09:06 hyperclock

Do you have a list of installed packages of your host when building with these scripts. I seam to have gotten a bit further using Arch than I did with Debian and Manjaro. On Arch it's only showing /../x86_64-pc-linux-gnu/bin/ld: cannot find -lzstd and on both of ther others I also had -lbz2 & -llzma.

Using mlocate it shows that they are installed, on all 3 OSs.

Still trying though, even as I think back to LFS 6.3 I spent most of my wake hours writing and that took about 4 weeks. II will invest another 2 weeks and see what happens.

have decided to stay with Arch as the host for this project.

hyperclock avatar Jun 28 '20 18:06 hyperclock

Looks like missing zstd package. Dont just check using mlocate, distro that split package like Arch, debian and etc sometimes missing development package.

Btw i just updated the script last night. Can you try with this latest script? Its work fine on my Venom Linux. Dont have time yet to test with other distro.

emmett1 avatar Jun 28 '20 22:06 emmett1

I got the scripts to work using the Venom Mate iso. I do want to build using Debian, so I guess that's my job for the next 2-3 weeks.

I think this can be closed. As soon as I get this to build on other systems I will report back.

Thanks for a more than AWESOME set of scripts!

hyperclock avatar Jun 30 '20 16:06 hyperclock

I have same problem. When I build pkgutils in toolchain the building is ended by an error (missing libxml2 and zstd). The host system is Slackware current which consist both of package. I tried to solve the problem but I had no any success. At the end I solved with a DIY methods. I changed the original pkgutils package with a static build of pkgutils which can be found in CRUX iso.

joe71 avatar Jun 30 '20 17:06 joe71

I will try this script on different distros including slackware and fix accordingly. Then i eill update requirement in the Readme.

For now i will reopen this issue.

emmett1 avatar Jul 01 '20 22:07 emmett1

Scripts is updated, I've tested on Artix and AryaLinux but not Slackware yet, will test it on my free time later.

emmett1 avatar Jul 02 '20 16:07 emmett1

I finally got it to build on Debian, BUT I have a very huge set of tools added to the basic Debian host. I now need to sort this out. I believe to have many, many unused or needed tools & libs.

I'll figure this out and report back....

hyperclock avatar Jul 03 '20 11:07 hyperclock

Scripts is updated, I've tested on Artix and AryaLinux but not Slackware yet, will test it on my free time later.

It works on Slack.

joe71 avatar Jul 06 '20 18:07 joe71

Scripts is updated, I've tested on Artix and AryaLinux but not Slackware yet, will test it on my free time later.

It works on Slack.

Cool. I will added to tested host list. :D

emmett1 avatar Jul 08 '20 15:07 emmett1

I finally got it to build on Debian, BUT I have a very huge set of tools added to the basic Debian host. I now need to sort this out. I believe to have many, many unused or needed tools & libs.

I'll figure this out and report back....

Debian split their packages hardly, so things might missing and need to figure out to get it.

emmett1 avatar Jul 08 '20 15:07 emmett1

sudo apt-get install libarchive-dev

lib missing. install to try again.

manojkumar-net avatar Nov 28 '20 20:11 manojkumar-net

sudo apt-get install libarchive-dev

lib missing. install to try again.

Thats problem with your host distro, not my lfs-scripts

emmett1 avatar Nov 28 '20 21:11 emmett1

sudo apt-get install libarchive-dev lib missing. install to try again.

Thats problem with your host distro, not my lfs-scripts

Yes, it's a Distro Problem, It helps other developers. pkgutil Need this support lib libarchive-dev and add this package to your version-check.sh. Especially Debian based distros have this package not pre-install.

manojkumar-net avatar Nov 29 '20 03:11 manojkumar-net