From nobody Wed May 04 14:16:53 2022 X-Original-To: freebsd-erlang@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B2DA91AC1E26 for ; Wed, 4 May 2022 14:17:21 +0000 (UTC) (envelope-from dch@skunkwerks.at) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ktf6S6GZxz3Qcy for ; Wed, 4 May 2022 14:17:20 +0000 (UTC) (envelope-from dch@skunkwerks.at) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 7C46D5C0158; Wed, 4 May 2022 10:17:20 -0400 (EDT) Received: from imap44 ([10.202.2.94]) by compute2.internal (MEProxy); Wed, 04 May 2022 10:17:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=skunkwerks.at; h=cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1651673840; x= 1651760240; bh=X6dM+v3LrpqIqew6qQiZ+2I/uTc9fqeedDQ4Qmcwk88=; b=Q SbwVbryqh4FLPQ0b0QjYijyiqIPtIPRPBcbqV+g1yMVbLG4wokufOCSZIpENJ85S +6cVvfDsDuU3p02UJL/smPNJqNi/i0HgpuKwI44jbM2Tp1cRdmX87rx01g/9fYUP OTyjMD2YPj1OkGCrRSFZ9vqLQfA7/DeuzGfoGQIFE/kk9yL5x7mPkgMcEYrprTCv 0Z4dH83wJOP2Yro/CAyDV8v7EEeK/b4yKJYQ7ppyIshdNXQhGfVFgIBTsQwgRhiY 1GQgF+Gk1d6tZoo0WXfENC3BXrOJxFuuTfL5U2ZD3GGoY2KOjYvTgrpeFwiikF3I fkCyE+t/kupxxvvynXmIg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1651673840; x=1651760240; bh=X6dM+v3LrpqIqew6qQiZ+2I/uTc9 fqeedDQ4Qmcwk88=; b=yF2h7BZqcYWw/Iy6783g8j3ybo4KkTBzKzCnfe7sJkha 8iiH4bWKWyTee1ke6nlchIPNWFYB8nxxJytJwQcHVOJtWblktRr7LPdKSlkR1cRq 4Qiv+gNtv+JoYNoy96kCKrT1WWwirlP2tumekR2niru8h0N68Ntnloynuuk3+qPa 4w4uq+fOdPube6DSEHKV54RktMOcwOTb7vCgVR4JrCyobV6v/ZxcIGq9s94FHKy8 5KZuMB0kLYoFyeZoj7ZKmtUJvHxrxoPgHTI3lvj+pOGV2D6MgPl2S4CFmIpxm1HP DnS6jc60/nTjjoYOTu0GaZDUOYxVAr00sDi/VMMqGg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdelgdejfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkjghffffhvffutgfgsehtqh ertderreejnecuhfhrohhmpedfffgrvhgvucevohhtthhlvghhuhgsvghrfdcuoegutghh sehskhhunhhkfigvrhhkshdrrghtqeenucggtffrrghtthgvrhhnpeefhfejgeeugefhie fgieelfeevueduheffhedvleeglefhudduffegudeuhedutdenucffohhmrghinhephhgv giguohgtshdrphhmpdhgihhthhhusgdrtghomhenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpegutghhsehskhhunhhkfigvrhhkshdrrght X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 34CC736A005D; Wed, 4 May 2022 10:17:20 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-591-gfe6c3a2700-fm-20220427.001-gfe6c3a27 List-Id: Support of Erlang-related ports List-Archive: https://lists.freebsd.org/archives/freebsd-erlang List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-erlang@freebsd.org Mime-Version: 1.0 Message-Id: In-Reply-To: References: <42EA9771-2440-49D3-BEFA-05A888F8D90A@patmaddox.com> Date: Wed, 04 May 2022 14:16:53 +0000 From: "Dave Cottlehuber" To: "Pat Maddox" , erlang Subject: Re: package mix release works, port doesn't? (and neither is self-contained) Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4Ktf6S6GZxz3Qcy X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=skunkwerks.at header.s=fm2 header.b="Q SbwVbr"; dkim=pass header.d=messagingengine.com header.s=fm1 header.b=yF2h7BZq; dmarc=none; spf=pass (mx1.freebsd.org: domain of dch@skunkwerks.at designates 66.111.4.29 as permitted sender) smtp.mailfrom=dch@skunkwerks.at X-Spamd-Result: default: False [-3.25 / 15.00]; XM_UA_NO_VERSION(0.01)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:66.111.4.29]; RCVD_COUNT_THREE(0.00)[4]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[skunkwerks.at:+,messagingengine.com:+]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.66)[-0.659]; RCVD_IN_DNSWL_LOW(-0.10)[66.111.4.29:from]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:19151, ipnet:66.111.4.0/24, country:US]; RCVD_TLS_LAST(0.00)[]; SUBJECT_HAS_QUESTION(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[skunkwerks.at:s=fm2,messagingengine.com:s=fm1]; FREEFALL_USER(0.00)[dch]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[skunkwerks.at]; DWL_DNSWL_LOW(-1.00)[messagingengine.com:dkim]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MLMMJ_DEST(0.00)[freebsd-erlang]; MID_RHS_WWW(0.50)[] X-ThisMailContainsUnwantedMimeParts: N On Wed, 4 May 2022, at 11:16, Pat Maddox wrote: > On 4 May 2022, at 4:06, Pat Maddox wrote: > >> So my questions are: >> >> 1. What is going on with poudriere that=E2=80=99s different, where th= e=20 >> package runs fine but the built port crashes? probably PATH yielding different erlang/elixir versions; these will have *slightly* different version numbers of OTP libraries, and the system then can't start up as the located ERTS has differing versions of the expected libraries. Hard to tell from those errors. >> 2. How do I fix it? - ensure your path is clean ;-) - do your prod release with erts included - prepend /usr/local/lib/$APP/erts-$VERSION/bin >> 3. Why do the package and port require an erlang runtime to run, if=20 >> I=E2=80=99m using mix release? > > Of course after being stuck on this for a couple hours, I answered the=20 > first two questions just a few minutes after posting: the=20 > erlang-runtime24 dependency was getting installed via normal FreeBSD=20 > package source, rather than my poudriere built version. So it was a=20 > version mismatch between the build dependency and run dependency. > > I still don=E2=80=99t understand why I need an erlang runtime at all t= hough,=20 > after the mix release has been built. > > Pat you don't; whether erts is bundled in the release is defined in your mix release config. I'm assuming your ExAmple app picks up whatever the default is, see the hello app for an appropriate example. https://hexdocs.pm/mix/Mix.Tasks.Release.html &=20 https://github.com/skunkwerks/hello/blob/master/rel/config.exs#L33 I've tried both approaches in the past, and now I always bundle erts within the application. You do need to run the epmd daemon somewhere, this is easily enough done via including lang/erlang as a package dependency, or via your CI/CD deployment tools, and starting the epmd service that is provided on FreeBSD. I suggest taking a close look through build.sh, app.sh and the rc.d wrapper in the hello app above, each of the lines there deals with all these nasty little issues. A+ Dave