Subject: FIX_RPATH and Darwin
To: None <tech-pkg@netbsd.org>
From: Hiramatsu Yoshifumi <hiramatu@boreas.dti.ne.jp>
List: tech-pkg
Date: 12/07/2003 04:07:48
Hi,

pkgtools/pkg_install can't be built on Darwin due to FIX_RPATH logic.

Because _USE_RPATH is defined to "no" in defs.Darwin.mk, this code is executed.

.if !empty(_USE_RPATH:M[nN][oO])
.  if defined(FIX_RPATH) && !empty(FIX_RPATH)
.    for var in ${FIX_RPATH}
.      for _rpath_flag in ${RPATH_FLAG} -R -rpath -rpath-link --rpath --rpath-link
${var}:=        ${${var}:N-Wl,${_rpath_flag}*:N${_rpath_flag}*}
.      endfor
.    endfor
.  endif
.endif

But FIX_RPATH contains "LDFLAGS", and RPATH_FLAG is "-L", environment variable

  LDFLAGS= -L/usr/pkgsrc/pkgtools/pkg_install/work/libnbcompat -Wl,-R/usr/pkg/lib -L/usr/pkg/lib

becomes

  LDFLAGS=

and failed to find libnbcompat. 


How can I fix this problem?

-- 
// Hiramatsu Yoshifumi
// hiramatu@boreas.dti.ne.jp