Solved Thinking of going ports...

because it was your processor doing the compiling, and not some unknown processor elsewhere.
This has nothing to do with it. The output of the compiler will be the same no matter which processor is used to compile it. The instructions are the same. There is no difference. That is why the binary can run on any hardware you are using that is compatible.
 
This has nothing to do with it. The output of the compiler will be the same no matter which processor is used to compile it. The instructions are the same. There is no difference. That is why the binary can run on any hardware you are using that is compatible.
The binary will run, but it still needs to find the correct hardware address at which to get loaded, and run. If you take a look at # kldstat output on two different systems (say, an i7 and a Ryzen 7), you will notice that the .ko files' starting addresses are different. Even if the binary loads and runs with identical instructions, 'home' processor will do a better job handling its own compilations than 'away' processor. This is why compiler and makefile flags are set to a minimum needed.
 
I takes some time to learn the meaning of the flags. In the beginning you don't know what some flags do , so you are like an elephant in a glassshop. You break things.
Even now, i first evaluate, do i know what this flag means. No ?. Don,'t touch it.... The maintainer of the port will have had a good reason for this default setting.
Gentoo-linux was for me a good learning experience. In the end nothing worked anymore.
 
Are the performance differences (from compiling for a single processor architecture that matches the installed CPU) measurable? If yes, are they worth the effort? I vaguely remember from 15 years ago that they were only single-digit percent.
 
Gentoo-linux was for me a good learning experience. In the end nothing worked anymore.
Yeah, I looked at Gentoo and its Portage system back in the day when I was getting frustrated with dependency hell in Linux... and I decided that FreeBSD's Ports system is just much better organized...
Are the performance differences (from compiling for a single processor architecture that matches the installed CPU) measurable? If yes, are they worth the effort? I vaguely remember from 15 years ago that they were only single-digit percent.
For a fair comparison, you'd have to have at least 4 processors, 3 from same generation: say, a Threadripper, a Ryzen 5, and an i5. The 4th one would be an older i5. They all would have the same amd64 instruction set. Say the Threadripper did the compiling, since it's the mightiest, and can do the job the fastest. Ahh, I'm getting too lazy for this, I guess I'll let Phoronix answer that question instead of me, and have more recent (and therefore relevant) data.

