From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id iBzzNdkcXWW/wwAAG6o9tA:P1 (envelope-from ) for ; Tue, 21 Nov 2023 22:10:50 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id iBzzNdkcXWW/wwAAG6o9tA (envelope-from ) for ; Tue, 21 Nov 2023 22:10:50 +0100 Received: from mail.notmuchmail.org (yantan.tethera.net [135.181.149.255]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C65143AEBC for ; Tue, 21 Nov 2023 22:10:48 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=peterlawrence.org header.s=zmail header.b="iXu/jU50"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=peterlawrence.org (policy=none); arc=reject ("signature check failed: fail, {[1] = sig:zohomail.com:reject}"); spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org ARC-Seal: i=2; s=key1; d=yhetil.org; t=1700601049; a=rsa-sha256; cv=fail; b=qIpPlWc1BgUO0AgG5QVqOOwI4C18KwQ1NU4h6k+gkK5LLp+EPwD3I87iWNCWaFAtNUlm2l qGmZaRnS0NVZxn/rejxOkuB+JvZ8BbKBfO0K7rqf79/6vlG/2ivOHxeHPqVfI3SFDXMNSj OzbzQ9Hg/Ttzq4HXfN5NXloU2t1uAnFURB+MPcEsEJfZX4/x+Pq/+rhBJHaGfbrEDzZfkw kn1r/b9JLqyAuA1mdcvui8eJz1fO6BKTopKaPC2NJCBJ5ulUT4Shh90tZjVTfKhPEIse1A +lqpk32eMiWCqUw1Jd/aIQS8wtgd32Yc8cd+4FufCEPVvmPhsOycKf4nCgblWQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1700601049; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-owner:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=GjmMj2oXwv2yYefDFpdWSuuZ6fzccvdQGutuA8jLuWo=; b=taSh7KvzTrIR7es+dui8lyZgv9KLvUuwV/irFcsBgM3XW+8NyxoVcEN9LpaOAWsQ4qEhQk lToLvfQOiakjPGzx8jfCJgbgwOjXAp+rqpbPdbAJn2mn8jQCMG9BgKySIgueWt88RitlON ze/nFu8A2NNTH0Kj0tM+SUHms2uwSwCDF8OhBeq3XEBzsTTVwTONsbKBlhNp4eyL9r27ek gK8C5TWoZFQ+m1uxxEDck9p4uXAQ+bHeig8QbChkaoi1MiRE6ltspzyfov3yDbkMFUai0T CfX17UaR5/mS2rRmh2TN89u231b2xgXIKcpbME8k1yXLpvV9ObEGPPDpfvW2hg== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=peterlawrence.org header.s=zmail header.b="iXu/jU50"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=peterlawrence.org (policy=none); arc=reject ("signature check failed: fail, {[1] = sig:zohomail.com:reject}"); spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 660FC5F727; Tue, 21 Nov 2023 21:00:24 +0000 (UTC) Received: from sender4-op-o15.zoho.com (sender4-op-o15.zoho.com [136.143.188.15]) by mail.notmuchmail.org (Postfix) with ESMTPS id F029F5E017 for ; Tue, 21 Nov 2023 21:00:21 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; t=1700600417; cv=none; d=zohomail.com; s=zohoarc; b=WrUnCQ22j9jruddkE4ztZdRZLJdDXfNYcA3KOSHHM9D/jGm4koY/88qFljvWSfJdbeYf8iFOCdO7VWD1RsYydCJUIB+J+Nc3dQMsTirpd5v0HbIR4RM3s7J9Wf8hVrgxvqLou69s6mDAYo5S/Rd36DvmWoyn3Y8aNqvjE0BmL4M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1700600417; h=Content-Type:Date:Date:From:From:In-Reply-To:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=cAQqILylBpvAUybTaV+mLi0EGOcdWY4WRuig8g8RV0o=; b=QzD5HN5WUwnOxkAwXbdlh8NAcWlPYBWjsRlPxsGiG2KV6/xe7RZ/zJWMCrnTv5kbPpIn7RSHWztbaheyoqQpFdTWZE/PGRiu5p7gjurxHRlyFml9PXUQtRCt8hIZzq1Lf5nnov/pOYG0bFM9J6HbMqk9n6GpfYWD8VeMbYDMOUI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=peterlawrence.org; spf=pass smtp.mailfrom=peter@peterlawrence.org; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1700600417; s=zmail; d=peterlawrence.org; i=peter@peterlawrence.org; h=Content-Type:Date:Date:Message-Id:Message-Id:Subject:Subject:From:From:To:To:References:In-Reply-To:Reply-To:Cc; bh=cAQqILylBpvAUybTaV+mLi0EGOcdWY4WRuig8g8RV0o=; b=iXu/jU50EiiH77j9k8tVpN6PKO/em2fkCwIqFsJq9N0dZuGMjl6xGlUXLOlYqPHp O8PiL0OOmr3qMtH5C42++W3hr6AvxlfNRDLTs+1fAd8IIpSG/GpEqnA955fVeqUWyP4 2rHyyGwyKYASE2lIwWufsj+3BCnd2TjbNE5nTEpg= Received: from localhost (136.54.103.1 [136.54.103.1]) by mx.zohomail.com with SMTPS id 1700600414777178.80977549579404; Tue, 21 Nov 2023 13:00:14 -0800 (PST) Date: Tue, 21 Nov 2023 16:00:13 -0500 Message-Id: Subject: Re: macOS and go language bindings From: "Peter Lawrence" To: "Carl Worth" , X-Mailer: aerc 0.16.0 References: <87il5uud6l.fsf@wondoo.home.cworth.org> In-Reply-To: <87il5uud6l.fsf@wondoo.home.cworth.org> X-Zoho-Virus-Status: 1 X-Zoho-AV-Stamp: zmail-av-1.1.0/200.579.24 Message-ID-Hash: ZGF4RZERLEV7VJWSET4LQ4IVACW35LYI X-Message-ID-Hash: ZGF4RZERLEV7VJWSET4LQ4IVACW35LYI X-MailFrom: peter@peterlawrence.org X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0 X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: multipart/mixed; boundary="===============2423538471702141446==" X-Migadu-Flow: FLOW_IN X-Migadu-Country: DE X-Migadu-Scanner: mx11.migadu.com X-Spam-Score: 7.11 X-Migadu-Queue-Id: C65143AEBC X-Migadu-Spam-Score: 7.11 X-TUID: O250lCzbYSO/ --===============2423538471702141446== Content-Type: multipart/signed; boundary=942fb0b227ed6f6669c71f63104986c7b285669f7d1277c4887eb25180bd; micalg=pgp-sha512; protocol="application/pgp-signature" --942fb0b227ed6f6669c71f63104986c7b285669f7d1277c4887eb25180bd Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 On Tue Nov 21, 2023 at 2:19 PM EST, Carl Worth wrote: > On Sun, Nov 19 2023, Peter Lawrence wrote: > > Hi. > > Hi Peter! > > > I'm trying to build an email client (aerc) with support for notmuch > > on macOS. aerc is written in go. I can't find an aerc package for brew > > which includes notmuch headers/library files. Where can I get these > > language bindings and how do I "install" them, or where do I place them > > in the aerc source directory to get the notmuch library built and then > > accessible to aerc? > > I don't have much direct experience with either macOS nor the Go > language bindings to notmuch, but I'll see how far I can get in > answering your questions. > > The Go bindings for notmuch are in the contrib/go directory of the > source distribution which you can get from the latest source release > > > https://notmuchmail.org/releases/notmuch-0.38.tar.xz > > Or via git: > > git clone https://git.notmuchmail.org/git/notmuch > > There's a brief README and a Makefile in the contrib/go directory, but > I'm not exactly clear on how things are supposed to work. > > When I type "make" the first command it runs is "go install notmuch" > which fails as follows: > > $ go install notmuch > go: 'go install' requires a version when current directory is not in a mo= dule > Try 'go install notmuch@latest' to install the latest version > > The advice from the error message doesn't help much: > > $ go install notmuch@latest > go: notmuch@latest: malformed module path "notmuch": missing dot in first= path element > > I'm guessing someone who knows even a tiny bit about go modules might be > able to explain what's needed here, so we can fix the Makefile to > actually work? > > -Carl Thanks for the feedback, Carl! I have a feeling now that this isn't just a macOS issue, but possibly a broader issue that would effect anyone using a newer version of Go. I followed your steps as well and got the same results. It seems that Go changed some things around release 1.13 such that there is now a "module" mode for Go instead of a GOPATH mode. Newer versions of Go default to using the module mode rather than GOPATH mode. I found this=20 blurb about Go environment variables:=20 GO111MODULE Controls whether the go command runs in module-aware mode or GOPATH mode. May be "off", "on", or "auto". See https://golang.org/ref/mod#mod-commands. So, I set my GO111MODULE to off with this command: go env -w GO111MODULE=3D"off" This helped. Then, I had to strip out some commented out lines in the notmuch.go file under src/ Now when I compile with "make", I get some 75 lines of errors, similar to the following: src/notmuch/notmuch.go:89:8: could not determine kind of name for C.free src/notmuch/notmuch.go:1047:8: could not determine kind of name for C.notmu= ch_bool_t src/notmuch/notmuch.go:251:15: could not determine kind of name for C.notmu= ch_database_add_message src/notmuch/notmuch.go:96:15: could not determine kind of name for C.notmuc= h_database_create src/notmuch/notmuch.go:140:16: could not determine kind of name for C.notmu= ch_database_destroy src/notmuch/notmuch.go:315:15: could not determine kind of name for C.notmu= ch_database_find_message I am guessing that the go compiler (mine is at 1.20.8) doesn't like the source in notmuch.go. This may have been written a while ago? I'm definitely over my head in the Go world at this point. I wonder if anyone proficient with Go might know how to get the source to build against a Go 1.20+ version? --=20 Peter Lawrence --942fb0b227ed6f6669c71f63104986c7b285669f7d1277c4887eb25180bd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQR4IEY1Xd+gZj9KEeZr2o/SNc+2lwUCZV0aXgAKCRBr2o/SNc+2 l49GAQCI7OA1yZ4lgVixt4bIA3JstocFpPz92FzYclQ7XiqKcgD9HtfpTFf04lw5 J8fqNGvnV3DTvM5Do6SyU7FhISqxtAQ= =AjUo -----END PGP SIGNATURE----- --942fb0b227ed6f6669c71f63104986c7b285669f7d1277c4887eb25180bd-- --===============2423538471702141446== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============2423538471702141446==--