From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bryan Ferris Subject: bug#33999: CP437: Invalid Argument on init Date: Fri, 18 Jan 2019 11:00:14 -0800 Message-ID: References: <20190110192107.454e2cb8@scratchpost.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000c50bf7057fc01fb6" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:50060) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gkZO6-0005fK-0w for bug-guix@gnu.org; Fri, 18 Jan 2019 14:01:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gkZO4-0005rr-2y for bug-guix@gnu.org; Fri, 18 Jan 2019 14:01:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37756) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gkZO2-0005oK-5g for bug-guix@gnu.org; Fri, 18 Jan 2019 14:01:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gkZO2-0004Vf-1p for bug-guix@gnu.org; Fri, 18 Jan 2019 14:01:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: 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: 33999@debbugs.gnu.org --000000000000c50bf7057fc01fb6 Content-Type: text/plain; charset="UTF-8" I think I know why d-bus is failing to start. The error when it tries to is as follows: "Failed to start message bus: Error in file /etc/dbus-1/system-local.conf, line 1, column 0: no element found" The first possibility came up when I searched /gnu/store for system-local.conf. There is only one instance of such a file, and it is empty. According to https://dbus.freedesktop.org/doc/dbus-daemon.1.html, the (xml) file *must* contain the following line at a minimum: The error message makes a lot of sense with this in mind. Since I can't just edit the file to add the line, can you recommend a way to fix this? On Wed, Jan 16, 2019 at 7:43 AM Bryan Ferris wrote: > Hey Danny, > > Sorry for the delay in response. I saw no behavior change until I added > the (mount? #f) line. This fixed a number of services, but d-bus fails to > start. I encounter further issues including X Server failing to start and > the inability to log in (when I type in a valid username it immediately > fails 3 times and prints the standard message... I don't have password > hashes in my config, but IIRC last time I installed guix I was able to log > in without setting a password either imperatively or declaratively). Due to > the latter issue I was unable to test the program you posted, but it sounds > like Ludovic was able to describe what would happen if I had been able to? > I assume the non-d-bus errors are related to the lack of d-bus. > > I uploaded a new video of my startup at > https://drive.google.com/file/d/1bVdiCM1BKAmY-1y1XydI4ol7BCCkQ2Xk/view?usp=drivesdk > It's ~50s long, but seconds 20-45 are the system retrying d-bus a number of > times. > > On Thu, Jan 10, 2019 at 10:21 AM Danny Milosavljevic < > dannym@scratchpost.org> wrote: > >> Also, if you want, please try the following program on the booted guix >> system: >> >> #include >> #include >> #include >> #include >> >> static iconv_t iconv_init_codepage(int codepage) >> { >> iconv_t result; >> char codepage_name[16]; >> snprintf(codepage_name, sizeof(codepage_name), "CP%d", codepage); >> result = iconv_open(nl_langinfo(CODESET), codepage_name); >> if (result == (iconv_t) - 1) { >> printf("FOO\n"); >> perror(codepage_name); >> printf("BAR\n"); >> } >> return result; >> } >> >> int main() { >> setlocale(LC_ALL, ""); >> iconv_init_codepage(437); >> return 0; >> } >> >> You'd have to put the above text into a file called "a.c", then invoke >> >> guix package -i gcc-toolchain >> >> Then invoke >> >> gcc -o a a.c >> >> Then invoke >> >> ./a >> >> I suspect it will also fail with the same error message. >> >> After that, please invoke >> >> iconv -l |grep -i cp437 >> >> It will probably either return nothing or even fail with an error message. >> > > On Thu, Jan 10, 2019 at 10:21 AM Danny Milosavljevic < > dannym@scratchpost.org> wrote: > >> Also, if you want, please try the following program on the booted guix >> system: >> >> #include >> #include >> #include >> #include >> >> static iconv_t iconv_init_codepage(int codepage) >> { >> iconv_t result; >> char codepage_name[16]; >> snprintf(codepage_name, sizeof(codepage_name), "CP%d", codepage); >> result = iconv_open(nl_langinfo(CODESET), codepage_name); >> if (result == (iconv_t) - 1) { >> printf("FOO\n"); >> perror(codepage_name); >> printf("BAR\n"); >> } >> return result; >> } >> >> int main() { >> setlocale(LC_ALL, ""); >> iconv_init_codepage(437); >> return 0; >> } >> >> You'd have to put the above text into a file called "a.c", then invoke >> >> guix package -i gcc-toolchain >> >> Then invoke >> >> gcc -o a a.c >> >> Then invoke >> >> ./a >> >> I suspect it will also fail with the same error message. >> >> After that, please invoke >> >> iconv -l |grep -i cp437 >> >> It will probably either return nothing or even fail with an error message. >> > --000000000000c50bf7057fc01fb6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I think I know why d-bus is failing = to start. The error when it tries to is as follows:

"Failed to start message bus: Error in file /etc/dbus-1/system-local= .conf, line 1, column 0: no element found"