I personally compile not just for performance, but also for feature completeness... I'd rather personally set the libass option in VLC's makefile so that subtitles actually work (they don't in the pre-compiled port) than file a PR with the port maintainer and hope it does not go unnoticed.
 
I remember a few years back, I had a reason to use ports instead of packages. It was something about a compiler option to use bsdisks instead of hal for automounting, or something along those lines, I don't really remember it all that well. So, since I didn't want to mix ports and packages, I had to compile everything. It literally took days on my i386 Dell Dimension tower system, which got all overheated, and pretty well got smoked, in the long run, after all those long days of processing and compiling ports. Since then I've gone back to using packages for everything. In the meantime, hal has been deprecated and, even if I wanted to use it, it's no longer available. All I really had to do was wait awhile for that to happen.
 
Well, it appears I just don't have the patience for this sorta thing after all :). It was fun while it lasted, but I can't do it. I tried, really, but everything takes forever to configure and build and while I might mess with those compile options for a single program, I'm not keen on trying them out for dependency trees. I installed a bunch of ports and was all smug, "I got this", when I went about how to update the lot... ugh, just not my cup of tea. I'm comfortable with packages and pkg update && pkg upgrade - why mess with it if it ain't broke? I do feel like if I was about to be stranded on a desert island and was only given port access and no binary packages, I could get a system running though, thanks to y'all's tips :).
 
  • Like
Reactions: mtu
'home' processor will do a better job handling its own compilations than 'away' processor.
Yes. Different processors handles the same instructions faster or slower but that has nothing to do with the output of the compilers. The instructions are the same whether you use ports or packages!
 
You don't use ports for the sole sake of getting an unmeasurable speed improvement of 1%. You do it for other reasons.
I have an advice, put as many general options SET/UNSET in make.conf , and not in the options files (created via make config) , in order to have something homogeneous.
 
You don't use ports for the sole sake of getting an unmeasurable speed improvement of 1%. You do it for other reasons.
I have an advice, put as many general options SET/UNSET in make.conf , and not in the options files (created via make config) , in order to have something homogeneous.
I disagree with that, this makes fine-tuning difficult to debug if something goes wrong. I'd rather accept the defaults presented by make.conf and know that if something did not compile, I can isolate the problem to the specific port. More work, I know, but I'm willing to live with that.
 
Sometimes, the same flag can have a different meaning or effect in different ports, but that is exceptional.
That's not my reasoning... My reasoning has more to do with the fact that circular dependencies are easier to debug/resolve if I do per-port options. Also - there's like, 3 different options for Kerberos in ports, but it's impossible to specify just one for all ports - some ports specify just the one from base system, some offer all 3 options, and some specify just one option that is NOT the one from the base system.
 
A virtual example. Let's say i have a web browser from the packages installed.
But i install a library from the ports collection and there i disable for instance language support.
The browser will call a function in the library which no longer exists and it will end ungracefully.
That's true and that's what I meant with
Do you mean breaking dependencies by disabling options required for other ports to work? Then the same can be said about using ports only.

It's a kind of problem that can occur with changing options when using ports in general. In this example, if the web browser were installed from ports instead of packages, the same would apply. What I still don't see is why mixing (quarterly) ports + packages would be any more dangerous than using ports only. To me, this "choose either ports or packages, but don't mix, it's dangerous" that I regularly read, is irrational. Maybe it comes from ancient times where it was indeed problematic for some reason, or more probably from lots of people having trouble with it because they're not aware of the difference between quarterly and latest and therefore mix branches (especially with pkg defaulting to quarterly and portsnap to latest).
 
That's not my reasoning... My reasoning has more to do with the fact that circular dependencies are easier to debug/resolve if I do per-port options. Also - there's like, 3 different options for Kerberos in ports, but it's impossible to specify just one for all ports - some ports specify just the one from base system, some offer all 3 options, and some specify just one option that is NOT the one from the base system.
In make.conf:
Code:
OPTIONS_UNSET+=KERB_GSSAPI
OPTIONS_UNSET+=KERBEROS
OPTIONS_UNSET+=GSSAPI_BASE
OPTIONS_UNSET+=GSSAPI_HEIMDAL
OPTIONS_UNSET+=GSSAPI_MIT
OPTIONS_UNSET+=GSSAPI
 
bsduck said:
What I still don't see is why mixing (quarterly) ports + packages would be any more dangerous than using ports only.
If you mix quarterly ports and packages you won't have version differences, that is correct. The reason to use ports however is that you want to change things. That may bring other problems. For instance, you may choose to leave out Pulseaudio for your audio applications for good reasons by unchecking it in ports. If later on you install, say, a package containing a webbrowser there is a good chance that Pulseaudio will be back...
Pulseaudio being the right example here. Imho you can't just switch that thing off, you will have to beat it to death first.
 
When I make install a package, I am prompted for some options, some parts are compiled, then I am prompted for some more options and some more parts are compiled - surely this is a joke and I've missed the punchline.
Why not ask for all of the options up front?
When I run portmaster www/youtube_dl it gathers dependency info, has me check the options I want for each one presented, then when that process is completed it presents me with a screen of what programs are to be installed with the option to go or no, or to only allow certain programs to be built if I chose not to go with what it recommends:

portmaster_waits.jpg

I always run it from the login terminal so it doesn't go blank every 10 minutes. Then once it's started I can sit in my recliner and listen to music though the headphones, occasionally glancing over to check the status to make sure it hasn't balked or is waiting for me to choose whether or not to keep or delete an older version of the program it just updated before it continues the build.

Is this the process you're describing? Because I honestly don't see where your frustration is coming from.

Given that it's a much longer, detailed process than installing a program by pkg install www/youtube_dl. But I also get a custom desktop built from ground up by me.
 
I have 1600 packages on my PC. The number of configures becomes unhandable. Even if recursive configure does all in the beginning.
 
I have 519 on this one and 552 on the one beside it, both used as general purpose desktops. The larger number more representative of the average pkg installed on each machine.
 
/usr/port/UPDATING is an interesting read.
But sometimes you can better be a bit later , so I use python3.7 instead of python 3.8.
Sometimes you can be sooner. I do it for instance for perl and lua.
 
I never read /usr/ports/UPDATING unless it's something I can't figure out on my own. I had to look to see what it wanted for python but that was the first time in a long time I'd looked at it.

20210425:
AFFECTS: users of python
AUTHOR: kai@FreeBSD.org

The default version of python3 and python was switched to 3.8.

For ports users wanting to keep version 3.7 as default,
add DEFAULT_VERSIONS+= python=3.7 python3=3.7 to make.conf

Following procedures may ease the upgrade:
:
Code:
For portmaster users:
  # sh
  # portmaster -o lang/python38 python37
  # REINSTALL="$(pkg info -o "*py37*" | awk '{printf "%s ", $2}')"
  # pkg delete -f "*py37*"
  # portmaster $REINSTALL
  # REBUILD=$(pkg query -g "%n:%dn" '*' | grep py3 | grep -v py38 | cut -d : -f 1 | sort -u)
  # portmaster $REBUILD
  # REBUILD2=$(pkg list | grep python-37 | xargs pkg which | awk '{print $6}' | sort -u)
  # portmaster $REBUILD2

Now I never would have figured that out on my own.

And that's not what I ended up doing to solve the source of the problem that prevented portmaster continuing the build:
Code:
 # pkg delete -f "*py37*"
That was the only command I ran, and all it took for me to run the initial portmaster command again by pressing the ^ key and it continued the build without further intervention on my part.
 
An annoying port is imagemagick. It exists in version 6 and version 7. And both are incompatible. When you install one, it de-installs many packages and vis-versa.
Yeah, I actually noted that one, and v. 7 is the one I compile ahead of time, before it gets pulled in as a dependency. Then, when I compile everything else, the ports notice that imagemagick v7 is installed, and don't harass me to install v. 6 :p
 
Back
Top