From owner-freebsd-questions@freebsd.org Mon Jul 15 22:32:45 2019 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1866FC57D4 for ; Mon, 15 Jul 2019 22:32:45 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1E4718317A for ; Mon, 15 Jul 2019 22:32:43 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([188.103.166.50]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPA (Nemesis) id 1MoeU5-1iFpEZ3yK9-00p94C; Tue, 16 Jul 2019 00:27:15 +0200 Date: Tue, 16 Jul 2019 00:27:10 +0200 From: Polytropon To: hw Cc: freebsd-questions@freebsd.org Subject: Re: What does it mean to use ports? Message-Id: <20190716002710.6d7c7800.freebsd@edvax.de> In-Reply-To: <87blxwosmj.fsf@toy.adminart.net> References: <87o91wqjl5.fsf@toy.adminart.net> <20190715021053.2f82c84c.freebsd@edvax.de> <87blxwosmj.fsf@toy.adminart.net> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:DLb3sqtI0kYdvwVLba6uc9DPJOmjeVCS1m9ggxDfCANpeU95r9X 2TIDmcOm7iZblxZsT5PJd/SpGW9U/3MJMEI095vuAjmf0ptP1OFBJ7co12ujLRDn9v0kdJx HJIvbEFAofZbfLS08GmXx+2hdZuN3A4nSwoYC7u5kThlXsv4+ip3x28QJD9t37A+gwSz+c/ v/6qvAFN6wIJmFt0Lhk6Q== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:FdQCXNyDSe8=:YGPPG1qHgEHJA4MV8NGuDp J7tLEeUMejBiy4GB1v6W0av2Fr4Y9m1tCyGu1MEsE2YauiughLSQid1evAOJ5tbEEHG0MGarQ 0p8f+iOWZ5LOQptsLkCfI4J6QCcqsVP1I2Fx6/wreN74lZ5Eu/J97eVBmFlPgJDUrfe5FbfyB ambjGRBhSd6GscQUs6uV3A8qVYPWqKfDP3I6waZsGDRaMLTHQS4bylcvOd3tMzNOmR2oRiuCb nq4HyNcWOmwieKQJ80QBDDr07QLxbWmTvYMpa8TnV5XFmSltnVBK9dmc41I0uT94rMuTUZw1+ 9YbaocKp08Rv/dzBsGi/k5z5AIq/nv/di8ccvbno2xXNIgNYAmJcr7xaOr3n2K1b7n4YUBYEj c+3QtZlfnmHvs7tuavrTg6fI72ti8vEq6gCpRjEQqPrVjUqmEheFxj8hvjV4Vc4DMJupX2cPi VCet2OX+9Ge8LG0BapbWtSeHBb/C8eIl2ebNW8Gb4iyXvfeO8R6J3csAsUN59laKFphp4rUeJ vndMg/hwx8oM2RbKmumpUKoZgZ8RbudaAqnZjZzPiyGcj7eBAo7o6DJwUYQhqRRLFxsFO7GT7 3+V0OpZw/6AGB79DWlewCYb4D0PgLgGKDWZc/+sgdtCI71zjM8moKqV2SSmG3cRjs3e2shoBf JLUOsABLdxekFZkfXbOyCfZJmMc3j4HGXoub4IlxXo5S7pnN2ATPshJi4MuI+7MJGnRCj4x5P zWaiEgv4eiDL0/tl/D0iB+Gx4uT25qqpOl6ijsDXj74oVTFV/2KKr8O718o= X-Rspamd-Queue-Id: 1E4718317A X-Spamd-Bar: ++++++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [6.90 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[freebsd@edvax.de]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; HAS_ORG_HEADER(0.00)[]; MX_GOOD(-0.01)[cached: mx01.schlund.de]; RCPT_COUNT_TWO(0.00)[2]; RECEIVED_SPAMHAUS_PBL(0.00)[50.166.103.188.zen.spamhaus.org : 127.0.0.11]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; SUBJECT_ENDS_QUESTION(1.00)[]; FROM_EQ_ENVFROM(0.00)[]; ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.99)[0.995,0]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[edvax.de]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.93)[0.928,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(1.00)[1.000,0]; RCVD_IN_DNSWL_NONE(0.00)[131.126.227.212.list.dnswl.org : 127.0.5.0]; MID_CONTAINS_FROM(1.00)[]; R_SPF_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE(0.59)[ip: (1.99), ipnet: 212.227.0.0/16(-1.42), asn: 8560(2.39), country: DE(-0.01)] X-Spam: Yes X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jul 2019 22:32:45 -0000 On Mon, 15 Jul 2019 05:59:16 +0200, hw wrote: > Polytropon writes: > > > On Mon, 15 Jul 2019 01:39:21 +0200, hw wrote: > >> Hi, > >> > >> so I wanted to see what would happen if I used a port and removed the > >> emacs-nox packages and its dependencies. Then I started installing the > >> emacs port. > >> > >> What is going on here? It seems as if I need to compile the whole > >> system myself now. > > > > That exactly is "using a port". A port is just a description > > of sources, tools to use, how to use them, and where to put > > the results. What you're seeing is to be expected: The port > > you're building (and its dependencies) will be compiled from > > sources, unless they're already installed in the correct > > version. > > There seems to be a lot more stuff needing compilation than the > dependencies of emacs-nox would suggest. Some of the dependencies are > quite surprising, like I would think a -nox version wouldn't need > support for JPEG2000 and not depend on things like font servers and all > kinds of other stuff. That seems to be normal. First, there are two kinds of dependencies: build dependencies (i. e., tools needed to build something), and runtime dependencies (obviously, libraries and such). Second, there is a "hierarchy of depencencies" (A requires B, B requires C, and so on). While those dependencies are automatically resolved, it can be possible that they need to be built in the correct version. There is a way to deal with it: List the dependencies ("make missing"), and feed that output into "pkg install". However, this will not always work, because if you change default options, dependencies might change (a la: A requires B and C; A enables feature X, this requires D, as well as a custom build of B with option Y enabled). So it won't always work that way. > I could as well recompile everything so it's all optimized for the CPU > it's running on. But are the defaults of the compile options the ones > used to compile all the binary packages, or are they different? The packages you obtain via "pkg install" have been built with the default options, and if you run "make install" without changing the options, you get, more or less, the same result. Tayloring your software to match CPU and optimize for the hardware has often been the first choice in the past, because you could get software running in a usable manner where the default install would have been "too slow" for your machine. This especially applied to multimedia software, where a wise selection of codecs and options would enable you do do wonders. However, this doesn't seem to be needed anymore, that's why "pkg install" often is the most convenient way to get stuff installed - as long as the default options work for you. Summary: It's widely suggested to use either ports only, or pkg only. Mixing both forms is possible (see "pkg lock" and the special tasks when updating your installed software), but it requires more work. Of course you can use poudriere (no idea why they gave it a name that's hard to spell and to pronounce, but well, that's "modern" today...) and provide a local repository with your custom-built software that you can "pkg install" from, but in cases where you only want one or two programs built from source, it's probably not worth the work. After all, you can choose how to do it, everything works. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...