pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Package not honoring pkgsrc settings
Alberto Mijares <amijaresp%gmail.com@localhost> writes:
> I'm working on a CentOS 6.10 and the first thing to do was to install a
> newer compiler (gcc7).
Centos 6 is really ancient, release date 2011-11-27, EOL date
2020-11-30. I realize you know that, but...
> Most of the packages I need have been compiled with almost no issue.
> However, now I'm dealing with zstd.
>
> For some reason, I can see in debug logs that the build process is using
> the base CC (/usr/bin/cc) instead of the PKGSRC CC ($PREFIX/gcc7/bin/gcc).
> And therefore I'm seeing a nasty error about assembly instructions not
> understood by the compiler.
pkgsrc by default will use the base compiler unless it is somehow marked
that it is not ok. However, things get marked when someone finds out
that some old compiler is not good enough. For the base compiler in
NetBSD 9, which is gcc7, that is usually noticed. For a compiler that
was current in 2009-2010 (guessing), the number of people who are trying
and noticing is likely to be very small. Perhaps that number is just
one -- now we know it isn't zero :-)
You didn't say which version of pkgsrc, and what the base compiler is.
Note that pkgsrc-current has a lot of changes in compiler selection
logic but that these shouldn't really change many decisions. This is
unlikely your issue.
What I would do, if I really had to use such a system, would be
bootstrap pkgsrc
build gcc10 (if that can be built, otherwise step down to find the
highest one that builds, perhaps reading gcc docs for requirements to
speed things up)
in mk.conf, set GCC_REQD=10 (or whatever you built)
continue with everything else
This will say that for every package, you need gcc 10. Putting
GCC_REQD, which is supposed to be set by packages, in mk.conf instead is
technically a bit abusive, but a) it is what everybody does and b) you
are welcome to do whatever you want with your own copy of pkgsrc!
And, if you are trying to build modern/bloated things in c++ like qt,
then I would say even if you can't build gcc10, you should build 7, then
set GCC_REQD to 7, and then build 10, and then set to 10. You are far
better off with a single compiler for most things.
> Now I wonder why this happens and whats the best approach to fix. I tried
> prefixing env variables, editing pkgsrc Makefile, mk.conf and nothing
> works. Should I patch the upstream Makefile? I guess this is where the
Your message said you tried a lot and "nothing works". This contains
almost zero information and does not let anybody help you. I hope the
above helps, but to get help you will need to be much clearer about what
you did and what happened. The basic issue is that what is printed will
likely be helpful to people who understand, even if it doesn't make
sense to you.
> build process finds the last word regarding the compiler set to use.
pkgsrc selects the compiler according to a bunch of rules. In this
case, it appears:
zstd might have an undeclared dependency on a compiler newer than your
very old base one
trying to operate with a compiler that is 10+ years old is likely to
run into trouble which needs to be worked around, which is going to
take effort. That's just part of the cost resulting from a decision
to run really old software and simultaneously want new software.
Home |
Main Index |
Thread Index |
Old Index