From nobody Sun Jul 06 18:25:13 2025 X-Original-To: freebsd-questions@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 4bZwlw28P0z61Sfd; Sun, 06 Jul 2025 18:25:32 +0000 (UTC) (envelope-from pprocacci@gmail.com) Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bZwlv3lDVz40NL; Sun, 06 Jul 2025 18:25:31 +0000 (UTC) (envelope-from pprocacci@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b="l9XYEBn/"; spf=pass (mx1.freebsd.org: domain of pprocacci@gmail.com designates 2a00:1450:4864:20::62a as permitted sender) smtp.mailfrom=pprocacci@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-ae0ccfd5ca5so374606266b.3; Sun, 06 Jul 2025 11:25:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1751826324; x=1752431124; darn=freebsd.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=gH2D1lznJ6FgIfD18O33HpfkyDaXwgEm1XZoxtpE08Y=; b=l9XYEBn/IpY/jZykx7IzW3z5O9yrkV9V+B1CdPxsX++TJEE8CnippNKMwWIpN8n1s3 5dfH/dnaiunRA1gKu8doDp1p0cwm/KNpmvl6bG5ZWcftba5zrGUevEviZ/WLpFE1wK+q oST00vOeJE9vl8xe9TZs++D+qkvygi9GvHMatW1PtSNTq+AOHAijvJJs7/wfpSaSUjVU 6qZ9G53n/xRN4DoJthb8+3Xgix6nt0u2cfHwVjNnbwnxabgcvypzXJe5SotSouVBb9aP zzhP2Z69/AcDwxI9oU32N6PX7OtAEZvivpBNyo8I50eNrWG71y7TqPqrP+7Y7ZeCLaib SM4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751826324; x=1752431124; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=gH2D1lznJ6FgIfD18O33HpfkyDaXwgEm1XZoxtpE08Y=; b=ZN6xBBkxfJelPQqRHevVA+5uv3ZQN8qW2sOH3zBMVITMZZA0fXLE4NQLy6rxZa2sbc 2LSlBvH9f8xjmHye8AzK7kWgEGQ63jRcHDFDKsX5Jfc/iKHQ8h8y3d+w1oSZLEKW9Rj5 996XQbj/uXmgzk09TxD4mowGX2/71C0gxVP2rOhHTLtN0NeElD8jC7H7dQbT1bj/FzCW BlnKwjpkAwT1i76RthZKMFT4XM2ARDRvw90AIyGDQBoz84nx0tnNOnLMi3cXEosJZ9xd b66TbT91IstTE7wZhDiYxnUTxRueZYooFFwJCYjFWRPJJ+1ark1+qvbpSQaoYhxOWZoP 9sgw== X-Forwarded-Encrypted: i=1; AJvYcCVUSfH/jTeEx1zQ//UuVhQNgxy3TCG6G9LYf5nkEpb8SrIHlWram+mDM5ShVCaFZzNuzhxkLegCCnVHuYrvY3LxdA==@freebsd.org X-Gm-Message-State: AOJu0YxLZWjdrXraYoqmnqojyUDZDWdON7eZBKvKq0IhMNfh9mwJ19Us 0rHH1Pr4Tq+uIa9xrjwqRZs4/CTcFxZbv/u4xxvfwqPZ08gNl5CNCD0wr5dhIPcKAWnl5pZTDQ0 0KYNCn/ZHGges5gSZLvW0nHq3BURZlK5VlrM= X-Gm-Gg: ASbGnct5GCuGzpFABaYmE0Advaz2Xu+/l41JqW6uR2YlOg96ItegKr4wtirI2obV+fb h3YK8PJ1qQUpzNl1pYcwdyA1rVo0mZ2aGDUmdPVkPx+N9VAQBtKLwHkuuQBArvPDTF/YxIw11wM fE6rG8G2M0OJdo1TDs2GjPsdSIR7w1IfGQJvG2gFA8 X-Google-Smtp-Source: AGHT+IGCAI7OzIRhspl4h9FGh/AUUBpbPu81wZiwPQSq1h2nU5pbWJzplrK3e6E4gZXhaLMxzl+ttCNvUkW8HGiNf94= X-Received: by 2002:a17:906:f5a7:b0:ae3:f16e:4863 with SMTP id a640c23a62f3a-ae3fe64e8e6mr946577866b.1.1751826323834; Sun, 06 Jul 2025 11:25:23 -0700 (PDT) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-questions@freebsd.org Sender: owner-freebsd-questions@FreeBSD.org MIME-Version: 1.0 References: <1pmdM5HZOijtmlJQ@aceecat.org> In-Reply-To: <1pmdM5HZOijtmlJQ@aceecat.org> From: Paul Procacci Date: Sun, 6 Jul 2025 14:25:13 -0400 X-Gm-Features: Ac12FXzwUkYvUwk8eKcOb9vKkwkgYN_tFX0-jBO88jL9x3xaX8V5Do7pQGEeLos Message-ID: Subject: Re: Default library and header search paths To: questions@freebsd.org, freebsd-questions@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Spamd-Result: default: False [-2.18 / 15.00]; NEURAL_HAM_SHORT(-0.93)[-0.933]; NEURAL_HAM_MEDIUM(-0.67)[-0.667]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_SPAM_LONG(0.42)[0.418]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; MIME_GOOD(-0.10)[text/plain]; RCVD_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; MISSING_XM_UA(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; FREEMAIL_FROM(0.00)[gmail.com]; FROM_HAS_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::62a:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROMTLD(0.00)[]; MLMMJ_DEST(0.00)[questions@freebsd.org,freebsd-questions@freebsd.org]; DKIM_TRACE(0.00)[gmail.com:+] X-Rspamd-Queue-Id: 4bZwlv3lDVz40NL X-Spamd-Bar: -- > This depends on your sense of "interfere". It is true in the most > basic sense in that installations cannot overwrite or remove base > headers, and so cannot affect base system (re)builds. But in the > situation I reference above, when headers for the same library exist > both in base and elsewhere, bo golly, they *do* interfere with package > builds. So I'll concede that my definition of "interfere" probably differs from that of yours. When I compile software by hand which is pretty frequent, I know which headers/libs I'm compiling against because it's well defined in my build system. Can installed software from ports/packages "interfere" with the base system given the same file names? I suppose so, but I seldom run into that personally. Given that everything is well defined for me, it's seldom a problem that I'd be compiling against libs installed under /usr/local/lib vs /lib. This is mostly due to the order of inclusion of directories. > > > - .. and probably most importantly, follows the defined unix > > hierarchical conventions established in 97' (I think it was -- open to > > being corrected). FreeBSD has splintered from this ever so slightly, > > but it's darn close enough. > > Those conventions depend on the notion of "vendor", which doesn't really > apply to FOSS packages. I don't think anyone installs just the base system > and then hand compiles everything else; everyone uses at least a few > packages (in the narrow BSD sense) or ports. So unless your language is > literal and legalistic to the extreme, these commonly used ports are just > as much part of FreeBSD as the base. I don't think your comment is in conflict with what I've stated. I entirely agree about FOSS not really giving a damn about hierarchical standards. The only thing I'd mention is that I'm not talking about FOSS and instead am only talking about FreeBSD and the hierarchical standards it itself has adopted. Port maintainers should (do?) conform to those standards and they do an excellent job at doing so. > > For libs, just add /usr/local/lib to /etc/ld.so.conf.d/local.conf and > > run ldconfig. > > But this only affects run time, doesn't it? For build time you still > need to add the requisite -L options in one way or another. Correct me > if I'm wrong. > You're not wrong and this is a side effect of me writing a response to an email at 4am, after a US holiday, 10 sheets into the wind w/ an alcohol induced coma! Whoops! I apologize for that confusion as what I wrote clearly isn't right. You are correct in that it only applies to runtime. > > Ultimately though, when I program in C on FreeBSD which is like nearly > > all programming I do, my build system (make(1) for me), already has > > everything defined. > > Can you expand this, please? Do you mean make(1) has the needed CFLAGS > and LDFLAGS built in? > So to clarify I define the necessary CFLAGS and LDFLAGS in my build environment; it's not built-in. There's a couple of ways to accomplish this but I prefer to stick this information within the Makefile itself. Outside of using a Makefile you can stick this in your login .cshrc or .bashrc or whatever shell you're using. I don't use this method, but it's an option..I guess. .. and lastly there's /etc/make.conf. Again, I don't use this method but it exists. On occasion I might want to change global settings, but seldom is this necessary. > -- > Ian > ~Paul -- __________________ :(){ :|:& };: