Talk:How to use pkgsrc on Mac OS X

From NetBSD Wiki

Jump to: navigation, search

using pkgsrc on OS X 10.5.2 with xcode 3.0 i found following mk.conf settings helpful for compiling things. CFLAGS = -Wall -fno-strict-aliasing -g -O2 -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch i386 LDFLAGS = -arch i386

This was done on intel arch macbook -isysroot option seems to be important because with out it tries to use 10.4 sdk as default.

Actually i went so far and reinstalled pkgsrc and all packages. I also gave those CFLAGS and LDFLAGS to bootstrap process to avoid any errors caused by compiling against wrong sdk on my system.

bootstrap failed on 10.5.6

Had to manually execute:

gcc -isystem /usr/include -L/usr/ports/bootstrap/work/wrk/pkgtools/pkg_install/work/libarchive/.libs -L/usr/ports/bootstrap/work/wrk/pkgtools/pkg_install/work/lib fetch -L/usr/ports/bootstrap/work/wrk/pkgtools/pkg_install/work/libnbcompat -L/usr/lib -L/Users/akua/pkg/lib -L../lib -o pkg_info main.o perform.o show.o -linstal l -larchive -lfetch -lbz2 -lz -lnbcompat -lcrypto

in bootstrap/work/wrk/pkgtools/pkg_install/work/pkg_install-20090213/info

when the pkg_install build failed with links to certificate constants.

Personal tools