Re: The --prefix option attempts to mkdir directories which already exist

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: The --prefix option attempts to mkdir directories which already exist

Steve Byan-3

On Jan 24, 2006, at 11:56 AM, Steve Byan wrote:

> I'm attempting to use boost in a project. I'm currently building on  
> Mac OS X 10.4.4. I'm using the configure script from the boost  
> distribution to generate a makefile and embed the boost build  
> within a recursive-gmake build environment. I want to install the  
> boost libraries in a local project share area rather than in /usr/
> local.

> So the boost jamfiles appear to be attempting to create the  
> directory "Users/smb/work/projects/boston", which already exists,  
> and fail the install when they get the error from mkdir.

First, I tested my setup on Linux (SLES 9), and boost installs fine.  
It appears that (despite the claims of the man-page) the GNU/Linux  
"mkdir" doesn't complain if the directory already exists, while the  
(BSD-flavor) Mac OS X mkdir does complain if the directory already  
exists.

I fixed this as follows:

multivac% cvs diff -c allyourbase.jam
Index: allyourbase.jam
===================================================================
RCS file: /home/cvsroot/boston/common/iscsi/lib/boost/tools/build/v1/
allyourbase.jam,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 allyourbase.jam
*** allyourbase.jam     17 Jan 2006 16:03:46 -0000      1.1.1.1
--- allyourbase.jam     24 Jan 2006 20:45:55 -0000
***************
*** 369,374 ****
--- 369,375 ----
           SUFDLL          ?= .dylib ;
           gSHELL_LIBPATH  ?= DYLD_LIBRARY_PATH ;
           NOARSCAN        ?= true ;
+         MKDIR           ?= mkdir -p ;

       case NCR :
           RANLIB          ?= "" ;


(This adds "MKDIR ?= mkdir -p ;" to the MACOSX case.)



I seem to be using v1 of the build system (I'm using Boost 1.33.1); I  
suspect v2 will need this patch in order to work on OS X:

multivac% cvs diff -c common.jam
Index: common.jam
===================================================================
RCS file: /home/cvsroot/boston/common/iscsi/lib/boost/tools/build/v2/
tools/common.jam,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 common.jam
*** common.jam  17 Jan 2006 16:03:51 -0000      1.1.1.1
--- common.jam  24 Jan 2006 20:46:49 -0000
***************
*** 403,409 ****

   actions MkDir1
   {
!     mkdir "$(<)"
   }

   actions piecemeal together existing Clean
--- 403,409 ----

   actions MkDir1
   {
!     mkdir -p "$(<)"
   }

   actions piecemeal together existing Clean



--------
Steve Byan <[hidden email]>
Software Architect
Egenera, Inc.
165 Forest Street
Marlboro, MA 01752
(508) 858-3125

_______________________________________________
Boost-build mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: The --prefix option attempts to mkdir directories which already exist

Steve Byan-3

On Jan 24, 2006, at 3:49 PM, Steve Byan wrote:

> First, I tested my setup on Linux (SLES 9), and boost installs  
> fine. It appears that (despite the claims of the man-page) the GNU/
> Linux "mkdir" doesn't complain if the directory already exists,  
> while the (BSD-flavor) Mac OS X mkdir does complain if the  
> directory already exists.

Ugh, sorry, never mind. It's my bug; I used the wrong case in the  
prefix string. Mac OS X has a case-insensitive file system, so the  
Boost build system correctly decided that "/Users/smb/work/projects/
boston" did not exist, while the case-insensitive file-system  
insisted that "/Users/smb/work/projects/Boston" did exist and should  
be good enough for anybody interested in "/Users/smb/work/projects/
boston".

Regards,
-Steve
--------
Steve Byan <[hidden email]>
Software Architect
Egenera, Inc.
165 Forest Street
Marlboro, MA 01752
(508) 858-3125

_______________________________________________
Boost-build mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-build