pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkgsrc bootstrap on mac m1,




On Thu, Mar 2, 2023 at 8:55 PM George Georgalis <george%galis.org@localhost> wrote:
On Thu, Mar 2, 2023 at 8:16 PM George Georgalis <george%galis.org@localhost> wrote:
Shouldn't Build.sh properly declare the Target (this is arm64, not x86_64) and InstallDir above? Why was /opt/pkg/bin identified as target and my declared prefix /opt/pkg-2022Q4 ignored? (FWIW there is no cc in my /opt/pkg/bin and that dir is not writeable by this user).

The above PATH export seems to fix my bootstrap issue, but this could be a full stop for new users? Was it wrong to prepend (vs append) my path env with /opt/pkg/bin? Should this situation be addressed in Build.sh? It looks like more full (bootstrap) paths should be set and used in Build.sh vs relying on env PATH? What is the best approach here?

...simplifying my question. Although cc was not provided in /opt/pkg/bin, clang is, and it looks like the build target (arch) should be declared to it, vs detected by clang.

Why /usr/bin/clang works but /opt/pkg/bin/clang does not, I am not sure, but shouldn't ./bootstrap detect the local target (arch) and set an appropriate env (and/or config) for clang to do the right thing? What about the InstallDir mixup?

Comparing the output of  (on Mac M1)

/usr/bin/clang --print-supported-cpus
[lots of good stuff]

vs

/opt/pkg/bin/clang --print-supported-cpus
clang version 15.0.7
Target: x86_64-apple-darwin22.3.0
Thread model: posix
InstalledDir: /opt/pkg/bin
No available targets are compatible with triple "x86_64-apple-macosx13.0.0"

seems to indicate the root cause is in the clang pkgin binary package.
It looks like there is a provision for arm (and aarch64) in /opt/pkgsrc/lang/clang/Makefile
but the right thing to do is unclear, should line 590 in /opt/pkgsrc/bootstrap/bootstrap
do more for the clang makefile env, or should the clang makefile do better detection?
Perhaps /usr/bin/clang fullpath should be hardcoded?

-George

--
George Georgalis, (415) 894-2710, http://www.galis.org/



Home | Main Index | Thread Index | Old Index