bug#10474: Building guile 2.x under mingw + msys

2012-01-24 Thread Eli Zaretskii
> Date: Sat, 21 Jan 2012 13:09:08 +0200
> From: Eli Zaretskii 
> Cc: 10...@debbugs.gnu.org, commander.si...@googlemail.com
> 
> This completes the description of problems I needed to overcome for
> building Guile with MinGW+MSYS.

Well, it turns out there's more to tell:

1. First, I forgot to tell before that I needed to configure with

 CPPFLAGS='-D_WIN32_WINNT=0x0501' ./configure ...

because if I don't use CPPFLAGS='-D_WIN32_WINNT=0x0501, the configure
script claims various network-related functions, like getaddrinfo and
getnameinfo) are not available, which is a lie.

2. Warning messages from guile-snarf-docs:

 ./guile-snarf-docs -o memoize.doc memoize.c -- -DHAVE_CONFIG_H 
-DBUILDING_LIBGUILE=1 -I.. -I.. -I../lib -I../lib -Id:/usr/include   
-D_WIN32_WINNT=0x0501 -I/d/usr/include -Id:/usr/include   -g -O2
 memoize.c:479:***Mismatching FUNC_NAME.  Should be: `#define FUNC_NAME 
s_"@prompt"'
 ./guile-snarf-docs -o pairs.doc pairs.c -- -DHAVE_CONFIG_H 
-DBUILDING_LIBGUILE=1 -I.. -I.. -I../lib -I../lib -Id:/usr/include   
-D_WIN32_WINNT=0x0501 -I/d/usr/include -Id:/usr/include   -g -O2
 pairs.c:147:***Missing or erroneous `#define FUNC_NAME s_scm_cdr'
 pairs.c:150:***Missing or erroneous #undef for scm_car:
 pairs.c:155:***Missing or erroneous `#define FUNC_NAME s_scm_cddr'
 pairs.c:158:***Missing or erroneous #undef for scm_cdar:
 pairs.c:163:***Missing or erroneous `#define FUNC_NAME s_scm_cadr'
 pairs.c:166:***Missing or erroneous #undef for scm_caar:
 pairs.c:171:***Missing or erroneous `#define FUNC_NAME s_scm_cdddr'
 pairs.c:174:***Missing or erroneous #undef for scm_cddar:
 pairs.c:179:***Missing or erroneous `#define FUNC_NAME s_scm_cdadr'
 pairs.c:182:***Missing or erroneous #undef for scm_cdaar:
 pairs.c:187:***Missing or erroneous `#define FUNC_NAME s_scm_caddr'
 pairs.c:190:***Missing or erroneous #undef for scm_cadar:
 pairs.c:195:***Missing or erroneous `#define FUNC_NAME s_scm_caadr'
 pairs.c:198:***Missing or erroneous #undef for scm_caaar:
 pairs.c:203:***Missing or erroneous `#define FUNC_NAME s_scm_cr'
 pairs.c:206:***Missing or erroneous #undef for scm_cdddar:
 pairs.c:211:***Missing or erroneous `#define FUNC_NAME s_scm_cddadr'
 pairs.c:214:***Missing or erroneous #undef for scm_cddaar:
 pairs.c:219:***Missing or erroneous `#define FUNC_NAME s_scm_cdaddr'
 pairs.c:222:***Missing or erroneous #undef for scm_cdadar:
 pairs.c:227:***Missing or erroneous `#define FUNC_NAME s_scm_cdaadr'
 pairs.c:230:***Missing or erroneous #undef for scm_cdaaar:
 pairs.c:235:***Missing or erroneous `#define FUNC_NAME s_scm_cadddr'
 pairs.c:238:***Missing or erroneous #undef for scm_caddar:
 pairs.c:243:***Missing or erroneous `#define FUNC_NAME s_scm_cadadr'
 pairs.c:246:***Missing or erroneous #undef for scm_cadaar:
 pairs.c:251:***Missing or erroneous `#define FUNC_NAME s_scm_caaddr'
 pairs.c:254:***Missing or erroneous #undef for scm_caadar:
 pairs.c:259:***Missing or erroneous `#define FUNC_NAME s_scm_caaadr'
 pairs.c:262:***Missing or erroneous #undef for scm_cr:

These come from the guile-func-name-check Awk script, because the
offending functions indeed lack the usual "#define FUNC_NAME" and
"#undef FUNC_NAME" directives.

Are these problems real?  If not, I'd suggest to modify the Awk script
to not emit them: people might get alarmed without a good reason.

3. Error messages from makeinfo:

 rm -f guile-procedures.txt
 makeinfo --force -o guile-procedures.txt guile-procedures.texi || test -f 
guile-procedures.txt
 d:\usr\eli\utils\guile-2.0.3\libguile//guile-procedures.texi:10720: Cross 