Th= e first possibility came up when I searched /gnu/store for system-local.con= f. There is only one instance of such a file, and it is empty. According to= https://db= us.freedesktop.org/doc/dbus-daemon.1.html, the (xml) file *must* contai= n the following line at a minimum:

<!DOCTYPE=C2= =A0busconfig=C2=A0PUBLIC=C2=A0"-//freedesktop//DTD=C2=A0D-Bus=C2=A0Bus= =C2=A0Configuration=C2=A01.0//EN"
=C2=A0=C2=A0=C2=A0=C2=A0"http://www.freedesktop.org= /standards/dbus/1.0/busconfig.dtd">

Th= e error message makes a lot of sense with this in mind. Since I can't j= ust edit the file to add the line, can you recommend a way to fix this?
=

On Wed, Jan 16, 2019 at 7:43 AM Bryan Ferris <saffsnail@gmail.com> wrote:
Hey Danny,

Sorry for the delay in response. I saw no behavior change until I added the=20 (mount? #f) line. This fixed a number of services, but d-bus fails to=20 start. I encounter further issues including X Server failing to start=20 and the inability to log in (when I type in a valid username it=20 immediately fails 3 times and prints the standard message... I don't=20 have password hashes in my config, but IIRC last time I installed guix I was able to log in without setting a password either imperatively or=20 declaratively). Due to the latter issue I was unable to test the program yo= u posted, but it sounds like Ludovic was able to describe what would happen= if I had been able to? I assume the non-d-bus errors are related to the la= ck of d-bus.

I uploaded a new video of my startup = at https://drive.google.com/file/d= /1bVdiCM1BKAmY-1y1XydI4ol7BCCkQ2Xk/view?usp=3Ddrivesdk It's ~50s lo= ng, but seconds 20-45 are the system retrying d-bus a number of times.

On Thu, Jan 10, 2019= at 10:21 AM Danny Milosavljevic <dannym@scratchpost.org> wro= te:
Also, if you= want, please try the following program on the booted guix system:

#include <stdio.h>
#include <locale.h>
#include <iconv.h>
#include <langinfo.h>

static iconv_t iconv_init_codepage(int codepage)
{
=C2=A0 =C2=A0 iconv_t result;
=C2=A0 =C2=A0 char codepage_name[16];
=C2=A0 =C2=A0 snprintf(codepage_name, sizeof(codepage_name), "CP%d&quo= t;, codepage);
=C2=A0 =C2=A0 result =3D iconv_open(nl_langinfo(CODESET), codepage_name); =C2=A0 =C2=A0 if (result =3D=3D (iconv_t) - 1) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 printf("FOO\n");
=C2=A0 =C2=A0 =C2=A0 =C2=A0 perror(codepage_name);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 printf("BAR\n");
=C2=A0 =C2=A0 }
=C2=A0 =C2=A0 return result;
}

int main() {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 setlocale(LC_ALL, "");
=C2=A0 =C2=A0 =C2=A0 =C2=A0 iconv_init_codepage(437);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 return 0;
}

You'd have to put the above text into a file called "a.c", th= en invoke

guix package -i gcc-toolchain

Then invoke

gcc -o a a.c

Then invoke

./a

I suspect it will also fail with the same error message.

After that, please invoke

iconv -l |grep -i cp437

It will probably either return nothing or even fail with an error message.<= br>

On= Thu, Jan 10, 2019 at 10:21 AM Danny Milosavljevic <dannym@scratchpo= st.org> wrote:
Also, if you want, please try the following program on the booted gui= x system:

#include <stdio.h>
#include <locale.h>
#include <iconv.h>
#include <langinfo.h>

static iconv_t iconv_init_codepage(int codepage)
{
=C2=A0 =C2=A0 iconv_t result;
=C2=A0 =C2=A0 char codepage_name[16];
=C2=A0 =C2=A0 snprintf(codepage_name, sizeof(codepage_name), "CP%d&quo= t;, codepage);
=C2=A0 =C2=A0 result =3D iconv_open(nl_langinfo(CODESET), codepage_name); =C2=A0 =C2=A0 if (result =3D=3D (iconv_t) - 1) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 printf("FOO\n");
=C2=A0 =C2=A0 =C2=A0 =C2=A0 perror(codepage_name);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 printf("BAR\n");
=C2=A0 =C2=A0 }
=C2=A0 =C2=A0 return result;
}

int main() {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 setlocale(LC_ALL, "");
=C2=A0 =C2=A0 =C2=A0 =C2=A0 iconv_init_codepage(437);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 return 0;
}

You'd have to put the above text into a file called "a.c", th= en invoke

guix package -i gcc-toolchain

Then invoke

gcc -o a a.c

Then invoke

./a

I suspect it will also fail with the same error message.

After that, please invoke

iconv -l |grep -i cp437

It will probably either return nothing or even fail with an error message.<= br>
--000000000000c50bf7057fc01fb6--