From owner-freebsd-stable@freebsd.org Mon Apr 27 16:13:42 2020 Return-Path: Delivered-To: freebsd-stable@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 318A82BE4AB for ; Mon, 27 Apr 2020 16:13:42 +0000 (UTC) (envelope-from brian@aceshardware.com) Received: from mail.aceshardware.com (mail.aceshardware.com [52.52.37.31]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 499qZr6sLRz4HBT for ; Mon, 27 Apr 2020 16:13:40 +0000 (UTC) (envelope-from brian@aceshardware.com) Received: from [10.0.0.30] (unknown [148.64.100.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by mail.aceshardware.com (Postfix) with ESMTPSA id 4D082233BEB for ; Mon, 27 Apr 2020 16:13:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aceshardware.com; s=dkim; t=1588004014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=nZCBK+VUNEt4YwhJ38pONk+blzSV2XBSQLckNR7DWI8=; b=fubSvCZPr1qPugV5MjUwvP/Xvw3/GS79/blZ2qMTdImZFxUJBzOwebnS1dQQErp87v1cW2 y1gWxThZNnqtoP4355iABDt2WJEGcsPpyxabYU93NZC5EN7S73I36G5TL5eJGAIVx76BOl ColnlrUEybHT9H/v7ypD+zDgFtvbALC9wBAXse5cqXJWfDlvFube4u5/9TC6CG1U7Vn7Fg cGjsDXNb2+D/ntwPkkcs5wqP0mmJrHLRIG/hE55RNridtYS360Mk0KA9avgYYK2nrN0VFD UY09XZPb2Qv7d5Bmlx6M7pCIMJ+lKu41cEefeRqxeUSe9/iOgj1IbnKPmxmxVw== Subject: Re: CMake build To: freebsd-stable@freebsd.org References: From: Brian Neal Message-ID: <540dd25f-b57a-6d19-ccdc-82a1945b98e6@aceshardware.com> Date: Mon, 27 Apr 2020 09:13:37 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Thunderbird/76.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Rspamd-Queue-Id: 499qZr6sLRz4HBT X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=aceshardware.com header.s=dkim header.b=fubSvCZP; dmarc=pass (policy=none) header.from=aceshardware.com; spf=none (mx1.freebsd.org: domain of brian@aceshardware.com has no SPF policy when checking 52.52.37.31) smtp.mailfrom=brian@aceshardware.com X-Spamd-Result: default: False [-0.34 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[aceshardware.com:s=dkim]; NEURAL_HAM_MEDIUM(-0.39)[-0.395,0]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.35)[-0.346,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-stable@freebsd.org]; TO_DN_NONE(0.00)[]; URI_COUNT_ODD(1.00)[3]; RCPT_COUNT_ONE(0.00)[1]; DKIM_TRACE(0.00)[aceshardware.com:+]; DMARC_POLICY_ALLOW(-0.50)[aceshardware.com,none]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(0.20)[ipnet: 52.52.0.0/15(1.99), asn: 16509(-0.96), country: US(-0.05)]; ASN(0.00)[asn:16509, ipnet:52.52.0.0/15, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2020 16:13:42 -0000 You might need to pass the library path on the environment or specify it somewhere in CMakeLists.txt. Something like: $ LIBDIR=/usr/local/lib cmake You'll have to check the exact syntax though.  I have had similar issues trying to link LZMA in Dovecot on FreeBSD and specifying the library path resolves it. Cheers, -Brian On 4/27/2020 9:07 AM, Pietro Paolini wrote: > Hi all, > > I am new to FreeBSD even though I have been working in Unix > environments for a long while (mainly Linux). I am struggling to build > a library locally, using cmake - the library builds fine on a Linux > machine as long as dependencies are satisfied. However in my case > CMake gets all the dependencies correctly - namely it finds all > libraries it needs - but it fails lo link them: > > ld: error: unable to find library -lnss3 > ld: error: unable to find library -lsmime3 > ld: error: unable to find library -lssl3 > ld: error: unable to find library -lnssutil3 > ld: error: unable to find library -lplds4 > ld: error: unable to find library -lplc4 > ld: error: unable to find library -lnspr4 > ld: error: unable to find library -lopenjp2 > ld: error: unable to find library -lnss3 > ld: error: unable to find library -lsmime3 > ld: error: unable to find library -lssl3 > ld: error: unable to find library -lnssutil3 > ld: error: unable to find library -lplds4 > ld: error: unable to find library -lplc4 > ld: error: unable to find library -lnspr4 > ld: error: unable to find library -lopenjp2 > > Not a single one is found - I must be doing a silly mistake somewhere > - I am wondering, is there any need from my side to tell CMake I am > about to use not GNU Make ? > > I did not specify anything in my case - I only typed 'cmake ..' > > Thanks, > Pietro > _______________________________________________ > freebsd-stable@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"