From owner-freebsd-ports@freebsd.org Wed Apr 8 18:19:35 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 3EAA62783F2; Wed, 8 Apr 2020 18:19:35 +0000 (UTC) (envelope-from ruslanngaripov@gmail.com) Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48yCGs74Ssz4T0M; Wed, 8 Apr 2020 18:19:33 +0000 (UTC) (envelope-from ruslanngaripov@gmail.com) Received: by mail-lj1-x242.google.com with SMTP id r24so8713443ljd.4; Wed, 08 Apr 2020 11:19:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=8jOpa0y9DDdX+ZUSfedA6Xqyx/QAB3AZo+S6iHcnkCs=; b=cJ3aZJqTYWs6F6KPfMIf12bb3ZSBm9100AJkXTwylUvkUWILcxJdY6dMg6XIUcPm+9 z0bxTM1bMUh3S1oU5IoKJ/eFpEuBbC1/ZahRVK1ddjVEdrdo0QDlZZpAdTjRB3rU06Tr +GWkohJgDptQ6fRqme5zGrfZDdhsvPvAWL7FFAo+UThJBbjAF9UGXjD1DAMuIybKc2FY bW6uFaYkaZ3tBnrORuKPFHmcciXEUSEKCh6pUOvDkYIYHt7dYFoW8TFN6OyTnPA/mD17 hPn1PiqPEcOwB/uckIYzE4el8JBBRJ9zEsDqvAuuL/wzNHOZajbq9BRoLUgzCUrhKMJF +FLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=8jOpa0y9DDdX+ZUSfedA6Xqyx/QAB3AZo+S6iHcnkCs=; b=m1ncnzog14GYxSaBbV+vFVDV+m10Utdw3u7wXeniBo2ykbYraPF1xPP0Xk2dif9z+A 4/eqLpyS9V4hk9+4bA6fMZVGVbqudCn/2iEdWLYjcLqgqbp2p2BjCaovnIWEdbI+PbJs s+R7/OouNlG/VAHZPKzCbCQO1PLAxyVP9rnT+pY0Kjn4M3bK2+cAPDmxi3B0CSrl+SF5 vSEll/q2MmC3DExqsUJ7OXaVsCtcl/1Wh1XrR+lyTdk/eH5v1lgQ91OMicx9zqkuqCcg 4Qu3WKEeMbVBBSyN4rvnszFX5LCRrwuXWHugVlMQlcK5Asf/W5IlAniRl5ol3pAPwjMB IpiQ== X-Gm-Message-State: AGi0PuY2/jXNB2s1YYmyIx8NpPf6w8HQFO2cJ49/3c5DatuMuFpEfeRD P+cfhI3R2HjvSYbkms7cldQI7/p8Gfk= X-Google-Smtp-Source: APiQypLjcRBfh/ZCL1eTo+clhWBNnN2kewS9flJ8FcBX7+xdCVcW4008T8G/rBNj3ju3GqkfU+CITw== X-Received: by 2002:a2e:4942:: with SMTP id b2mr5944871ljd.135.1586369971828; Wed, 08 Apr 2020 11:19:31 -0700 (PDT) Received: from [192.168.1.3] ([46.48.69.183]) by smtp.gmail.com with ESMTPSA id o2sm13925421ljm.2.2020.04.08.11.19.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 08 Apr 2020 11:19:31 -0700 (PDT) Subject: Re: /usr/src/release/release.sh -> ports -> fetch pkg -> Bad system call (core dumped) To: Tomasz CEDRO Cc: FreeBSD Questions Mailing List , FreeBSD Stable , freebsd-ports References: <281e95ff-a1c2-c759-2918-783cb8edf1b7@gmail.com> <67026913-5a6d-4763-a985-e2739de9d147@gmail.com> From: Ruslan Garipov Message-ID: Date: Wed, 8 Apr 2020 23:19:26 +0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 48yCGs74Ssz4T0M X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=cJ3aZJqT; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of ruslanngaripov@gmail.com designates 2a00:1450:4864:20::242 as permitted sender) smtp.mailfrom=ruslanngaripov@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(0.00)[ip: (2.76), ipnet: 2a00:1450::/32(-2.36), asn: 15169(-0.43), country: US(-0.05)]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE_FREEMAIL(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2.4.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0] X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2020 18:19:35 -0000 On 4/8/2020 9:05 PM, Tomasz CEDRO wrote: > On Sun, Apr 5, 2020 at 7:53 PM Ruslan Garipov wrote: >>> I wrongly assumed that release will simply update this svn repo that I >>> am working on.. but it fetches HEAD.. so I was trying to build >>> 13/HEAD/CURRENT on 12/STABLE/RELEASE that have different ABI thus bad >>> syscall.. and I need CURRENT to build CURRENT, right? :-) >> I believe in order to build the source tree you just need a compatible >> toolchain. So you can build the source tree for 13.0-CURRENT on >> 12.1-RELEASE system. But you need CURRENT to **run** userland with ABI >> from the CURRENT. > > Long story short I need 13-CURRENT to create a 13-CURRENT release with > release(7) because on 12-STABLE/RELEASE chroot with 13-CURRENT does > not work. Of course, because release(7) runs built userland; in your case it runs userland with FreeBSD 13 ABI on FreeBSD 12.x host. > I need to see how it works with `make release` :-) This is what I meant when saying "you can build the source tree for 13.0-CURRENT on 12.1-RELEASE"; sorry if I've confused you. Check ``Building with release.sh on -STABLE'' thread[1] on the forum. May be it can help you. > > >> Once again: for native build `make release` may be quite easy and fast. >> release(7) guarantees "absolutely clean build environment". > > Will try that `make release` as well, also for 13-CURRENT on > 12-STABLE, thank you! Also will compare the time cost with the one > presented below :-) > > > Creating a "release" also has this advantage that I have memstick > images that I can boot from directly, test what I need, even no need > to install :-) > > Here are my build times, for a release for AMD64/12-STABLE, I did not > select DOC nor PORTS to build, only Kernel and Base :-) > > BUILD HOST (~$500): HP PROLIANT DL380G7X (HDD 1TB, 128GB RAM, 24vCPU = > 2 x Intel Xeon X5660 @2.8GHz = 2 PACKAGES x 6 CORES x 2 HW THREADS ) > INTERNET: 600/60MBit > > time make clean buildkernel (16x speedup with SMP): > 2472.027u 291.657s 46:34.54 98.8% 38592+3123k > 195123+3315182io 80167pf+0w > -j12 2355.140u 282.807s 3:40.12 1198.4% 38509+3121k > 190142+3361605io 71356pf+0w > -j24 3672.641u 382.254s 2:54.85 2319.0% 39837+3149k > 218567+3361605io 64857pf+0w > -j48 3722.707u 352.940s 3:07.10 2178.3% 40328+3169k > 214359+3361607io 66526pf+0w > > time make clean buildworld (12.5x speedup with SMP): > 32223.598u 1940.942s 9:28:07.59 100.2% 46920+3430k > 563493+3074126io 234706pf+0w > -j12 33644.438u 1818.147s 54:46.68 1078.9% 47324+3449k > 485257+3255853io 236896pf+0w > -j24 50728.732u 2556.953s 45:06.66 1968.6% 47556+3455k > 560905+3255862io 229433pf+0w > -j48 51129.166u 2454.564s 44:38.12 2000.7% 47630+3458k > 525602+3255854io 210237pf+0w > > release.sh (seems to auto-adjust -j optimization and below 2h looks > really cool): Yes, release(7) sets number of make(1) jobs to the number of available CPUs (hw.ncpu) for buildworld target, and half of that number for buildkernel one. "2h looks really cool" because release(7) may build chrooted build environment, where it then may build port(s) and builds the target. My Xeons usually spends 1.5 hours on clean release(7) (with 16 make(1) jobs). > 94556.462u 5583.273s 1:43:14.24 1616.6% 50234+3336k > 1457023+16921354io 615421pf+0w > -j12 94477.001u 5577.692s 1:42:59.60 1619.1% 50251+3337k > 1463964+16932952io 617689pf+0w > -j24 94480.274u 5574.117s 1:43:38.89 1608.8% 50213+3336k > 1468685+16931170io 617425pf+0w > -j48 94588.653u 5569.909s 1:43:10.62 1617.9% 50211+3336k > 1460546+16925145io 611229pf+0w > > These times may be even smaller when SSD is used instead of HDD. For me it almost changed nothing, only CPU resources counted. > Also > I wonder how to utilize all RAM to speed up the compilation because I > can see 8..34GB utilization while the rest of 128GB remains unused. By installing additional CPU(s) which will allow you to run more make(1) jobs in parallel. My -j16 builds consume about 16-18 GB (at peaks). > I > saw some ramdisk tricks I need to try that as well :-) > > Best regards :-) > Tomek > [1] https://forums.freebsd.org/threads/building-with-release-sh-on-stable.70889/