Received: from wolfsden.cz (wolfsden.cz [37.205.8.62]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id 1A42E781B55 for <~alpine/devel@lists.alpinelinux.org>; Fri, 29 Nov 2019 22:13:09 +0000 (UTC) Received: by wolfsden.cz (Postfix, from userid 110) id 3190BE66B2; Fri, 29 Nov 2019 22:13:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_ALL,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id AFCC0E6575 for <~alpine/devel@lists.alpinelinux.org>; Fri, 29 Nov 2019 22:13:08 +0000 (UTC) Date: Fri, 29 Nov 2019 23:13:08 +0100 From: Wolf To: ~alpine/devel@lists.alpinelinux.org Subject: community/go and buildmode pie Message-ID: <20191129221308.hy6ybayxu2nsu5dy@wolfsden.cz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="qr5dvmtdfpw7wezg" Content-Disposition: inline --qr5dvmtdfpw7wezg Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, when trying to complie something using the community/go package I'm always getting this warning: # foo loadinternal: cannot find runtime/cgo go package in community uses buildmode pie by default due to this patch: https://gitlab.alpinelinux.org/alpine/aports/blob/master/community/go/defau= lt-buildmode-pie.patch When looking into why I traced it down to https://gitlab.alpinelinux.org/alpine/aports/commit/9515100a5f4a9ad7b6b1d44= a5fb9a7b1a6083aa7 which sadly has no explanation *why* this was commited. Due to this patch there is warning while compiling any go source without any flags. Example project: /tmp/repro # tree . . =E2=94=9C=E2=94=80=E2=94=80 go.mod =E2=94=94=E2=94=80=E2=94=80 test.go 0 directories, 2 files /tmp/repro # cat go.mod module foo go 1.12 /tmp/repro # cat test.go package main func main() { } when one starts clean alpine container and tries to compile it + $ docker run --rm --init -it --mount type=3Dbind,src=3D/tmp/repro,dst= =3D/tmp/repro alpine Unable to find image 'alpine:latest' locally latest: Pulling from library/alpine 89d9c30c1d48: Pull complete Digest: sha256:c19173c5ada610a5989151111163d28a67368362762534d8a8121ce95cf= 2bd5a Status: Downloaded newer image for alpine:latest / # apk update fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/APKINDEX.tar.= gz fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/x86_64/APKINDEX= =2Etar.gz v3.10.3-66-g967440f6a7 [http://dl-cdn.alpinelinux.org/alpine/v3.10/main] v3.10.3-64-g77cd149615 [http://dl-cdn.alpinelinux.org/alpine/v3.10/communi= ty] OK: 10341 distinct packages available / # apk add go musl-dev (1/12) Installing binutils (2.32-r0) (2/12) Installing gmp (6.1.2-r1) (3/12) Installing isl (0.18-r0) (4/12) Installing libgomp (8.3.0-r0) (5/12) Installing libatomic (8.3.0-r0) (6/12) Installing libgcc (8.3.0-r0) (7/12) Installing mpfr3 (3.1.5-r1) (8/12) Installing mpc1 (1.1.0-r0) (9/12) Installing libstdc++ (8.3.0-r0) (10/12) Installing gcc (8.3.0-r0) (11/12) Installing go (1.12.12-r0) (12/12) Installing musl-dev (1.1.22-r3) Executing busybox-1.30.1-r2.trigger OK: 391 MiB in 26 packages / # cd /tmp/repro /tmp/repro # go build ./... # foo loadinternal: cannot find runtime/cgo Those last two lines are the issue. I guess my question is how to proceed. Should I just post patch dropping the default pie to aports mailing list? Or is this something that you want to keep? If so, how to proceed about the warning? Thanks for your time, W. --=20 There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors. --qr5dvmtdfpw7wezg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE7BIrb0FxyZaks1p7hTP5S2N55TgFAl3hl/QACgkQhTP5S2N5 5TjHMQ/8CeAd6t4vIZZiukXTayXXa+0mvzr6MQ8oyfNdRMhZzMAtQZjft2hlmT2e F/Ei/JsvwS1fY+3ZAuB4kQdVvlVISHUeoepAtunMlckU2YrsP7sa9ZcfkQvmvH7o MiFv/ecxrN7eZfiLKrDGHcbDPuU82lmw2drOgWEYOoZ+i741mTj/WvQgCgkfEhc5 Av+edkmr2+aQsmGHw+MvJ3VN3toVOGk8wgn4ToCTLqL4oeFuXjXAeRu0RtYd0nOg lFoU99oszH7T2fIbMa8FXSYEyaItsD0Kv36DKAwPBR2zYWS+EFABg+4NNdTBbl1O mgyg8R4EaFSkYjwu82rJQRa264VeIdaNPw6QW2+8tk4lkzkA6hlEBP/Mty/NJirZ 6ohP1GQRwH/VSWMqNvH43jmg07KKrv4zumDX6udUu1PhdhQUeSOPgZybW9Xk2Kjd x2eM+p+wmb0DyIFtfHzjAeeVEdYDtoMgPz1u1vUf4tCFZQfMiRa/bTmIiOnrjJoP Z7kqowSMFLhDyhdattWeodLw1N2LAxXF7dD+0uWP9qiFL7YLwJ7hyC96/brUGT6m YmEdsCu3zbHN1ywCw/rYZ3miTRGMmIGEPUdZnAo9M+0NMw7JJUGSw5RLDMdeBubs CLzfIqAgGP5SI+M+9ZTW+kWY79WLTwRGab7ZiTuy+lq3+A05X9A= =riM2 -----END PGP SIGNATURE----- --qr5dvmtdfpw7wezg--