Ticket #888 (closed bug: fixed)

Opened 5 years ago

Last modified 4 years ago

[BUG]parrot make failed with chinese TEMP PATH

Reported by: jimmy Owned by: jimmy
Priority: normal Milestone:
Component: none Version: 1.4.0
Severity: medium Keywords:
Cc: Language:
Patch status: Platform:

Description (last modified by jkeenan) (diff)

TEMP PATH:

C:\DOCUME~1\散花牧人\LOCALS~1\Temp

It is successful before. But I don't know when it is failed.

And then I removed line 2839, 2840, 2841 in api.c with r40203, and then I make successful.

After that I did 'make smoke', It failed 26 tests, see  http://smolder.plusthree.com/app/public_projects/report_details/25675

Attachments

nonascii_chars_in_tmp_path.patch Download (0.5 KB) - added by cotto 4 years ago.

Change History

Changed 5 years ago by jimmy

when I meant api.c. it's src/string/api.c.

Changed 5 years ago by jimmy

At TT #326, It was maked successful, but test failed, and now It was failed. :(

Changed 5 years ago by jkeenan

  • description modified (diff)
  • summary changed from [BUG]parrot make failed with chinese TEMP PTAH to [BUG]parrot make failed with chinese TEMP PATH

Changed 5 years ago by jimmy

build log

gcc -o .\miniparrot.exe src\main.o src\null_config.o \
         "F:\pipp\parrot-dev\libparrot.dll"  -lmsvcrt -lmoldname -lkernel32 -lus
er32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnet
api32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lgmp
if exist .\miniparrot.exe.manifest mt.exe -nologo -manifest .\miniparrot.exe.man
ifest -outputresource:.\miniparrot.exe;1
Invoking Parrot to generate runtime\parrot\include\config.fpmc --cross your fing
ers
.\miniparrot.exe config_lib.pasm > runtime\parrot\include\config.fpmc
Malformed string
make: *** [runtime\parrot\include\config.fpmc] Error 1

Changed 4 years ago by coke

  • owner set to coke

Changed 4 years ago by cotto

If nothing else, this is pretty easy to reproduce on other platforms. Just add some non-ascii chars to the tmp path before running Configure.pl and the build should fail in the same place.

export TMPDIR=/tmp/散花牧人
mkdir $TMPDIR
perl Configure.pl
make
...
<build breaks>

Changed 4 years ago by cotto

This patch fixes the problem by marking all strings in config_lib.pir as unicode encoded. I don't know if it's correct or desirable, but it fixes the build for me when I have Parrot configured as above.

Changed 4 years ago by cotto

Changed 4 years ago by coke

  • owner changed from coke to jimmy

Assigning to jimmy now that he has commit bits.

Changed 4 years ago by coke

  • status changed from new to closed
  • resolution set to fixed

Slightly different fix for the problem (though very close to cotto++'s) in r47588.

Uses the default string encoding for anything that fits in ASCII; use binary for anything else -- utf8 is probably not safe, since some of this data is coming in from ENV and isn't necessarily encoded properly.

.loadlib 'io_ops'

.sub main :main
    .local pmc interp,config

    .include 'iglobals.pasm'

     interp = getinterp
     config = interp[.IGLOBALS_CONFIG_HASH] 

     $S1 = config['tempdir']
     $S1 .= "/blah.txt"
     $P1 = open $S1, 'w'
     print $P1, "hello world"
     close $P1
.end

Changed 4 years ago by jimmy

Thanks, Coke++

Note: See TracTickets for help on using tickets.