From nobody Wed Aug 28 05:16:11 2024 X-Original-To: freebsd-ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wtt1J59g4z5MqlP for ; Wed, 28 Aug 2024 05:16:20 +0000 (UTC) (envelope-from tatsuki_makino@hotmail.com) Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01olkn2071.outbound.protection.outlook.com [40.92.52.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "DigiCert Cloud Services CA-1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wtt1H4MCcz4Vxw for ; Wed, 28 Aug 2024 05:16:19 +0000 (UTC) (envelope-from tatsuki_makino@hotmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=hotmail.com header.s=selector1 header.b=IfTCY6b5; dmarc=pass (policy=none) header.from=hotmail.com; spf=pass (mx1.freebsd.org: domain of tatsuki_makino@hotmail.com designates 40.92.52.71 as permitted sender) smtp.mailfrom=tatsuki_makino@hotmail.com; arc=pass ("microsoft.com:s=arcselector10001:i=1") ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=p/+gPLy6QcLgcqQHQx+MxP4AY4qTgR+4t9Dg8BOoI8bHB1N6wQCIU4JVzPdSe1XWEpKa+UJf2M2MMf3+ZEAgcCz4Pi56kWPf1ahRvUTUjXIBMhMjLNe8tVfYQNsxbn9Bu5krUBreS5ugMhS9ZEdhHi5Amk5zon2eZ9YAc+s9YdU3Ql2rQETEKFWx9Yb94eVHpy8igDCsUq8N2hlXtK+kGPatyQ/RrYzq+zT8qcLmPCp7G6HIHlBiD/CMMI+3Phej0jaZULsxgVMV1iUOHiyF+deTIquz07y+O9U9p2TVYPH4FB1ikAuDIfQhKGsvz+HRYJ+jCkjfgcbfz6BYJtEQtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+UUTH0FsoHIhep5H02aSf67qJuBy5rAeQJBeWrE6oYE=; b=sIANxL3FACyXMZAvqCVjoU2fk899fSiuw+83YYbOEGDqzqAvbeUT9q5Jqwt3RrI4wUx8OJPBUF4R/uk/F1S+SUZt88kqqkqVj21tZvNL9dtPe4dNV8W3nAb7ye3npzbPEvhSM90hewTxMfgTv4bW0jFDS2bQI+5YAh1Fzd0kvFy//SXI5AeZwm9e3Z2bZkZFdOfzdAqJmx2FHlw8JA5lrIHUwFkZHpC4Ruvdcki/ViSy+/w09T9xCmyIyv8ylQrJ0Htm/W6awsU51N3lmOXqVOn/SzuhMeEP/yYJ60oDpo3QK6HTw4yUJ2lRwJeOWSHOBoYuhIRDPyVGgU1L8WPh6w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+UUTH0FsoHIhep5H02aSf67qJuBy5rAeQJBeWrE6oYE=; b=IfTCY6b5fu6PQOz4ER51wsc9BEZx/AGyz+vSjb4UW3hi+UF/ESOQuHcsnkJ+gbk7weR4SpjCzlaba1qbsqmgP4wWq7tFBEbWOv9n3vnHzIYXFF41dRkRuU631IaAa+GqBAGZp2/EvF6Nt0TZrtqQHOjHn+kFWqHmoGQav/lEa9gNdS/miEKwP1KMwAL4+t9eSRV36kYcGaC1hM2kwamvZQm5OLXJIvBeeSyjE6VHHlvKsA9aYsY1ny/mQs8eM94z9Nwd0Y3ZaCUOKYCWiqXO/oxN8hgliWT9X+eG+78HcjpOgrZ6C8P+PUtq/uuwATlWnkPCKXTEHBbUrewZWnedag== Received: from SI2PR01MB5036.apcprd01.prod.exchangelabs.com (2603:1096:4:1f8::9) by TYSPR01MB6029.apcprd01.prod.exchangelabs.com (2603:1096:405:57::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.24; Wed, 28 Aug 2024 05:16:15 +0000 Received: from SI2PR01MB5036.apcprd01.prod.exchangelabs.com ([fe80::546c:7ecf:524e:4c34]) by SI2PR01MB5036.apcprd01.prod.exchangelabs.com ([fe80::546c:7ecf:524e:4c34%5]) with mapi id 15.20.7897.027; Wed, 28 Aug 2024 05:16:15 +0000 To: "freebsd-ports@FreeBSD.org" Subject: lang/rust-bootstrap: Add option that doesn't depend on freebsd-sysroot From: Tatsuki Makino Message-ID: Date: Wed, 28 Aug 2024 14:16:11 +0900 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TMN: [KarTqYaGDQyUrqMVfPK4SYwWg4FptQN7] X-ClientProxiedBy: OSTPR01CA0006.jpnprd01.prod.outlook.com (2603:1096:604:220::16) To SI2PR01MB5036.apcprd01.prod.exchangelabs.com (2603:1096:4:1f8::9) X-Microsoft-Original-Message-ID: <1b526b0e-22e4-e22f-5591-a99acadd931e@hotmail.com> List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-ports@freebsd.org Sender: owner-freebsd-ports@FreeBSD.org MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SI2PR01MB5036:EE_|TYSPR01MB6029:EE_ X-MS-Office365-Filtering-Correlation-Id: b362ff1c-b588-4a8f-75d7-08dcc72089da X-Microsoft-Antispam: BCL:0;ARA:14566002|5072599009|461199028|19110799003|8060799006|15080799006|6090799003|3412199025|440099028|1710799026; X-Microsoft-Antispam-Message-Info: UwUrsklpKoHzlI2YgI/ogbTj6nRioiVl0gMHeylhoC8MvL2B0SRSMzXmFDTxLjhfzij/QetmBNKROxKGzS6Qs1nrxu6JdPHLClESWCwbC8MMTR3sJkk/FuCh54mtsSRzagyGnvwXuNuAu9vZDXU7EGw+HQAtlL8M8zTdqD8afJAHk93gOULpOOf5AdnHABGE3ZQsxwm80o48eZzRX1Om6V4lopEOI2Iql0zMqTku/27hZGhXtV6kaps9XjcMXDoaa6SsdqNZErUqtXDXCTvsZvg8Bdd4ROT4f1QGv9v1S5aniTsDA9lOinLnI+Els8dNhxlAv1dP4SBCd6DVkvsO9N0PwrGYM+FxwF4X96BQoiUa2BtFzdj0m2WRE0L6Mietx4i1arzGSYc+HA5WQhikGx8pACe7aOXoMyMPChI8XDkcr9nOqEUqpx+d3oGgB6CIac82EyVYfUyLKTjffLH+Fh6lz2VfnsrFjQ/Sw2fmwpGoEFO74JxRnY9Ll/oc2UuWmonBTXD1pEdA0zwz3b/gM1zkSezokX+TkHyVHKQvu4RiVjSssg6O5WiEyzB2l8+7DE49hgCjsQqLwZ+PbjYUE1hwbCtgzNBgju6Nu3Ese1JBd39Yy20Boaq6p1QrnRLeQCYTQBd8EPZsw84MwW3rcP245p5oVI0q/WIkcfHblhzdHx8IzpOPU/PeHdexuBiuFGkpVr4s0fxGTcRL/93loVtdDVm24NLvQNNHfWR90v5RcVKeyxoUZknEJ/1Dr1D8m7DjNw3cHc0FTNwgUp2hHw== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?eFZnNzhGQmtsWkdpVE55Z01KYnFrS3JmdEV6OXc5RXRZNlZkeW1jVGtIQjNa?= =?utf-8?B?WUpiaGIzZFo2YWVvRmRIeDVpQVp6aUxjaXRIQk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VFjbU1BNlRUQW8xZnhxa3ROazlFcUhGTjdR?= =?utf-8?B?SkgxYmtndEEwQXVYaWRYeWk0bGFCOWhsMWNsN1pCMDBNY2NNcG84bUxLeUdB?= =?utf-8?B?Uy95Z3FOY0lkU0RmV0ZiWWQzN0RJVXJIaU00Mi9Lek5FMGJ6SlZTendYRWlZ?= =?utf-8?B?U0QzeWQyRTRoTWl3dEpnUzJKcE5XSWYyb1Y0U2N0L0MvL2lJRVU1TmdTRXFt?= =?utf-8?B?VDFSK2ZsWThnN0NZTFZoMUlnUnFXSWU2MitNZ0VhOGlJc056aEorOEowUFF0?= =?utf-8?B?Y0NXMlhwVVQvY2dRSVh2SVlRUzdCU01CMXVzM1FVbVFBTEh2dkxqRnhON0hY?= =?utf-8?B?dTlYVUdid1Y3SEVrMnlqVVJmZUJLamd3YlVEdVM0MUcrWGdLU1pFN1dpM2Qw?= =?utf-8?B?cUJRQUV4ZnZMWVpqbWY2SEhLVW9CTndseCtHZXZ5T1pMMkNJOEJZK3doV29F?= =?utf-8?B?NmRsTEVBZlgwUUozRHhDWlJsTG0zdll3VnZIbEs1azM2ZGdCM3ZHZjNDdEZD?= =?utf-8?B?RytWRG5zSkxzS0VTN0pmbEZSa2Frc2pVZGdac3lvWFdiVXlUQzh5OURMMGZF?= =?utf-8?B?dTIxOXdpcFZJa3BmTVN2ZytWTHpqLzNlR0hCMGx6aGZOeTdUN2x3Z2I5aHBr?= =?utf-8?B?dTU4dmZuK2tJOEgrakhJRFZkTitoSzEyNmR5TjNTd1FoSWFaakZiQ0pFNXZX?= =?utf-8?Q?aQqBocdBSdNKvy65bEP6?= X-OriginatorOrg: sct-15-20-7719-20-msonline-outlook-b4c57.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: b362ff1c-b588-4a8f-75d7-08dcc72089da X-MS-Exchange-CrossTenant-AuthSource: SI2PR01MB5036.apcprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Aug 2024 05:16:14.8170 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYSPR01MB6029 X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.36 / 15.00]; FORGED_MUA_SEAMONKEY_MSGID_UNKNOWN(2.50)[]; ARC_ALLOW(-1.00)[microsoft.com:s=arcselector10001:i=1]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.86)[-0.856]; DMARC_POLICY_ALLOW(-0.50)[hotmail.com,none]; R_SPF_ALLOW(-0.20)[+ip4:40.92.0.0/16]; R_DKIM_ALLOW(-0.20)[hotmail.com:s=selector1]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_ENVFROM(0.00)[hotmail.com]; RCPT_COUNT_ONE(0.00)[1]; FREEMAIL_FROM(0.00)[hotmail.com]; ASN(0.00)[asn:8075, ipnet:40.80.0.0/12, country:US]; MIME_TRACE(0.00)[0:+]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RWL_MAILSPIKE_POSSIBLE(0.00)[40.92.52.71:from]; RCVD_IN_DNSWL_NONE(0.00)[40.92.52.71:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_EQ_ADDR_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MLMMJ_DEST(0.00)[freebsd-ports@freebsd.org]; DWL_DNSWL_NONE(0.00)[hotmail.com:dkim]; DKIM_TRACE(0.00)[hotmail.com:+] X-Rspamd-Queue-Id: 4Wtt1H4MCcz4Vxw Hello. rust-1.79.0 is the last version we can build with 12.4-STABLE (and also 13.2?). Because the bootstrap compiler cannot be used due to the following output. ===> Building for rust-1.80.1 Building bootstrap running: /wrkdirs/usr/ports/lang/rust/work/bootstrap/bin/cargo build --manifest-path /wrkdirs/usr/ports/lang/rust/work/rustc-1.80.1-src/src/bootstrap/Cargo.toml --verbose --verbose --frozen error: process didn't exit successfully: `/wrkdirs/usr/ports/lang/rust/work/bootstrap/bin/rustc -vV` (exit status: 1) --- stderr ld-elf.so.1: /wrkdirs/usr/ports/lang/rust/work/bootstrap/bin/../lib/librustc_driver-46295f53743f17e0.so: Undefined symbol "_ZNSt3__122__libcpp_verbose_abortEPKcz" However, I succeeded in building rust-1.80.1 on 12.4-STABLE in roughly the following way. mkdir -p -- /usr/local/freebsd-sysroot/amd64/bin ln -s /usr/bin/cc /usr/local/freebsd-sysroot/amd64/bin/cc ln -s /usr/bin/c++ /usr/local/freebsd-sysroot/amd64/bin/c++ Edit lang/rust-bootstrap/Makefile so that it does not depend on devel/freebsd-sysroot. make -C /usr/ports/lang/rust-bootstrap/ install FLAVOR=amd64 cp -f /usr/local/rust-bootstrap/amd64/* ${DISTDIR}/rust/2024-06-13/ Edit sha256 and size of lang/rust/distinfo to regenerated ones. Start building rust-1.80.1. This is not a request for continued support for versions that are no longer supported. This means that I need a way to get a bootstrap compiler that is made in the same environment as the one we are currently using. It may make it easier to find a solution to a problem that is rare these days, where rust doesn't work depending on the architecture. So, I'm going to paste the patch I made below :) I also feel like I'm doing something wrong about it, so please make it without using it directly. Regards. Here's the patch: diff --git a/lang/rust-bootstrap/Makefile b/lang/rust-bootstrap/Makefile index 3846aa32ffe..88c1c5028e3 100644 --- a/lang/rust-bootstrap/Makefile +++ b/lang/rust-bootstrap/Makefile @@ -22,8 +22,7 @@ LICENSE_FILE_MIT= ${WRKSRC}/LICENSE-MIT ONLY_FOR_ARCHS= amd64 powerpc64 powerpc64le ONLY_FOR_ARCHS_REASON= untested on other architectures -BUILD_DEPENDS= ${FLAVOR:S/_/-/g}-freebsd-sysroot>=a2021.09.14:devel/freebsd-sysroot@${FLAVOR} \ - cmake:devel/cmake-core \ +BUILD_DEPENDS= cmake:devel/cmake-core \ gmake:devel/gmake \ rust>=${PORTVERSION}:lang/rust @@ -43,6 +42,12 @@ TMPDIR?= ${WRKDIR} # Resulting packages are not specific to amd64 NO_ARCH= yes +OPTIONS_DEFINE= SYSROOT +OPTIONS_DEFAULT= SYSROOT +SYSROOT_DESC= Depend on freebsd-sysroot +SYSROOT_BUILD_DEPENDS= ${FLAVOR:S/_/-/g}-freebsd-sysroot>=a2021.09.14:devel/freebsd-sysroot@${FLAVOR} +SYSROOT_VARS_OFF= ONLY_FOR_ARCHS+="aarch64" + _CARGO_VENDOR_DIR= ${WRKSRC}/vendor _RUST_ARCH_amd64= x86_64 _RUST_ARCH_i386= i686 @@ -70,6 +75,10 @@ IGNORE= is only for FreeBSD EXTRA_PATCHES+= ${PATCHDIR}/${FLAVOR:S/_/-/} .endif +.if ! ${PORT_OPTIONS:MSYSROOT} && ${_RUST_HOST} != ${_RUST_TARGET} +BROKEN= The behavior of this condition is not implemented. +.endif + post-patch: # Disable vendor checksums @${REINPLACE_CMD} 's,"files":{[^}]*},"files":{},' \ @@ -110,9 +119,15 @@ do-configure: # host compiler that can build the host->target compiler @${ECHO_CMD} 'targets="${_RUST_LLVM_TARGET};${_RUST_LLVM_TARGET_${ARCH}}"' >> ${WRKSRC}/config.toml @${ECHO_CMD} '[target.${_RUST_TARGET}]' >> ${WRKSRC}/config.toml +.if ${PORT_OPTIONS:MSYSROOT} @${ECHO_CMD} 'cc="${LOCALBASE}/freebsd-sysroot/${FLAVOR:S/_/-/g}/bin/cc"' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'cxx="${LOCALBASE}/freebsd-sysroot/${FLAVOR:S/_/-/g}/bin/c++"' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'linker="${LOCALBASE}/freebsd-sysroot/${FLAVOR:S/_/-/g}/bin/cc"' >> ${WRKSRC}/config.toml +.else + @${ECHO_CMD} 'cc="${CC}"' >> ${WRKSRC}/config.toml + @${ECHO_CMD} 'cxx="${CXX}"' >> ${WRKSRC}/config.toml + @${ECHO_CMD} 'linker="${CC}"' >> ${WRKSRC}/config.toml +.endif .for _key _util in ar ${AR} ranlib ${RANLIB} @bin="$$(which ${_util})"; \ ${ECHO_CMD} "${_key}=\"$$bin\"" >> ${WRKSRC}/config.toml