On Thursday, March 4, 2021 at 3:00:06 PM UTC+1 Albrecht Schlosser wrote:
Some questions:
What is your PATH after installation and configuration of MacPorts?
My PATH was not correctly set by the macports installation, may be because I use /bin/csh
I had to manually add /opt/local/bin and /opt/local/sbin to my .tcshrc
and then all when smooth.
I also had to edit file xxxxx/misc/fonts.dir and add one line to it because X cursors where missing.
But that's a bug with XQuartz, not with macports.
% echo $PATH
.:/Users/xxx/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin:/Library/Apple/usr/bin:/opt/local/bin:/opt/local/sbin:/Users/xxx/bin:/usr/local/bin
(there are a few useless remains)
What does `which pkg-config' output ?
% which pkg-config
/opt/local/bin/pkg-config
Are there potential conflicts with other tools / symbolic links in
/usr/local or elsewhere?
None, because /usr/local is not used. Macports puts all in /opt/local
Finally, pkg-config is a nice example but having a universal executable
is less important than being able to *build* universal apps. The main
purpose of installing 'universal' packages is IMHO for libraries so they
can be linked in universal binaries. Did you try this too? Is it possible?
Yes, it is, as shown below :
% file /opt/local/lib/libglib-2.0.0.dylib
/opt/local/lib/libglib-2.0.0.dylib: Mach-O 64-bit dynamically linked shared library arm64
% sudo port install glib2 +universal
Password:
---> Fetching archive for ncurses
---> Attempting to fetch ncurses-6.2_1+universal.darwin_20.arm64-x86_64.tbz2 from https://lil.fr.packages.macports.org/ncurses
… several more fetches …
---> Fetching archive for glib2
---> Attempting to fetch glib2-2.58.3_1+universal+x11.darwin_20.arm64-x86_64.tbz2 from https://lil.fr.packages.macports.org/glib2
---> Attempting to fetch glib2-2.58.3_1+universal+x11.darwin_20.arm64-x86_64.tbz2 from https://packages.macports.org/glib2
---> Attempting to fetch glib2-2.58.3_1+universal+x11.darwin_20.arm64-x86_64.tbz2.rmd160 from https://packages.macports.org/glib2
---> Installing glib2 @2.58.3_1+universal+x11
---> Deactivating glib2 @2.58.3_1+x11
---> Cleaning glib2
---> Activating glib2 @2.58.3_1+universal+x11
---> Cleaning glib2
% file /opt/local/lib/libglib-2.0.0.dylib
/opt/local/lib/libglib-2.0.0.dylib: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit dynamically linked shared library x86_64] [arm64]
/opt/local/lib/libglib-2.0.0.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64
/opt/local/lib/libglib-2.0.0.dylib (for architecture arm64): Mach-O 64-bit dynamically linked shared library arm64
I add that you download binaries with macports, which makes it orders of magnitude faster than with homebrew where
you must recompile everything.