reference to nonexistent node `Backslash Escapes' (perhaps incorrect 
sectioning?).
 d:\usr\eli\utils\guile-2.0.3\libguile//guile-procedures.texi:10415: Cross 
reference to nonexistent node `Network Address Conversion' (perhaps incorrect 
sectioning?).

and many more similar errors.

This is because guile-procedures.texi is not a complete Texinfo
source.  Since this command just generates a plain-text document, I
suggest to add --no-validate to makeinfo command-line switches.

4. Error in "make install-strip":

 make  install-data-hook
 make[5]: Entering directory `/d/usr/eli/utils/guile-2.0.3/meta'
 cd /d/usr/test/bin && rm -f guile-tools.exe && \
 cp -p guild.exe guile-tools.exe
 cp: cannot stat `guild.exe': No such file or directory
 make[5]: *** [install-data-hook] Error 1

This happens because meta/Makefile.am has this:

 # What we now call `guild' used to be known as `guile-tools'.
 install-data-hook:
 cd $(DESTDIR)$(bindir) && rm -f guile-tools$(EXEEXT) && \
 $(LN_S) guild$(EXEEXT) guile-tools$(EXEEXT)

The $(EXEEXT) part should be removed.

5. Invoking the installed guile.exe aborts:

 D:\usr\test>guile
 Backtrace:
 In ice-9/boot-9.scm:
  162: 7 [catch #t # ...]
  

bug#10520: [platform-testers] Guile 2.0.4 release imminent

2012-01-24 Thread Ludovic Courtès
Hi Bruno,

l...@gnu.org (Ludovic Courtès) skribis:

> Bruno Haible  skribis:
>
>> 8) On Linux/hppa and Linux/SPARC32 and Linux/IA-64, build failure in the
>> libguile directory:
>>
>>   SNARF  socket.doc
>>   SNARF  regex-posix.doc
>>   GENguile-procedures.texi
>> /bin/sh: line 1:  1022 Broken pipe cat alist.doc arbiters.doc 
>> array-handle.doc array-map.doc arrays.doc async.doc backtrace.doc 
>> boolean.doc bitvectors.doc bytevectors.doc chars.doc control.doc 
>> continuations.doc debug.doc deprecated.doc deprecation.doc dynl.doc 
>> dynwind.doc eq.doc error.doc eval.doc evalext.doc expand.doc extensions.doc 
>> feature.doc filesys.doc fluids.doc foreign.doc fports.doc gc-malloc.doc 
>> gc.doc gettext.doc generalized-arrays.doc generalized-vectors.doc goops.doc 
>> gsubr.doc guardians.doc hash.doc hashtab.doc hooks.doc i18n.doc init.doc 
>> ioext.doc keywords.doc list.doc load.doc macros.doc mallocs.doc memoize.doc 
>> modules.doc numbers.doc objprop.doc options.doc pairs.doc ports.doc 
>> print.doc procprop.doc procs.doc promises.doc r6rs-ports.doc random.doc 
>> rdelim.doc read.doc root.doc rw.doc scmsigs.doc script.doc simpos.doc 
>> smob.doc sort.doc srcprop.doc srfi-1.doc srfi-4.doc srfi-13.doc srfi-14.doc 
>> srfi-60.doc stackchk.doc stacks.doc stime.doc strings.doc strorder.doc 
>> strports.doc struct.doc symbols.doc threads.doc throw.doc trees.doc 
>> uniform.doc values.doc variable.doc vectors.doc version.doc vports.doc 
>> weaks.doc dynl.doc posix.doc net_db.doc socket.doc regex-posix.doc
>>   1023 Segmentation fault  | GUILE_AUTO_COMPILE=0 
>> ../meta/uninstalled-env guild snarf-check-and-output-texi > 
>> guile-procedures.texi
>> make[3]: *** [guile-procedures.texi] Error 1
>
> I bisected this and found this harmless-looking patch to be the culprit:
>
>   
> http://git.savannah.gnu.org/cgit/guile.git/commit/?id=3e54fdfc217969abb50a46ec9c9c5c02a2c7d369
>
> The segfault would occur in vm-i-system.c:1281, in the ‘CACHE_PROGRAM’
> macro, while trying to access ‘SCM_PROGRAM_DATA’, because of a bogus
> value for ‘program’, stemming from a bogus ‘fp’.
>
> After a long and tiring period of investigation, I found that reverting
> just the definitions SCM_FRAME_DYNAMIC_LINK and
> SCM_FRAME_SET_DYNAMIC_LINK would solve the problem.
>
> Eventually, I found that, keeping frames.h unchanged, adding a compiler
> barrier after each ‘fp’ assignment would solve the problem:

I’ve checked this in:

  
http://git.sv.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=2b264d7e4fb649955ade1814527b6eb6f34f4e18

Closing the bug, because I think bugs were all addressed.  Let us know
if you think I got it wrong!

Thanks,
Ludo’.