Tomasz CEDRO
2020-Apr-08 16:05 UTC
/usr/src/release/release.sh -> ports -> fetch pkg -> Bad system call (core dumped)
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. I need to see how it works with `make release` :-)> 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): 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. 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. I saw some ramdisk tricks I need to try that as well :-) Best regards :-) Tomek -- CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
Ruslan Garipov
2020-Apr-08 18:19 UTC
/usr/src/release/release.sh -> ports -> fetch pkg -> Bad system call (core dumped)
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/