[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: guile 2.0.9 build on mingw
From: |
objc |
Subject: |
Re: guile 2.0.9 build on mingw |
Date: |
Mon, 20 May 2013 22:09:59 +0100 |
Hi Eli,
I've seen problems like this too.
GEN guile-procedures.texi
Throw without catch before boot:
You have to build guile.exe properly before guile-procedures.texi etc...
works because guile.exe (guilec.exe) builds them.
To get the build right, I change ports.c print.c and strings .c
92: //jrg
#define iconv_open libiconv_open
#define iconv libiconv
#define iconv_close libiconv_close
//end jrg
print.c:
*******
59://jrg
#define iconv_open libiconv_open
#define iconv libiconv
#define iconv_close libiconv_close
//end jrg
strings.h
*********
1946: const char *jrgbuf;//jrg
1993: jrgbuf = NULL;
1996:// if (enc == NULL)
// enc = "ISO-8859-1";
if (enc == NULL) enc = "ANSI_X3.4-1968"; //jrg
if (scm_i_is_narrow_string (str))
{
jrgbuf = scm_i_string_chars (str); //jrg
// fprintf (stderr,"jrgbuf
[%s]ilen[%d]encoding[%s]enc[%s]lenp[%d]\n",jrgbuf,ilen,encoding,enc,(int)(size_t
)lenp);//jrg
ret = mem_iconveh (jrgbuf, ilen,
"ANSI_X3.4-1968", enc,//"ANSI_X3.4-1968"
"ISO-8859-1" "UTF-8"
(enum iconv_ilseq_handler) handler, NULL,
&buf, &len);
if (ret != 0)
{//jrg
//try another one !!
// fprintf (stderr,"try ISO-8859-1 jrgbuf
[%s]ilen[%d]encoding[%s]enc[%s]lenp[%d]\n",jrgbuf,ilen,encoding,enc,(int)(size_t
)lenp);//jrg
ret = mem_iconveh (jrgbuf, ilen,
"ISO-8859-1", enc,//"ANSI_X3.4-1968" "ISO-8859-1"
"UTF-8"
(enum iconv_ilseq_handler) handler, NULL,
&buf, &len);
}
if (ret != 0)
{//jrg
//try another one !!
// fprintf (stderr,"try UTF-8jrgbuf
[%s]ilen[%d]encoding[%s]enc[%s]lenp[%d]\n",jrgbuf,ilen,encoding,enc,(int)(size_t
)lenp);//jrg
ret = mem_iconveh (jrgbuf, ilen,
"UTF-8", enc,//"ANSI_X3.4-1968" "ISO-8859-1"
"UTF-8"
(enum iconv_ilseq_handler) handler, NULL,
&buf, &len);
}
if (ret != 0)
{//jrg
printf("(ret != 0) jrgbuf [%s] buf[%s]\n",jrgbuf,buf);//jrg
fprintf (stderr,"failed return jrgbuf jrgbuf
[%s]ilen[%d]encoding[%s]enc[%s]lenp[%d]\n",jrgbuf,ilen,encoding,enc,(int)(size_t
)lenp);//jrg
return (char*)jrgbuf;//hmmm
scm_encoding_error (__func__, errno,
"cannot convert narrow string to output locale",
SCM_BOOL_F,
/* FIXME: Faulty character unknown. */
SCM_BOOL_F);
}//jrg
}
else
{
jrgbuf = (char *)(scm_t_uint32 *) scm_i_string_wide_chars (str);
//jrg
fprintf (stderr,"jrgbuf
[%s]ilen[%d]encoding[%s]enc[%s]lenp[%d]\n",jrgbuf,ilen,encoding,enc,(int)(size_t
)lenp);//jrg
buf = u32_conv_to_encoding (enc,
(enum iconv_ilseq_handler) handler,
(scm_t_uint32 *) scm_i_string_wide_chars
(str),
ilen,
NULL,
NULL, &len);
if (buf == NULL)
{//jrg
printf("(buf == NULL) jrgbuf [%s] buf [%s]\n",jrgbuf,buf);//jrg
scm_encoding_error (__func__, errno,
"cannot convert wide string to output locale",
SCM_BOOL_F,
/* FIXME: Faulty character unknown. */
SCM_BOOL_F);
}
}
This is just some hacking around, but may put someone on the right track.
I use cygwin (mingw) on XP SP3 (see http://branch-twigg.webs.com/ for
my build).
It's still buggy but does what I need it to do.
Hope this helps.
John Goodwin
--------------------------------------------------
From: "Andy Wingo" <address@hidden>
Sent: Monday, May 20, 2013 9:46 PM
To: "Eli Zaretskii" <address@hidden>
Cc: <address@hidden>
Subject: Re: guile 2.0.9 build on mingw
On Mon 20 May 2013 22:05, Eli Zaretskii <address@hidden> writes:
Date: Mon, 20 May 2013 21:46:02 +0200
From: Panicz Maciej Godek <address@hidden>
I'm trying to build guile on mingw, but i get the following error:
the instruction at 0x7059fe6b refrenced memory at 0x00000004 the memory
could not be read
The error appears at the stage
GEN guile-procedures.texi
but when I ask make to keep going, the same error appears when guilec
tries
to compile ice-9/eval.go.
I reported a similar problem here:
http://lists.gnu.org/archive/html/bug-guile/2013-05/msg00006.html
So far no replies. I hope to hear from them some day.
Thanks for the ping :) Can you run meta/gdb-uninstalled-guile and get a
backtrace somehow? Do you know what source line this error is coming
from? I've only cross-built and not actually tried to run Guile on
native MinGW.
Andy
--
http://wingolog.org/