pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Error compiling GNU Guile 2.2.5 under Linux



On Tue, 2019-09-03 at 09:40 -0400, David H. Gutteridge wrote:
> On Tue, 2019-09-03, at 11:58 +0200, Noryungi wrote:
> > Hi David,
> > 
> > Thanks for your answer. I commented out the file in PLIST and guile
> > 2.2.5 compiled and installed correctly.
> > 
> > Also, there are several packages with the same file in their PLIST
> > configuration:
> > 
> > $ grep -Ril charset.alias ./*/*/PLIST
> > ./converters/libiconv/PLIST
> > ./cross/arm-none-eabi-gdb/PLIST
> > ./mail/dovecot2/PLIST
> > ./sysutils/amanda-common/PLIST
> > ./sysutils/grub2/PLIST
> > ./www/elinks/PLIST
> > 
> > I suspect "libiconv", "grub2", "dovecot2" and "amanda-common" are
> > probably going to be the most important packages for most users.
> > 
> > The package "libiconv" in particular is a dependency in a lot of other
> > packages, unless I am mistaken:
> > 
> > $ grep -Ril libiconv ./*/*/Makefile | wc -l
> > 311
> > 
> > BUT... The interesting thing is that a dumb "bmake && bmake install"
> > compiles libiconv without any issue:
> > 
> > => Automatic manual page handling
> > => Generating post-install file lists
> > => Checking file-check results for libiconv-1.14nb3
> > => Creating binary package
> > /opt/pkgsrc/pkgsrc/converters/libiconv/work/.packages/libiconv-
> > 1.14nb3.tgz
> > ===> Building binary package for libiconv-1.14nb3
> > => Creating binary package /opt/pkgsrc/pkgsrc/packages/All/libiconv-
> > 1.14nb3.tgz
> > ===> Installing binary package of libiconv-1.14nb3
> > libiconv-1.14nb3: copying
> > /opt/pkg/share/examples/libiconv/charset.alias to
> > /opt/pkg/lib/charset.alias
> > 
> > Is it possible that libiconv is required to obtain this
> > "charset.alias" file?
> > 
> > This is very confusing to me, any help would be greatly appreciated!
> 
> Hello,
> 
> Each of those packages installs their own (different) version of that
> file. (Except that I see amanda-common and grub2 both install their
> version of the file to the same place, which is a potential problem.
> And dovecot2 installs a totally different file that shares part of the
> name.)
> 
> guile22 doesn't check for the presence of that file from another source,
> it simply assumes it should or shouldn't provide its own based on its
> detection of the OS it's compiling under. The simplest fix is just to
> special-case that, so that's what I've committed.

It turns out this needs more work. What I committed had fixed the build
for me on Fedora 30, but not on Debian, because the pkgsrc framework
doesn't necessarily correctly detect the presence of glibc. One option
is simply to test for Linux only, at the expense of any non-glibc
distros. (Shame on me for not looking at the pkgsrc glibc detection
code first.)

There's another side to this, too. The original issue you reported was
a problem with pkgsrc not reflecting how the upstream package handles
certain OSes. My assumption was that upstream would know best about
what it needs on a given OS. But in fact, it handles things rather
differently depending on the OS. For Darwin, rather than installing a
charset.alias file, it simply compiles a hard-coded lookup table. But
for Linux, it assumes charset.alias is present in the underlying OS
installation. Which it may not be. How serious this is would depend on
a user's particular requirements.

Dave





Home | Main Index | Thread Index | Old Index