You are not logged in.
Hello everyone
I am trying to build qt4 and qtwebkit in clean chroot but when I run makechrootpkg (according to DeveloperWiki:Building in a Clean Chroot) I get an error message:
$ sudo makechrootpkg -c -r /home/zuargo/chroot/
==> Creating clean working copy...done
==> ERROR: Build failed, check /home/zuargo/chroot/zuargo/build
As you see chroot directory is contained in my home folder.
I have checked /home/zuargo/chroot/zuargo/build and I see just the PKGBUILD and another random file (it depends on the package to build). No useful information.
I have made twice the chroot directory and in both times I get the same error.
Does somebody have any idea on how to solve this trouble or how to get information related to the error?
Thanks in advance
Last edited by zuargo (2013-04-19 14:12:53)
Offline
$ sudo makechrootpkg -c -r /home/zuargo/chroot/ ==> Creating clean working copy...done ==> ERROR: Build failed, check /home/zuargo/chroot/zuargo/build
Is that really the entirety of the output? There's nothing between the "==> Creating" and "==> ERROR" lines?
Offline
Offline
Does nobody have any idea?
Really I don't know how to to get more information about what is happen :'c
Offline
I know you've been following the devwiki, but try to post all of the exact commands you used from the start. Maybe there's something small that was overlooked along the way.
I started from scratch with a new chroot and have no problems building qt4 on my end.
Offline
OK, here I go:
I have tried out two methods:
The first one:
1) I make a new directory (chroot) with mkdir in my home folder:
$ mkdir chroot
2) I install the corresponding packages in the chroot directory:
$ sudo mkarchroot ~/chroot/root base base-devel sudo
3) I change the working directory to the folder containing the PKGBUILD and I run makechrootpkg:
$ sudo makechrootpkg -c -r ~/chroot
So, I get the error
Second one:
According to developer wiki:
1) I made a new directory (chroodir) with mkdir in my home folder:
$ CHROOT=$HOME/chroot
$ mkdir $CHROOT
2) I install the corresponding packages in the chroot directory:
sudo mkarchroot $CHROOT/root base base-devel sudo
3) I change the working directory to the folder containing the PKGBUILD and I run makechrootpkg:
sudo makechrootpkg -c -r $CHROOT
Then, I get the error
Thank you so much for your constant replying
Last edited by zuargo (2013-03-21 03:36:14)
Offline
$ sudo mkarchroot ~chroot/root base base-devel sudo
Well I assume "~chroot" is only a forum typo, so I'm not sure why this procedure is failing for you. I don't get any problems on my end.
I guess I would start by adding some debugging lines into /usr/sbin/makechrootpkg. BUILD_FAILED is touched on either line #402 or #438 followed by exiting, so I would echo something before each of those lines to check where the failure occurs.
Maybe someone else will have some better ideas.
Last edited by tdy (2013-03-21 01:19:15)
Offline
This is just for bumping the thread to top
Sorry by late answer but I don't know to what I should make echo.
Offline
bumping the thread to top
Please, I need any idea!!
Offline
This is just for bumping the thread to top
Just bumping the thread won't help you since we don't get any additional information that way.
Sorry by late answer but I don't know to what I should make echo.
Unfortunately I don't understand your question. Could you rephrase it, please?
Offline
zuargo wrote:This is just for bumping the thread to top
Just bumping the thread won't help you since we don't get any additional information that way.
Sorry by late answer but I don't know to what I should make echo.
Unfortunately I don't understand your question. Could you rephrase it, please?
user dty on post #7 says:
guess I would start by adding some debugging lines into /usr/sbin/makechrootpkg. BUILD_FAILED is touched on either line #402 or #438 followed by exiting, so I would echo something before each of those lines to check where the failure occurs.
So I ask for "echo" what (whatever), can I insert into the file /usr/sbin/makechrootpkg, before lines 402 and 438?
I hope it is understood
Last edited by zuargo (2013-03-29 04:46:58)
Offline
I would just echo the line numbers ("echo 402" just before line 402, "echo 438" just before line 438). This way you know where the script exits.
Offline
Can you be more clear about putting "echo 402" and "echo 438" just before the appointed lines?
Is it something like this?:
cd /build
echo 402
sudo -u nobody makepkg $makepkg_args || touch BUILD_FAILED
[[ -f BUILD_FAILED ]] && exit 1
if $run_namcap; then
pacman -S --needed --noconfirm namcap
for pkgfile in /build/PKGBUILD /pkgdest/*.pkg.tar.?z; do
echo "Checking \${pkgfile##*/}"
sudo -u nobody namcap "\$pkgfile" 2>&1 | tee "/build/\${pkgfile##*/}-namcap.log"
done
fi
exit 0
EOF
chmod +x "$copydir/chrootbuild"
if mkarchroot -r "/chrootbuild" "$copydir"; then
for pkgfile in "$copydir"/pkgdest/*.pkg.tar.?z; do
if $add_to_db; then
mkdir -p "$copydir/repo"
pushd "$copydir/repo" >/dev/null
cp "$pkgfile" .
repo-add repo.db.tar.gz "${pkgfile##*/}"
popd >/dev/null
fi
chown "$src_owner" "$pkgfile"
mv "$pkgfile" "$PKGDEST"
done
for l in "$copydir"/build/*-{build,check,namcap,package,package_*}.log; do
chown "$src_owner" "$l"
[[ -f $l ]] && mv "$l" .
done
else
# Just in case. We returned 1, make sure we fail
echo 438
touch "$copydir/build/BUILD_FAILED"
fi
Sorry by this, but I am a common user, I studied chemistry, not anything related to computer science, so I have no the knowledge necessary.
Offline
Have you tried using the helper scripts?
sudo extra-i686-build -r /path/to/create/chroot
Offline
Can you be more clear about putting "echo 402" and "echo 438" just before the appointed lines?
Is it something like this?:
cd /build echo 402 sudo -u nobody makepkg $makepkg_args || touch BUILD_FAILED [[ -f BUILD_FAILED ]] && exit 1 [...]
Yes, like this. same for the line below.
Offline
Have you tried using the helper scripts?
sudo extra-i686-build -r /path/to/create/chroot
I get the same error:
==> Building in chroot for [extra] (i686)...
==> Creating clean working copy...done
==> ERROR: Build failed, check /home/zuargo/chroot/extra-i686/zuargo/build
=/
zuargo wrote:Can you be more clear about putting "echo 402" and "echo 438" just before the appointed lines?
Is it something like this?:
cd /build echo 402 sudo -u nobody makepkg $makepkg_args || touch BUILD_FAILED [[ -f BUILD_FAILED ]] && exit 1 [...]
Yes, like this. same for the line below.
I get this:
$ sudo makechrootpkg -c -r /home/zuargo/chroot/
==> Creating clean working copy...done
438
==> ERROR: Build failed, check /home/zuargo/chroot/zuargo/build
It seems, "echo 438" is not on the proper line
Offline
$ sudo makechrootpkg -c -r /home/zuargo/chroot/ ==> Creating clean working copy...done 438 ==> ERROR: Build failed, check /home/zuargo/chroot/zuargo/build
402 is part of the "chrootbuild" heredoc, which I think should be executed on line 418 with mkarchroot -r "/chrootbuild" "$copydir"
It doesn't get to 402, but I'm not sure if A) it enters chrootbuild and somehow breaks before 402 or B) something immediately breaks with the mkarchroot command. Personally I would add a lot more debugging stuff to trace the code execution, but that type of debugging would take quite a while for each step to get relayed+interpreted over a forum.
Offline
zuargo wrote:$ sudo makechrootpkg -c -r /home/zuargo/chroot/ ==> Creating clean working copy...done 438 ==> ERROR: Build failed, check /home/zuargo/chroot/zuargo/build
402 is part of the "chrootbuild" heredoc, which I think should be executed on line 418 with mkarchroot -r "/chrootbuild" "$copydir"
It doesn't get to 402, but I'm not sure if A) it enters chrootbuild and somehow breaks before 402 or B) something immediately breaks with the mkarchroot command. Personally I would add a lot more debugging stuff to trace the code execution, but that type of debugging would take quite a while for each step to get relayed+interpreted over a forum.
Thank you
I think I know where is the problem in /usr/sbin/makechrootpkg. In the appointed file, the line 396, is disabling the commands located between lines 397 and 414. How do I know this? becouse kwrite shows it. Open makechrootpkg with kwrite, now see the text between lines 397 and 414, all commands are not highlighted with any color. Kwrite by default highlights all the functional commands in a document (compare them with the other commands in the file).
This can be confirmed by comment (#) the line 396. If this is done, you will see the commands, between the lines 397 and 414, now are highlighted, it means, now they are functionals.
Moreover, when I comment the line 396, I get other error, this one:
$ sudo makechrootpkg -c -r /home/zuargo/chroot/
==> Creating clean working copy...done
/usr/sbin/makechrootpkg: line 401: cd: /build: No such file or directory
mkdir: cannot create directory '/home/zuargo': Permission denied
==> ERROR: You do not have write permission to create packages in /home/zuargo/Paquetes/qt4.
Aborting...
Well, now the point is how to fix this. I am thinking to report this as a bug.
Last edited by zuargo (2013-04-06 17:44:51)
Offline
Sorry, since I am the only one having this issue, I will post some snapshots of kwrite, showing the explained thing above. Not now, I must go.
Offline
Offline
The "disabled" code is a heredoc which is written to a file to be later executed... there's nothing particularly wrong with it.
Thank you for replying and explain it.
I made the chroot directory on another partition and I have tried to build the package therein. I get the same error. =/
Offline
Can someone post their makechrootpkg file here? please. Thanks in advance.
Offline
Can someone post their makechrootpkg file here? please. Thanks in advance.
You can just reinstall devtools, but here is makechrootpkg from devtools-20130408-1
Offline
Thank you
I have new information.
Searching for information on the forum (this one) I have found this thread: https://bbs.archlinux.org/viewtopic.php?pid=1260353
The user that started the topic, had (or have) a very similar issue. At the first post, he says has fixed the problem by downgrading the package devtools to the version 20120720. So then, I did the same thing.
I had installed devtools 20130408 and in the cache of Pacman, I have the version 20130127, 20130122, 20121115, 20121027, 20121013, 20120720 of this package. I have downgraded to all these versions of devtools, one by one. In some cases, after downgrading and by creating the chroot directory I got errors, either with the package systemd or with the package filesystem. In the first case, the error did not affect the creation fo the chroot directory. In the second case (with filesystem), creating the directory was not successful, getting an error message (see below).
I proceed to list each devtool package (its version) and the error I have got, when I tried to create the chroot directory:
> devtools-20120720-1-any.pkg.tar.xz
systemd's error:
( 38/130) installing systemd [##########################################] 100%
Initializing machine ID from random generator.
ln -s '/usr/lib/systemd/system/getty@.service' '/etc/systemd/system/getty.target.wants/getty@tty1.service'
:: Append 'init=/usr/lib/systemd/systemd' to your kernel command line in your
bootloader to replace sysvinit with systemd, or install systemd-sysvcompatAlso an error with lacale-gen:
chroot: failed to run command '/usr/sbin/locale-gen': No such file or directory
Creating chroot directory successful
No error by building packages with makechrootpkg into the chroot directory.
> devtools-20121013-1-any.pkg.tar.xz
filesystem's error:
( 4/130) installing filesystem [##########################################] 100%
error: could not rename /home/zuargo/chroot/root/etc/resolv.conf to /home/zuargo/chroot/root/etc/resolv.conf.pacorig (Device or resource busy)
error: problem occurred while installing filesystem
error: could not commit transaction
error: failed to commit transaction (transaction aborted)
Errors occurred, no packages were upgraded.
==> ERROR: Failed to install packages to new root
==> ERROR: Failed to install all packagesCreating chroot directory was not successful
> devtools-20121027-1-any.pkg.tar.xz
filesystem's error:
( 4/130) installing filesystem [##########################################] 100%
error: could not rename /home/zuargo/chroot/root/etc/resolv.conf to /home/zuargo/chroot/root/etc/resolv.conf.pacorig (Device or resource busy)
error: problem occurred while installing filesystem
error: could not commit transaction
error: failed to commit transaction (transaction aborted)
Errors occurred, no packages were upgraded.
==> ERROR: Failed to install packages to new root
==> ERROR: Failed to install all packagesCreating chroot directory was not successful
> devtools-20121115-1-any.pkg.tar.xz
filesystem's error:
( 4/130) installing filesystem [##########################################] 100%
error: could not rename /home/zuargo/chroot/root/etc/resolv.conf to /home/zuargo/chroot/root/etc/resolv.conf.pacorig (Device or resource busy)
error: problem occurred while installing filesystem
error: could not commit transaction
error: failed to commit transaction (transaction aborted)
Errors occurred, no packages were upgraded.
==> ERROR: Failed to install packages to new root
==> ERROR: Failed to install all packagesCreating chroot directory was not successful
> devtools-20130122-1-any.pkg.tar.xz
systemd's error:
( 38/130) installing systemd [##########################################] 100%
Initializing machine ID from random generator.
ln -s '/usr/lib/systemd/system/getty@.service' '/etc/systemd/system/getty.target.wants/getty@tty1.service'
:: Append 'init=/usr/lib/systemd/systemd' to your kernel command line in your
bootloader to replace sysvinit with systemd, or install systemd-sysvcompatError by building packages with makechrootpkg into the chroot directory:
==> Creating clean working copy...done
==> ERROR: Build failed, check /home/zuargo/chroot/zuargo/build
> devtools-20130127-1-any.pkg.tar.xz
systemd's error:
( 38/130) installing systemd [##########################################] 100%
Initializing machine ID from random generator.
ln -s '/usr/lib/systemd/system/getty@.service' '/etc/systemd/system/getty.target.wants/getty@tty1.service'
:: Append 'init=/usr/lib/systemd/systemd' to your kernel command line in your
bootloader to replace sysvinit with systemd, or install systemd-sysvcompat
Error by building packages with makechrootpkg into the chroot directory:==> Creating clean working copy...done
==> ERROR: Build failed, check /home/zuargo/chroot/zuargo/build
> devtools-20130408-1-any.pkg.tar.xz
systemd's error:
( 38/130) installing systemd [##########################################] 100%
Initializing machine ID from random generator.
ln -s '/usr/lib/systemd/system/getty@.service' '/etc/systemd/system/getty.target.wants/getty@tty1.service'
:: Append 'init=/usr/lib/systemd/systemd' to your kernel command line in your
bootloader to replace sysvinit with systemd, or install systemd-sysvcompatError by building packages with makechrootpkg into the chroot directory:
==> Creating clean working copy...done
==> ERROR: Build failed, check /home/zuargo/chroot/zuargo/build
As see, the only one package that allows me to build into chroot directory with no errors is devtools-20120720.
Now I can build packages into a clean chroot directory. But I can't update devtools.
Offline
Well, looking at the devtools commit log, 20120720 was the last version of devtools to not use systemd-nspawn, so there may be a connection. However, I don't think your problem is the same one I'm experiencing. I've worked around mine with an ugly hack: https://github.com/WorMzy/compilepackag … 2022ab4ba0
I doubt that will help you in any way though.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline