Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rqZLt-00D8z2-Gw for pgsql-hackers@arkaria.postgresql.org; Sat, 30 Mar 2024 14:06:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rqZKt-008k66-JP for pgsql-hackers@arkaria.postgresql.org; Sat, 30 Mar 2024 14:05:31 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rqZKt-008k5x-4s for pgsql-hackers@lists.postgresql.org; Sat, 30 Mar 2024 14:05:31 +0000 Received: from dd25110.kasserver.com ([85.13.146.49]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rqZKk-007Gem-N9 for pgsql-hackers@postgresql.org; Sat, 30 Mar 2024 14:05:29 +0000 Received: from [192.168.0.101] (ip-037-201-153-175.um10.pools.vodafone-ip.de [37.201.153.175]) by dd25110.kasserver.com (Postfix) with ESMTPSA id 67571E1A0085; Sat, 30 Mar 2024 15:05:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=technowledgy.de; s=kas202308201259; t=1711807520; bh=Rv223HVWjAH0RIyLCIrAZSCKgc8YY1NZFviT419I/DE=; h=Date:From:Subject:To:Cc:References:In-Reply-To:From; b=V7sEW+PJpZbcZS9YXonqmPIqETknHp3JxhdUMUQfdV+2zO1TkVTnyxFLF33JtukZo 1r0utRNvGa1OHbrpnEgmhg0u4PG/0HJzXNwfcQ9aSGw1t+brfKFdhkQ89cTnbwARSZ splqhDUGNh1h6c6bkgpL5j6BKEh7GRvMq36svG2JtdIe3VYfbpb0EJbUc5uGme1HIU dT1RpvUSwXTwn/hlKk6VHCSqQtFSrUlU1PhtUZEyDWeVdM28cy/gObaTOcQ6n+DpgH 9QAvdyDt/17NZQVMmmOlLi00CJJJH5vdcU0LGm16r1D/nGYpm4TtAVe6oOiSjmu4yG OlaVxrBkv1LbQ== Message-ID: <0c16a4ee-c20a-420e-81ed-84ae506aea59@technowledgy.de> Date: Sat, 30 Mar 2024 15:05:19 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: walther@technowledgy.de Subject: Re: Building with musl in CI and the build farm Content-Language: en-US To: Andres Freund , PostgreSQL-development Cc: Andrew Dunstan , Tom Lane References: <4093813.1710899588@sss.pgh.pa.us> <4095435.1710900216@sss.pgh.pa.us> <477fa513-6bf0-456d-8d24-1e22a19df671@technowledgy.de> <20240322001948.atp2eetusylgjyw2@awork3.anarazel.de> <40543180-a0a2-495b-8d34-23b46c28f533@technowledgy.de> <20240326001447.wcatfvx45tkmizji@awork3.anarazel.de> <0a48d551-50e1-4bd3-8d46-8421e3b1b724@technowledgy.de> In-Reply-To: <0a48d551-50e1-4bd3-8d46-8421e3b1b724@technowledgy.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Bar: / List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Here's an update on the progress to run musl (Alpine Linux) in the buildfarm. Wolfgang Walther: > The animal runs in a docker container via GitHub Actions in [2]. Right > now it's still running with --test, until I get the credentials to > activate it. The animals have been activated and are reporting now. Thanks, Andrew! > I tried to enable everything (except systemd, because Alpine doesn't > have it) and run all tests. The LDAP tests are failing right now, but > that is likely something that I need to fix in the Dockerfile - it's > failing to start the slapd, IIRC. There are other issues, though - all > of them have open pull requests in that repo [3]. ldap tests are enabled, just a missing package. > I also had to skip the recovery check. Andrew mentioned that he had to > do that, too, when he was still running his animal on Alpine. Not sure > what this is about, yet. This was about a missing init process in the docker image. Without an init process reaping zombie processes, the recovery tests end up with some supposed-to-be-terminated backends still running and can't start them up again. Fixed by adding a minimal init process with "tinit". > Building --with-icu fails two tests. One of them (001_initdb) is fixed > by having the "locale" command in your PATH, which is not the case on > Alpine by default. I assume this will not break on your debian/musl > build, Andres - but it will also probably not return any sane values, > because it will run glibc's locale command. > I haven't looked into that in detail, yet, but I think the other test > (icu/010_database) fails because it expects that setlocale(LC_COLLATE, > ) throws an error. I think it doesn't do that on musl, > because LC_COLLATE is not implemented. > Those failing tests are not "just failing", but probably mean that we > need to do something about how we deal with locale/setlocale on musl. I still need to look into this in depth. > The last failure is about building --with-nls. This fails with something > like: > > ld: src/port/strerror.c:72:(.text+0x2d8): undefined reference to > `libintl_gettext' > > Of course, gettext-dev is installed, libintl.so is available in /usr/lib > and it also contains the symbol. So not sure what's happening here. This is an Alpine Linux packaging issue. Theoretically, it could be made to work by introducing some configure/meson flag like "--with-gettext" or so, to prefer gettext's libintl over the libc-builtin. However, NixOS / nixpkgs with its pkgsMusl overlay manages to solve this issue just fine, builds with --enable-nls and gettext work. Thus, I conclude this is best solved upstream in Alpine Linux. TLDR: The only real issue which is still open from PostgreSQL's side is around locales and ICU - certainly the pain point in musl. Will look into it further. Best, Wolfgang