pkgsrc-Users archive

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

Re: tools and ar



On Thu, Nov 16, 2017 at 09:49:00PM +0100, Pierre Pronchery wrote:
> 		Hi Patrick, pkgsrc-users@,
> 
> On 16/11/2017 14:34, Patrick Welche wrote:
> > ERROR: Makefile:13: Unknown tool "ar".
> 
> What did you do to encounter this error?

I was trying to create a package for http://www.mcs.anl.gov/petsc/
             Configuring PETSc to compile on your system                       
...
Could not find a suitable archiver.  Use --with-ar to specify an archiver.

so my first thought was to wonder whether "ar" might be in some way
special, had a look in

> I suppose you mean mk/tools/tools.NetBSD.mk:
> 
> > 148 .if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
> > 149 .  for _t_ in ar as ld nm objcopy objdump ranlib readelf strip
> > 150 TOOLS_PATH.${MACHINE_GNU_PLATFORM}-${_t_}?=     \
> > 151         ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-${_t_}
> > 152 TOOLS_CREATE+=  ${MACHINE_GNU_PLATFORM}-${_t_}
> > 153 .  endfor

and added TOOLS_DEPENDS+=ar, so got the "Unknown tool" error, which then
looked as though USE_CROSS_COMPILE yes and no isn't symmetric.

> This really does, for ar:
> 
> TOOLS_CREATE+= ${MACHINE_GNU_PLATFORM}-ar
> 
> > so should something be added in the non-cross compile case to make
> > ar exist whether or not USE_CROSS_COMPILE is true?
> 
> I had a look at this recently (while working on PKGSRC_MKREPRO) and it
> seemed to me that nothing ever creates ar(1) as a tool, regardless of
> cross-compilation being in use. The default ar(1) from the system is
> always used.

Still haven't got to the bottom of the PETSc problem, but now I'm under
the impression that it hasn't got much to do with "ar"...

Thanks,

Patrick


Home | Main Index | Thread Index | Old Index