From nobody Wed Feb 07 19:10:11 2024 X-Original-To: freebsd-questions@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 4TVV7P2SMpz59v05 for ; Wed, 7 Feb 2024 19:10:25 +0000 (UTC) (envelope-from jfadams1963@proton.me) Received: from mail-4322.protonmail.ch (mail-4322.protonmail.ch [185.70.43.22]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "protonmail.com", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TVV7L4DBkz4qmH; Wed, 7 Feb 2024 19:10:22 +0000 (UTC) (envelope-from jfadams1963@proton.me) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=proton.me header.s=protonmail header.b=NrEXkJ0V; dmarc=pass (policy=quarantine) header.from=proton.me; spf=pass (mx1.freebsd.org: domain of jfadams1963@proton.me designates 185.70.43.22 as permitted sender) smtp.mailfrom=jfadams1963@proton.me DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1707333019; x=1707592219; bh=5K6Av5/ss0D30GFRxwckJaauzqo0xdaQ496jh2MbcXc=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=NrEXkJ0VY6Ipyf08XIWCoP/xtF3vycr8JMDQ2RWPS3qT7cYt3GmHDxKLAMayk7qrU l6sfPaIScqAaLpixqrESjOJjGjysoQBHD7uO6c4SZpurA1d73gcEayBMXtJRZHcmIA pd2vpc9A0RJDP1vLHlMfGsvp4Zio0CPRyIqa24w/zZldnlqUIjKRycmDp8yitfegCV 0SWXnpxq8r4JSzt9qZXMTKhUUFURyyXY7OmOk/tXiGCCk0eB8zwHR38KDj8ngEG+Pn ohhn/eQMU9sJUnQkMLgmzxdnGQ3oiUZiYKiR60/PzdV/ErnzByOIPs6SSDOcVX1MWv PWXj7627CluRQ== Date: Wed, 07 Feb 2024 19:10:11 +0000 To: Greg 'groggy' Lehey From: Jonathan Adams Cc: freebsd-questions@freebsd.org Subject: Need help with a makefile [RESOLVED] Message-ID: <8_kmThiamXBYyS8xs6DcL-Sdkr244nfiKNXas7jkXifkzGss3sleWGJN6n4BV7jof6jpKK9vHnYVpKImQHAbGuGlJindprbvtRFh04q_PI4=@proton.me> Feedback-ID: 80741059:user:proton List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha512; boundary="------6a3af690dbb45741cc9b4074f147ff6e654fb4d5f1af84f9bad2042041e59a49"; charset=utf-8 X-Spamd-Bar: ------ X-Spamd-Result: default: False [-6.50 / 15.00]; SIGNED_PGP(-2.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[proton.me,quarantine]; RWL_MAILSPIKE_EXCELLENT(-0.40)[185.70.43.22:from]; R_DKIM_ALLOW(-0.20)[proton.me:s=protonmail]; MIME_GOOD(-0.20)[multipart/signed,multipart/mixed,text/plain]; R_SPF_ALLOW(-0.20)[+ip4:185.70.43.0/24]; TO_DN_SOME(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:+,3:~]; MISSING_XM_UA(0.00)[]; ASN(0.00)[asn:62371, ipnet:185.70.43.0/24, country:CH]; MID_RHS_MATCH_FROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_ZERO(0.00)[0]; DKIM_TRACE(0.00)[proton.me:+]; MLMMJ_DEST(0.00)[freebsd-questions@freebsd.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; HAS_ATTACHMENT(0.00)[] X-Rspamd-Queue-Id: 4TVV7L4DBkz4qmH This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------6a3af690dbb45741cc9b4074f147ff6e654fb4d5f1af84f9bad2042041e59a49 Content-Type: multipart/mixed;boundary=---------------------3e7f700f00977538666d4b1f8c95175e -----------------------3e7f700f00977538666d4b1f8c95175e Content-Transfer-Encoding: quoted-printable Content-Type: text/plain;charset=utf-8 On Tuesday, February 6th, 2024 at 10:38 PM, Greg 'groggy' Lehey wrote: > However, I've put this through gmake, and it complains: > > $ gmake > Makefile:7: extraneous text after 'ifeq' directive Hi Greg, et al., The above error was do to the line continuation backslashes. Installed g= make, took out the backslashes and, presto, it "just works". On FBSD, that= is. In my little project, I was using getpass(), but have changed to readpas= sphrase(). Great, but on Linux that's in /usr/include/bsd. So I added to m= y main source file: #ifdef BSD #include #endif #ifdef LINUX #include #endif And as I say, no problem on FBSD. To try it on Linux, I fired up my GitPod Ubuntu/Debian instance and foun= d that I had to install the libbsd0 and libbsd-dev packages first. However= , when I first compiled, GCC complained: undefined reference to `readpassphrase' Oops! I added `-l:libbsd.a` to the linker arguments and it compiles fine u= nder Linux now. ifeq ($(UNAME),FreeBSD) CFLAGS +=3D -DBSD else ifeq ($(UNAME),Linux) CFLAGS +=3D -DLINUX LDFLAGS +=3D -l:libbsd.a endif Unfortunatly, the program segfaults when I run it! Works fine on FBSD. W= ell, I've got something "constructive" to do today! Thanks again everyone, -=C2=A0Jonathan ____________________________________________ "Before Turing, things were done to numbers. After Turing, numbers began doing things" - George Dyson -----------------------3e7f700f00977538666d4b1f8c95175e-- --------6a3af690dbb45741cc9b4074f147ff6e654fb4d5f1af84f9bad2042041e59a49 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: ProtonMail wnUEARYKACcFgmXD1XYJkI6O/sbt8r3IFiEEcBGzOO9wDbcpT/10jo7+xu3y vcgAALKXAP9U+Ulm42tehbrrZIEJKFzzoJBqRbjCVTQ5648THUW/9AEAo2aS K8bAdUn4WMBjJsh8RgwzV6p+UHRBrgiAm6T/dQQ= =n9CE -----END PGP SIGNATURE----- --------6a3af690dbb45741cc9b4074f147ff6e654fb4d5f1af84f9bad2042041e59a49--