[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#7656) Build: Installing LMDB on OS X



john@jahewson.com wrote:
> Full_Name: John Hewson
> Version: 2.4.35
> OS: OS X 10.8.4
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (76.175.89.135)
>
>
> I can't install liblmdb on OS X because its Makefile assumes that cp can
> handle multiple source files, rather than the basic POSIX cp, which can't.
> This leads to the situation on OS X where:
>
>      cp source1 source2 dest
>
> throws an error.

Thanks for the report, fixed in mdb.master
>
> The breaks the LMDB Makefile, because its install attempts to do:
>
>      ILIBS	= liblmdb.a liblmdb.so
>      ...
>      cp $(IPROGS) $(DESTDIR)$(prefix)/bin
>
> Most makefiles I've encountered use a for loop for copying multiple files,
> so the fix for the Makefile is to change `install` to:
>
>      install: $(ILIBS) $(IPROGS) $(IHDRS)
>          for f in $(IPROGS); do cp $$f $(DESTDIR)$(prefix)/bin; done
>          for f in $(ILIBS); do cp $$f $(DESTDIR)$(prefix)/lib; done
>          for f in $(IHDRS); do cp $$f $(DESTDIR)$(prefix)/include; done
>          for f in $(IDOCS); do cp $$f $(DESTDIR)$(prefix)/man/man1; done
> 	
> Then LMDB builds and installs successfully on OS X.
>
>


-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/