From nobody Sat May 13 23:20:55 2023 X-Original-To: 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 4QJhT45dYZz49vMc for ; Sat, 13 May 2023 23:20:56 +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 4QJhT44dnLz4DS1 for ; Sat, 13 May 2023 23:20:56 +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=1684020056; 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=tLYYF8Uhl6r6nz7U7tYRnMOPRG9x8BgzucQ+DX8gwz4=; b=KCJGKngTsayCib3AdoLdWfDMIoQJcWkgXy6ATOk9OwLSXUsefsPRTHErq6FYCHUEE5obJZ SAiXUIy+nxARasc1XjelcD4tJt+SQzygxh7nw16VR6kHT4PQK1XJdsOi+fiP/10APHWkeJ UYjHmZlfQRpvJfwpGHuiLVlYnZkYIRCV6xrmx7ITzKO0NliACMTR+a6LHSh4jxBaj66mEE C+15qCloaMhvPPFrXi9zzFT6gPeNyqC6UyTLV0oAf5daiI8lWVuYGm9okltl1OkkLriI4L 6t3g0rse2U0cmRat0AGp+UFjuvK9k9z5AdzqLwhu8iv6JpDvyhxduu/4YrnrxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1684020056; a=rsa-sha256; cv=none; b=xYs3BjhuNI1DGA0qz1A9lf6zxvWIdF/anQPAY7u1cXnybrCfHWfwFJWBfVQPuYD5eIWNSf Dxm5OSkB6dApFIpFcCbEhGcIkJ6jzpsv6jcnAFWEHUdGynj0Ey2JDH8bV81Bidjl2AgAPu jQJQdV5LwUz5YVuXgVcPlxDjYvie0qowJ+LzVUckAt2lUWvF7xUXCGZgiyffa4sVz35Jwk GUFFtW8NogTT6TRnZDDJRQ+tkTdltgPs9+VHHsUg2EqEzCwcbY7kMtLn/3dCBjfQNBpZZv 8MLuVD7+3IjiJp42edNsuLqc78vPOsh593y4BK+hL2qVc87t6Qq+TEnEdxRAfw== 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 4QJhT43kHczbRm for ; Sat, 13 May 2023 23:20:56 +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 34DNKuxJ067888 for ; Sat, 13 May 2023 23:20:56 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 34DNKuFI067887 for bugs@FreeBSD.org; Sat, 13 May 2023 23:20:56 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: bugs@FreeBSD.org Subject: [Bug 268518] Undefined symbol error when building shared library with environ(7) Date: Sat, 13 May 2023 23:20:55 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 13.1-RELEASE X-Bugzilla-Keywords: needs-qa X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: kib@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D268518 --- Comment #2 from Konstantin Belousov --- POSIX does not have the concept of shared libraries. It is only vaguely mentioned in the description of dl* functions, for instance void *dlopen(const char *file, int mode); 25290 DESCRIPTION 25291 The dlopen( ) function shall make the symbols (function identifiers and data object identifiers) in 25292 the executable object file specified by file available to the calling progr= am. 25293 The class of executable object files eligible for this operation and the ma= nner of their 25294 construction are implementation-defined, though typically such files are sh= ared libraries or 25295 programs. In FreeBSD, environ is exported by the main binary, moving it to e.g. libc = is impossible without breaking ABI. Practically it would end in the main binary anyway, with the copy relocation from libc. Simply do not link with --no-undefined if you absolutely need environ refer= ence from dso. Why you cannot use POSIX getenv(3) and friends? --=20 You are receiving this mail because: You are the assignee for the bug.=