You are not logged in.
Hi there,
I'm trying to build ncurses from the ABS. It is failing with the same error, both on my personal laptop, and in an Arch docker container (i.e. a totally clean environment apart from installing base-devel).
Is this a bug? I had assumed that the official Arch packages are built from the ABS, so not sure why I can't build ncurses.
Here is a link to the entire build log. The error is
ln: failed to create symbolic link '/build/builds/ncurses/pkg/ncurses/usr/lib/pkgconfig/ncurses.pc': No such file or directory
and this occurs because the directory ncurses/pkg/ncurses/usr/lib/pkgconfig does not exist. There are a few other errors in the Makefile earlier on, which are ignored by the Makefile.
Does anybody have any idea about what the problem is, or alternatively, should I file a bug or contact the package maintainers or packagers?
thanks!
Last edited by karkhaz (2015-10-10 20:29:38)
Offline
Works fine here in a clean chroot. Are you doing this on a non-posix filesystem or something strange like that?
Offline
Thanks for the quick reply. No, nothing weird like that: my laptop just has a regular installation of Arch on an ext4 filesystem.
Here's the Dockerfile I use to create the container, does it look reasonable?
Dockerfile:
FROM base/arch:latest
RUN pacman-key --refresh-keys
RUN pacman -Syyu --noconfirm base-devel
RUN pacman-db-upgrade
RUN pacman -S --noconfirm python abs
RUN abs
RUN mkdir /build
RUN cp -r /var/abs/core/ncurses /build
RUN chgrp nobody /build
RUN chmod -R g+ws /build
RUN chown -R nobody: /build
RUN setfacl -m u::rwx,g::rwx /build
COPY build.sh /build/build.sh
RUN chown nobody: /build/build.sh
ENTRYPOINT ["sudo", "-u", "nobody", "/bin/sh", "/build/build.sh"]
build.sh:
#!/bin/sh
cd /build/ncurses
makepkg -s --skippgpcheck --noconfirm
On my personal machine, it's much simpler, I just copy /var/abs/core/ncurses to a local directory, cd into it, and run makepkg -s. I get exactly the same error.
There should be nothing fishy about /etc/makepkg.conf, since it's based off of a clean Docker image...
would you mind sharing the sequence of commands that you used for the chroot, if they're not so difficult to retrieve?
thanks!
Offline
No idea on the dockerfile, I really haven't found much use for it myself.
As for building in a clean chroot, you just install the devtools package then use the "extra-x86_64-build" script.
Offline
Yes, I can confirm this: the package builds fine in a clean chroot, but it fails in the package function with the same error if I run makepkg directly on my machine. For now the only difference I can see from the logs is that the pkg-config files are installed in two different directories: ${pkgdir}/curses/usr/share/pkgconfig/$name when makepkg is run outside the chroot and ${pkgdir}/ncurses/usr/lib/pkgconfig/$name. Here there is an extract from the two logs
** creating ncursesw.pc ** Building terminfo database, please wait... ** creating panelw.pc ** creating menuw.pc Running sh ./shlib tic to install /mnt/CACHE/ABS/core/ncurses/pkg/ncurses/usr/share/terminfo ... [... snip ...] ** creating formw.pc ** creating ncurses++w.pc touch pc-files /bin/sh -c 'for name in *.pc; do /usr/bin/install -c -m 644 $name /build/ncurses/pkg/ncurses/usr/lib/pkgconfig/$name; done'
/bin/sh ./run_tic.sh ** creating ncursesw.pc ** Building terminfo database, please wait... ** creating panelw.pc ** creating menuw.pc Running sh ./shlib tic to install /mnt/CACHE/ABS/core/ncurses/pkg/ncurses/usr/share/terminfo ... [... snip ...] ** creating formw.pc ** creating ncurses++w.pc touch pc-files /bin/sh -c 'for name in *.pc; do /usr/bin/install -c -m 644 $name /mnt/CACHE/ABS/core/ncurses/pkg/ncurses/usr/share/pkgconfig/$name; done'
I will investigate further and try to find what configuration/environment variable causes this difference.
--edit: typo
Last edited by mauritiusdadd (2015-10-10 06:24:28)
Offline
@karkhaz: you have to edit the PKGBUILD and add the option --with-pkg-config-libdir=/usr/lib/pkgconfig to the configure invocation:
./configure --prefix=/usr --mandir=/usr/share/man \
--with-pkg-config-libdir=/usr/lib/pkgconfig \
--with-shared --with-normal --without-debug --without-ada \
--enable-widec --enable-pc-files --with-cxx-binding --with-cxx-shared \
--enable-ext-colors --enable-ext-mouse
TL;DR:
Well, It seems that the configure script checks for the existence of several paths in which pkg-config files are usually installed, taking in account the architecture of the system and the various possible spelling of pkg-config. The configure script sets the first existing directory it finds as the output directory for the generated .pc files: the actual order can be summarized as
$prefix/lib/*{,64}-linux-gnu/$pkgconfigdir
$prefix/share/$pkgconfigdir
$prefix/lib{32,64}/$pkgconfigdir
$prefix/lib/$pkgconfigdir
$prefix/libdata/$pkgconfigdir
So the directory /usr/share/pkgconfig takes precedence over /usr/lib/pkgconfig but in a clean chroot the first one does not exist by default and when you invoke makepkg, the pkg-config files are installed in ${pkgdir}/ncurses/usr/lib/pkgconfig/. The problem is that directory is owned by several packages and if you have one of those packages installed then the pkg-config files will be placed in ${pkgdir}/ncurses/usr/share/pkgconfig/ and the the package() function will fail with the error posted by karkhaz.
However, in the file NEWS, it is explicitly stated that you can control the output directory using the option --with-pkg-config-libdir
+ add configure option --with-pkg-config-libdir to provide control over
the actual directory into which pc-files are installed, do not use
the pkg-config environment variables (discussion with Frederic L W
Meunier).
--edit[0]: I opened a bug report: https://bugs.archlinux.org/task/46640
--edit[1]: small typos
Last edited by mauritiusdadd (2015-10-11 06:49:55)
Offline
mauritiusdadd: thanks so much! I'll edit the configure invocation. Marking as solved.
Offline