#1927: Parrot doesn't build on Win32 with spaces in directory name
-------------------------+--------------------------------------------------
Reporter: whiteknight | Owner: nwellnhof
Type: bug | Status: assigned
Priority: critical | Milestone: 3.0
Component: build | Version: master
Severity: high | Keywords: win32
Lang: | Patch:
Platform: all |
-------------------------+--------------------------------------------------
Comment(by jkeenan):
On Darwin and Linux, I have had success so far with this patch in the
''spaces_in_paths'' branch:
{{{
$ git diff master...spaces_in_paths | cat
diff --git a/config/gen/makefiles/root.in b/config/gen/makefiles/root.in
index 3ab392e..6f841ce 100644
--- a/config/gen/makefiles/root.in
+++ b/config/gen/makefiles/root.in
@@ -859,7 +859,7 @@ $(PARROT) : frontend/parrot/main$(O) $(GEN_HEADERS)
$(LIBPARROT) \
$(MINIPARROT)
$(LINK) @ld_...@$@ \
frontend/parrot/main$(O) src/parrot_config$(O) src/longopt$(O) \
- @rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS) $(LINK_DYNAMIC)
+ $(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS) $(LINK_DYNAMIC)
#IF(win32): if exist [email protected] mt.exe -nologo -manifest [email protected]
-outputresource:$@;1
$(PBC_TO_EXE) : $(DEV_TOOLS_DIR)/pbc_to_exe.pir
runtime/parrot/library/config.pir $(PARROT) $(DYNEXT_DIR)/os$(LOAD_EXT)
$(DYNEXT_DIR)/file$(LOAD_EXT)
@@ -885,7 +885,7 @@ $(PARROT_CONFIG) : $(DEV_TOOLS_DIR)/parrot-config.pir
$(PARROT) $(PBC_TO_EXE)
$(MINIPARROT) : frontend/parrot/main$(O) include/parrot/api.h
include/parrot/longopt.h $(LIBPARROT) \
src/null_config$(O) src/longopt$(O)
$(LINK) @ld_...@$@ frontend/parrot/main$(O) src/null_config$(O)
src/longopt$(O) \
- @rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
+ $(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32): if exist [email protected] mt.exe -nologo -manifest [email protected]
-outputresource:$@;1
$(INSTALLABLEPARROT) : frontend/parrot/main$(O) $(GEN_HEADERS)
$(LIBPARROT) \
@@ -1054,7 +1054,7 @@ $(PDB) : frontend/parrot_debugger/main$(O)
src/parrot_config$(O) $(LIBPARROT)
$(LINK) @ld_...@$@ \
frontend/parrot_debugger/main$(O) \
src/parrot_config$(O) \
- @rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
+ $(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32): if exist [email protected] mt.exe -nologo -manifest [email protected]
-outputresource:$@;1
$(INSTALLABLEPDB) : frontend/parrot_debugger/main$(O) $(LIBPARROT)
src/parrot_config$(O)
@@ -1078,7 +1078,7 @@ $(DIS) : src/pbc_disassemble$(O) $(LIBPARROT)
$(LINK) @ld_...@$@ \
src/pbc_disassemble$(O) \
src/longopt$(O) \
- @rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
+ $(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32): if exist [email protected] mt.exe -nologo -manifest [email protected]
-outputresource:$@;1
$(INSTALLABLEDIS) : src/pbc_disassemble$(O) \
@@ -1099,7 +1099,7 @@ $(PDUMP) : frontend/pbc_dump/main$(O)
frontend/pbc_dump/packdump$(O) $(LIBPARROT
$(LINK) @ld_...@$@ \
frontend/pbc_dump/main$(O) \
src/longopt$(O) \
- frontend/pbc_dump/packdump$(O) @rpath_blib@ $(ALL_PARROT_LIBS)
$(LINKFLAGS)
+ frontend/pbc_dump/packdump$(O) $(RPATH_BLIB) $(ALL_PARROT_LIBS)
$(LINKFLAGS)
#IF(win32): if exist [email protected] mt.exe -nologo -manifest [email protected]
-outputresource:$@;1
frontend/pbc_dump/main$(O) : \
@@ -1132,7 +1132,7 @@ $(PBC_MERGE) : frontend/pbc_merge/main$(O)
$(LIBPARROT) src/parrot_config$(O)
frontend/pbc_merge/main$(O) \
src/parrot_config$(O) \
src/longopt$(O) \
- @rpath_blib@ $(ALL_PARROT_LIBS) $(LINK_DYNAMIC) $(LINKFLAGS)
+ $(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINK_DYNAMIC) $(LINKFLAGS)
#IF(win32): if exist [email protected] mt.exe -nologo -manifest [email protected]
-outputresource:$@;1
$(INSTALLABLEPBC_MERGE) : frontend/pbc_merge/main$(O) $(LIBPARROT)
$(INSTALLABLECONFIG)
@@ -2871,7 +2871,7 @@ win32-inno-installer : world installable
###############################################################################
exec : src/parrot_config$(O) $(LIBPARROT)
- $(LINK) @ld_...@$(EXEC)$(EXE) $(EXEC)$(O) src/parrot_config$(O)
@rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
+ $(LINK) @ld_...@$(EXEC)$(EXE) $(EXEC)$(O) src/parrot_config$(O)
$(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS)
###### OS depend targets ##########
diff --git a/config/init/hints/darwin.pm b/config/init/hints/darwin.pm
index 2f6184f..82820fd 100644
--- a/config/init/hints/darwin.pm
+++ b/config/init/hints/darwin.pm
@@ -43,7 +43,7 @@ sub runstep {
_set_deployment_environment();
my $lib_dir = $conf->data->get('build_dir') . "/blib/lib";
- $flagsref->{ldflags} .= " -L$lib_dir";
+ $flagsref->{ldflags} .= ' -L"' . $lib_dir . '"';
if ($ENV{'MACOSX_DEPLOYMENT_TARGET'} eq '10.6') {
$flagsref->{ccflags} .= ' -pipe -fno-common ';
@@ -91,9 +91,9 @@ sub runstep {
libparrot_shared_alias => "libparrot$share_ext",
rpath => "-L",
libparrot_soname => "-install_name "
- . $lib_dir
+ . '"'. $lib_dir
. '/libparrot'
- . $conf->data->get('share_ext')
+ . $conf->data->get('share_ext') . '"'
);
}
diff --git a/config/inter/libparrot.pm b/config/inter/libparrot.pm
index ab2f541..03af147 100644
--- a/config/inter/libparrot.pm
+++ b/config/inter/libparrot.pm
@@ -83,10 +83,10 @@ sub runstep {
$conf->data->set( rpath_blib => ( ! $disable_rpath
&& $parrot_is_shared
&& $conf->data->get('rpath') )
- ? $conf->data->get('rpath')
- . '"' . $conf->data->get('build_dir') . '"'
+ ? '"' . $conf->data->get('rpath')
+ . $conf->data->get('build_dir')
. '/'
- . $conf->data->get('blib_dir')
+ . $conf->data->get('blib_dir') . '"'
: ''
);
}}}
I suspect that we should make similar changes in all the
''config/init/hints/<os>.pm'' files.
kid51
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/1927#comment:8>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets