It is not clear to me why this happens, but on my 14-CURRENT machine I do not seem to be able to build MSBuild due to the following error: ============= MSBuild command ============= /big/ports/usr/ports/devel/msbuild/work/msbuild-0.06/build/../artifacts/mono-msbuild/msbuild "/big/ports/usr/ports/devel/msbuild/work/msbuild-0.06/build/Toolset.proj" /t:restore /m /clp:Summary /warnaserror /v:minimal /bl:"/big/ports/usr/ports/devel/msbuild/work/msbuild-0.06/build/../artifacts/Release-MONO/log/Toolset.binlog" =========================================== Microsoft (R) Build Engine version 15.8.38.37692 (xplat-master/3c930fa8 Tue May 8 12:36:23 EDT 2018) for Mono Copyright (C) Microsoft Corporation. All rights reserved. MSBUILD : error MSB1008: Only one project can be specified. Switch: /m This can be fixed by making sure the /m is given the parameter (number of CPUs to use in parallel). MSBuild does not seem to parallelize builds currently, but this fixes the error.
Created attachment 243875 [details] 0001-devel-msbuild-Avoid-MSB1008-build-error.patch Patch to pass the /m:${MAKE_JOBS_NUMBER} parameter
Thank you for your submission. Would you be interested in taking up maintainership of this port? It is quite a bit out of date and could benefit from some attention. As for your patch, please do not use REINPLACE_CMD for static replacements as per Porter's Handbook. I recommend having a patch file that adds something like /m:%%MAKE_JOBS_NUMBER%% and to then just have ${REINPLACE_CMD} -e s/%%MAKE_JOBS_NUMBER%%/${MAKE_JOBS_NUMBER} ${WRKSRC}/build/build.sh I also recommend doing this dynamic replacement in pre-configure so it's easy to run "make makepatch" after "make patch" (but not "make configure") to regenerate the patches.
I am not sure I am competent enough to maintain such a port. Sadly, mono@FreeBSD.org seems to be dead. For example, I do not fully understand why I seem to be the only one getting this error. Can you or anyone try to reproduce it on their own? (just try to "make" the port currently in the tree). I don't even know who to check build status on the port building cluster. Thank you for having a look at it so fast, I'll apply your suggestions.
Created attachment 243910 [details] 0001-devel-msbuild-Avoid-MSB1008-build-error.patch Updated patch with %%MAKE_JOBS_NUMBER%%
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=fed755e222a5c6fba13458265e0c0378de139046 commit fed755e222a5c6fba13458265e0c0378de139046 Author: Marcin Cieślak <saper@saper.info> AuthorDate: 2023-08-05 23:55:13 +0000 Commit: Robert Clausecker <fuz@FreeBSD.org> CommitDate: 2023-08-09 13:01:14 +0000 devel/msbuild: Avoid MSB1008 build error The following error: ============= MSBuild command ============= /big/ports/usr/ports/devel/msbuild/work/msbuild-0.06/build/../artifacts/mono-msbuild/msbuild "/big/ports/usr/ports/devel/msbuild/work/msbuild-0.06/build/Toolset.proj" /t:restore /m /clp:Summary /warnaserror /v:minimal /bl:"/big/ports/usr/ports/devel/msbuild/work/msbuild-0.06/build/../artifacts/Release-MONO/log/Toolset.binlog" =========================================== Microsoft (R) Build Engine version 15.8.38.37692 (xplat-master/3c930fa8 Tue May 8 12:36:23 EDT 2018) for Mono Copyright (C) Microsoft Corporation. All rights reserved. MSBUILD : error MSB1008: Only one project can be specified. Switch: /m can be fixed by making sure the /m is given the parameter (number of CPUs to use in parallel). MSBuild does not seem to parallelize builds currently, but this fixes the error. PR: 272961 Approved by: portmgr (build fix blanket) devel/msbuild/Makefile (mode +x) | 9 +++++++-- devel/msbuild/files/patch-Directory.Build.rsp (new) | 6 ++++++ devel/msbuild/files/patch-build_build.sh | 13 +++++++++++-- 3 files changed, 24 insertions(+), 4 deletions(-)
Thank you for your contribution.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=1e14213dcfa204b7b1fb26a3774a8b8574ac4960 commit 1e14213dcfa204b7b1fb26a3774a8b8574ac4960 Author: Jan Beich <jbeich@FreeBSD.org> AuthorDate: 2023-08-10 10:03:09 +0000 Commit: Jan Beich <jbeich@FreeBSD.org> CommitDate: 2023-08-10 10:39:09 +0000 devel/msbuild: drop executable bit after fed755e222a5 PR: 272961 devel/msbuild/Makefile (mode -x) | 0 1 file changed, 0 insertions(+), 0 deletions(-)