From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pierre Neidhardt Subject: bug#30785: Man pages truncated, repeated Date: Mon, 14 Jan 2019 17:57:12 +0100 Message-ID: <87va2r89ef.fsf@ambrevar.xyz> References: <87va2s8row.fsf@ambrevar.xyz> <87tvic8rfq.fsf@ambrevar.xyz> <878szo5w6z.fsf@gnu.org> <87r2dg8nxd.fsf@ambrevar.xyz> <87pnt08ndl.fsf@ambrevar.xyz> <8736pw5mmh.fsf@gnu.org> <87muo48fay.fsf@ambrevar.xyz> <87r2dfy6t0.fsf@gnu.org> <87k1j78vzd.fsf@ambrevar.xyz> <87imyr8rsg.fsf@ambrevar.xyz> <87ef9f8ei5.fsf@ambrevar.xyz> <87a7k3rzio.fsf@gnu.org> <87won78aw8.fsf@ambrevar.xyz> <20190114174240.557e64b5@scratchpost.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:40758) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gj5Yq-0004Wz-GT for bug-guix@gnu.org; Mon, 14 Jan 2019 11:58:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gj5Yp-0005D5-0L for bug-guix@gnu.org; Mon, 14 Jan 2019 11:58:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:59988) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gj5Yo-0005Cb-Tg for bug-guix@gnu.org; Mon, 14 Jan 2019 11:58:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gj5Yo-0000gM-Hp for bug-guix@gnu.org; Mon, 14 Jan 2019 11:58:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-reply-to: <20190114174240.557e64b5@scratchpost.org> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Danny Milosavljevic Cc: 30785@debbugs.gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable > (libs/libgroff/localcharset.c's locale_charset looks overly complicated, = WTF?) Oh dear... relocatep.cpp is not much better, here is the offending function: =2D-8<---------------cut here---------------start------------->8--- // Strip the installation prefix and replace it // with the current installation prefix; return the relocated path. char *relocatep(const char *path) { #if DEBUG fprintf(stderr, "relocatep: path =3D %s\n", path); fprintf(stderr, "relocatep: INSTALLPATH =3D %s\n", INSTALLPATH); fprintf(stderr, "relocatep: INSTALLPATHLEN =3D %d\n", INSTALLPATHLEN); #endif if (!curr_prefix) set_current_prefix(); if (strncmp(INSTALLPATH, path, INSTALLPATHLEN)) return strsave(path); char *relative_path =3D (char *)path + INSTALLPATHLEN; size_t relative_path_len =3D strlen(relative_path); char *relocated_path =3D new char[curr_prefix_len + relative_path_len + 1= ]; strcpy(relocated_path, curr_prefix); strcat(relocated_path, relative_path); #if DEBUG fprintf(stderr, "relocated_path: %s\n", relocated_path); #endif /* DEBUG */ return relocated_path; } =2D-8<---------------cut here---------------end--------------->8--- I don't even get the use case of the function... From locale_charset, it s= eems that the argument is LIBDIR. So maybe INSTALLPATH and/or LIBDIR is not properly set when we compile grof= f. > Maybe argv[0] is still the cause, but try setting the environment variable > LC_ALL to "C" to disable locales before invoking "man". Does this make i= t not > crash? This works indeed! Can you see a fix then? =2D-=20 Pierre Neidhardt https://ambrevar.xyz/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlw8v2gACgkQm9z0l6S7 zH8j+wf+Ov4Y67ShCnDAdyX6njbDJ4tpA2KQ8qX9QOcTn4NOpoqZvnX9xLZDD6Pv fJpMz1GNiFLOmkNAjusd9aaj6q47DFPVvQZrAaI/eoFBskc4LT3y5xTBI1EHMwsb E+OKdymoQCPuey/whWgiIlvpjMTaCn5Ve+AEMm30UYegDSUDqqTj4h76QiBjd65C yvtZwEZTIZTFvmR8sr9038gB9lxbjtOR5yHzpfG6d8gI3S+ksdXw6YpzX2Qkc5AE 9PxBcPdG8ZIjhze8YtFDquUMvfoJ4hWCy29qVZpQgqHP9n5rqDMFmXFiytEiKwnX RjGE02wbhHrfbbsU/YVBDkiQ956L7w== =oZWe -----END PGP SIGNATURE----- --=-=-=--