From nobody Sun Jan 2 16:04:40 2022 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 47FDA1919659 for ; Sun, 2 Jan 2022 16:04:40 +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 4JRkGc0TDXz3NcJ for ; Sun, 2 Jan 2022 16:04:40 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 E54A014FAC for ; Sun, 2 Jan 2022 16:04:39 +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 202G4dtj081265 for ; Sun, 2 Jan 2022 16:04:39 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 202G4dEb081264 for bugs@FreeBSD.org; Sun, 2 Jan 2022 16:04:39 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 257222] Cannot use libzfs.h from user space programs due to missing libnvpair.h and other dependencies Date: Sun, 02 Jan 2022 16:04:40 +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: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: grembo@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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1641139480; 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=WOO7491D+3oOH5S3FLyg2DabyfVba2cQenkG1mIY+vU=; b=IP1/JJDFmJKHsbni5Z7Z+OYvI4zLyuPA4mqjJe9to/koQwa5D3TBaD6/NqVMP470TtDohP 79h59jiPqYB2+yUadSaBKq6o8k7REbGDeWhIZu4ixc7XmVcgqL0u6Q4KU/Frh4/5R8j5we B0ifZbFjxPiWh4VrxKGoXCqV66hT9wNbSWo65hEpnKGip+R3HxxBdWfXEd5dTejYpo+kTW XYRdNLtwDUfqIpJaQ9xZXKYWQMkqOi1QTsQX2Z4ZlKTZkKfP9YGuTzqEVMiegBu+iRlS40 jF9msAYHZyDjdHOP9kwi7geSoqR4kQGd6Bwq0cBETUhagFXs2wr8hGmIPNrqWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1641139480; a=rsa-sha256; cv=none; b=FomhmK4O67sp2Ac6A9mj//uDynm6d0oV/LaGP/Q5hc95gPSeu36tpwp7Yhnk55jjjE9tY2 4JPkz3JDTLJi9uvv9fggTz3abeScx7WP85YYBF7PkX3n1Y7zKLO1diAGmM1DJtZVJWyEGQ LY7yD/ReG1HAzy0DeiOq+ljMPX/b10Rv143T+eVVl7YPpO8RB0rcm+olCKfGVEe2mCWqGC PKXQMr8qA8Fp13ziCOoDBxhuZ8GjbGmGPciMPbO4y52xncB15tMS2vFdzISoc+6mliDhMF 4nynjiEMY5PGuALOUigvU0cBQKmqcaa8z5Bgu3AR/lai2QtdoLmuS14oZCpOSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D257222 --- Comment #3 from Michael Gmelin --- Simple working example: ``` $ cat >test.c < #include int main(int argc, char** argv) { if (argc !=3D 2) { fprintf(stderr, "Invalid arguments\n"); return 101; } if (libzfs_core_init() !=3D 0) { fprintf(stderr, "Can't init libzfs\n"); return 101; } int exists =3D lzc_exists(argv[1]); printf("%s %s\n", argv[1], exists ? "exists" : "doesn't exist"); libzfs_core_fini(); return exists ? 0 : 1; } EOF $ cc \ -I/usr/src/sys/contrib/openzfs/include \ -I/usr/src/sys/contrib/openzfs/lib/libspl/include \ -lzfs_core -lzfs -o test test.c $ ./test zroot zroot exists ``` --=20 You are receiving this mail because: You are the assignee for the bug.=