From nobody Tue Jan 03 18:18:06 2023 X-Original-To: ports-bugs@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 4Nmgvf4VR6z2pKxl for ; Tue, 3 Jan 2023 18:18:06 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nmgvf2cnjz43WQ for ; Tue, 3 Jan 2023 18:18:06 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1672769886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dasiVR4VU0P6hs/EXh2I6w3vErAuGwXH8udHr6hWKQE=; b=pyi+rILFFU4RzV53g5jWjPmM3B9gj3aqYYOjAz5tsWgR9cB2c3KW5ACsUPgTZQi+jfomAG 8HvJLEaPZ6PlpqRCJUu/WWkzQuLRPx7KslCaYJ/699zmkYijLCM6TRMxcFRott27XAifon T2iokXTGrmeKkBxZZnqxGExTCh2LMJC7/9ewqkWfUoGKJ+Llzfx7Mr9X1XE41ItVOD2hLn M5RITNyikN32LUpDR7kjjEfqSnbT80qIgL6XxmrpeSTOr5LsCrhonAfGMtslseEE5Qg69h zhcItpvHVkx3S6/vyAZ0jlAw89P/yArkuPCGC65B3Ai8/dk3lDoBCcG8IG5Z6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1672769886; a=rsa-sha256; cv=none; b=OFcN9qT4KStya0/mct5oQIvje06US5aJ7wJ8GyVuQNsLlYhVWlFVC1rBpwIWoBY93p50ON w+9DiS5fNp2olwU9JNP6EUUtLCTQcaBMb61Y03VstMGXBBNrMV12NMOyKKPeT0wbcOE5l0 jCtruvMAembafGbgRAYq3vmPKLXZkTAjQCo8h0er6N8KmyRCHDcBULKiYJfhz/7g/0ZVV7 5AQKhQ5cEDXTvpO00MMkowzJcwTYVANBX3zg1xvWveuhmtWaG7lFYnUYb4YNKzLfBaq8Y4 j4UlNpLhpZ/iAZXU85hp480YpoUi3G5ln0OAB6EwCv818dToGhXYIlvMpcVdSg== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Nmgvf1HkDzh8T for ; Tue, 3 Jan 2023 18:18:06 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 303II6wN050770 for ; Tue, 3 Jan 2023 18:18:06 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 303II6Ff050769 for ports-bugs@FreeBSD.org; Tue, 3 Jan 2023 18:18:06 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 265684] net/mpich: Fails to build when devel/uthash is installed Date: Tue, 03 Jan 2023 18:18:06 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: jcfyecrayz@liamekaens.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: ports-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: flagtypes.name attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports-bugs@freebsd.org X-BeenThere: freebsd-ports-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D265684 John Hein changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #239236| |maintainer-approval? Flags| | --- Comment #2 from John Hein --- Created attachment 239236 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D239236&action= =3Dedit [patch] fix mpich to avoid build breakage when the devel/uthash port is installed This is still a problem with the latest ports versions of mpich (3.4.3) and uthash (2.3.0). Attached is a patch to help the mpich build avoid pollution from installed packages in ${LOCALBASE}. The underlying issue: Using 'configure --with-libfabric=3D${LOCALBASE}' causes CPPFLAGS variables= in the generated Makefiles to have -I${LOCALBASE}/include very early - specifically before -I flags that point to the mpich directories in ${WRKSR= C}. If the ports version of devel/uthash is installed, this will cause the buil= d to use the devel/uthash version of uthash.h - recall that corresponds to uthash 2.3.0. That uthash.h is not compatible with the mpich code that uses uthas= h - the mpich bundled version of uthash is 2.0.2, and there are some API incompatibilities between 2.0.2 and 2.3.0 (specifically different parameters expected for the HASH_ADD macro). This patch creates a sym link in ${WRKDIR} to point to the libfabric include files (in ${LOCALBASE}/include/rdma) uses --with-libfabric-include to point= to that ${WRKDIR}/include directory. This avoids the early addition of -I${LOCALBASE}/include to CPPFLAGS. Other possible fixes: - change mpich configure scripts to move -I${LOCALBASE}/include (from --with-libfabric) later in CPPFLAGS. - update mpich source code to work with the newer version of uthash - build mpich with the bundled version of libfabric instead of the ports version (net/libfabric) The first option (change configure scripts) is more work than the simple "s= ym link isolation" workaround used in the patch. I tried implementing that - = it wasn't easy to find a fix. Maybe there is a clean / simple way to move the libfabric configuration later in the configure process. The second option (update mpich code for newer uthash) might be something t= hat upstream could be convinced to do or fed and accepted to upstream. Or the mpich code could be made to work with either the older or newer uthash - th= at's even more complicated and would involve more 'configure' time work. But an= y of that work to update mpich for a newer uthash is fragile - the next time the freebsd devel/uthash port is updated, that could break mpich again. Note t= hat the HASH_ADD invocation is header-only, so I believe there's no dependency = on the uthash library. I did not do an exhaustive analysis, however. ldd says there is no dependency on libuthash in the installed mpich programs / libraries. The last option above (use the bundled libfabric) seems like a reasonable alternative if the attached patch is not desirable for some reason. Yes, it will bloat the mpich installation somewhat (I did not calculate how much), = but it does isolate mpich from changes to the net/libfabric port (with all the related pros / cons of that isolation). QA: - portlint (no new warnings) - portclippy (no new suggested format fixes) - poudriere (ok - builds/installs with patch even if devel/uthash is insta= lled first) Ting-Wei Lan, please try the patch, and report if it solves your build fail= ure. --=20 You are receiving this mail because: You are the assignee for the bug.=