From owner-freebsd-ports@freebsd.org Wed Sep 23 19:48:57 2020 Return-Path: Delivered-To: freebsd-ports@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4269F42510B for ; Wed, 23 Sep 2020 19:48:57 +0000 (UTC) (envelope-from idefix@fechner.net) Received: from anny.lostinspace.de (anny.lostinspace.de [IPv6:2001:608:a02::33]) (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 4BxTJS0fR8z4GWZ for ; Wed, 23 Sep 2020 19:48:55 +0000 (UTC) (envelope-from idefix@fechner.net) Received: from server.idefix.lan (016-152-117-131.ip-addr.inexio.net [131.117.152.16]) (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) (Authenticated sender: idefix@fechner.net) by anny.lostinspace.de (Postfix) with ESMTPSA id 86D10E6B22 for ; Wed, 23 Sep 2020 21:48:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fechner.net; s=default; t=1600890532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s6fIvXHogNBjBZmCzSqHmmLC/hbESySV3/mNeAQN7rg=; b=HhdtAEGOPRCvsQEd7vi0OdPEEambyDptyNf0vkUospFPB+5HilwO8Od1FMScil15mZaeLF MfNat55N6gskHYI6Ru/SyR8hyxQ/4RRMt6Vro+QLmUvhEVaj2n1IqdX6pa3GM9vx2pL3Au aIjH5KSuokirkCxZ572ZOG6kmL+8f+E= Received: from [192.168.0.151] (016-152-117-131.ip-addr.inexio.net [131.117.152.16]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by server.idefix.lan (Postfix) with ESMTPSA id 50487517DBA for ; Wed, 23 Sep 2020 21:48:51 +0200 (CEST) To: freebsd-ports@freebsd.org From: Matthias Fechner Subject: Help with go based port (invalid flag in pkg-config --libs: -D_THREAD_SAFE ) Message-ID: <472de244-207e-66ad-128f-859a90817696@fechner.net> Date: Wed, 23 Sep 2020 21:48:48 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.2.2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-Rspamd-Server: anny.lostinspace.de X-Rspamd-Queue-Id: 4BxTJS0fR8z4GWZ X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=fechner.net header.s=default header.b=HhdtAEGO; dmarc=pass (policy=none) header.from=fechner.net; spf=pass (mx1.freebsd.org: domain of idefix@fechner.net designates 2001:608:a02::33 as permitted sender) smtp.mailfrom=idefix@fechner.net X-Spamd-Result: default: False [-6.03 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[fechner.net:s=default]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_MED(-2.00)[fechner.net:dkim]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+a]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-ports@freebsd.org]; TO_DN_NONE(0.00)[]; RCVD_DKIM_ARC_DNSWL_MED(-0.50)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.03)[-1.029]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_HAM_MEDIUM(-1.00)[-1.001]; RCVD_IN_DNSWL_MED(-0.20)[2001:608:a02::33:from]; DKIM_TRACE(0.00)[fechner.net:+]; DMARC_POLICY_ALLOW(-0.50)[fechner.net,none]; NEURAL_HAM_SHORT(-0.30)[-0.304]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:5539, ipnet:2001:608::/32, country:DE]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-ports] X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Sep 2020 19:48:57 -0000 Dear all, I currently package a new gitaly version which is required for gitlab-ce = 13.4.0. The current version I have now can be found here: https://gitlab.fechner.net/mfechner/Gitlab/-/tree/13.4/devel/gitaly But for this port there are a lot of upstream changes which causes now=20 some problems compiling it. It seems that a new go dependency is added that requires libgit2 as a=20 dependency. I used the following command to better see the error message: poudriere testport -p gitlab -j 121amd64 -i devel/gitaly In the shell I executed then: cd=20 /wrkdirs/usr/ports/devel/gitaly/work/gitaly-cf359cb573106371a6026bd85c314= 5caabf8c06b-cf359cb573106371a6026bd85c3145caabf8c06b/ gmake And then a tried the following: cd /root/go/pkg/mod/github.com/libgit2/git2go/v30@v30.0.5 pkg-config --cflags --static -- libgit2 pkg-config --libs --static -- libgit2 go build github.com/libgit2/git2go/v30: invalid flag in pkg-config=20 --libs: -D_THREAD_SAFE I think the problem is somehow related to the output of: pkg-config --libs --static -- libgit which shows: -L/usr/local/lib -lgit2 -lrt -pthread -lz -L/usr/local/lib -lssh2=20 -L/usr/local/lib -lssl -L/usr/local/lib -pthread -lcrypto -pthread=20 -lpcre -D_THREAD_SAFE -pthread The error message I was able to found in the log: go build github.com/libgit2/git2go/v30: invalid flag in pkg-config=20 --libs: -D_THREAD_SAFE The full log is here: https://pkg.fechner.net/data/121amd64-gitlab/2020-09-23_11h17m24s/logs/er= rors/gitaly-13.4.0.log The log is really hard to read, as go executed several compiles at once. I tried to limit it to one thread using: GO_BUILDFLAGS+=3D "-x -p 1" but this does not work. I tried to add compiler:c11 to the use flags, but this does not help (it = seems that pkgconfig is for sure required). It would be really great if someone could help me, fixing this problem=20 so I can release the next gitlab-ce 13.4 upgrade. Thanks a lot. Gru=C3=9F Matthias --=20 "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning." -- Rich Cook