Re: [PATCH]: Missing tests-base in gnulib-cache.m4
- After generating the autotools build system, doing 'make check' will result in the following error (only when cross compiling for Win32 systems): make check does not work for Windows crosses because check-TESTS depends on $(TESTS), which includes test-allocaopt. So make attempts to make it instead of test-allocaopt.exe. I think that under native configurations make attempts to add the .exe automatically, but I am not sure of that. It should be possible to fix this with a sed -i '/^TESTS/ s/\(test-[-a-z0-9_]*\)\( \|$\)/\1$(EXEEXT)\2/g' *-tests command in the modules directory (yes, tested). It still wouldn't fix the fact that tests need to be invoked with Wine, though. Paolo
Re: [PATCH]: Missing tests-base in gnulib-cache.m4
* Paolo Bonzini wrote on Thu, Sep 25, 2008 at 12:43:05PM CEST: - After generating the autotools build system, doing 'make check' will result in the following error (only when cross compiling for Win32 systems): make check does not work for Windows crosses because check-TESTS depends on $(TESTS), which includes test-allocaopt. So make attempts to make it instead of test-allocaopt.exe. I think that under native configurations make attempts to add the .exe automatically, but I am not sure of that. Which Automake version do you use? This should be fixed in 1.10, I believe. If not, I'd appreciate a bug report, thanks. Cheers, Ralf
Re: [PATCH]: Missing tests-base in gnulib-cache.m4
Ralf Wildenhues wrote: * Paolo Bonzini wrote on Thu, Sep 25, 2008 at 12:43:05PM CEST: - After generating the autotools build system, doing 'make check' will result in the following error (only when cross compiling for Win32 systems): make check does not work for Windows crosses because check-TESTS depends on $(TESTS), which includes test-allocaopt. So make attempts to make it instead of test-allocaopt.exe. I think that under native configurations make attempts to add the .exe automatically, but I am not sure of that. Which Automake version do you use? This should be fixed in 1.10, I believe. If not, I'd appreciate a bug report, thanks. 1.9.6 indeed. Paolo
Re: [PATCH]: Missing tests-base in gnulib-cache.m4
Ralf Wildenhues [EMAIL PROTECTED] writes: * Paolo Bonzini wrote on Thu, Sep 25, 2008 at 12:43:05PM CEST: - After generating the autotools build system, doing 'make check' will result in the following error (only when cross compiling for Win32 systems): make check does not work for Windows crosses because check-TESTS depends on $(TESTS), which includes test-allocaopt. So make attempts to make it instead of test-allocaopt.exe. I think that under native configurations make attempts to add the .exe automatically, but I am not sure of that. Which Automake version do you use? This should be fixed in 1.10, I believe. If not, I'd appreciate a bug report, thanks. I added a mingw32 auto-build to simplify mingw32 portability tests, the output will be visible daily from now on at: http://autobuild.josefsson.org/gnulib/#dummy-i586-pc-mingw32msvc Right now, the gnulib modules that fail to build under mingw32 are (see log): savewd, sigpipe-die, getugroups, idcache, and userspec. Once they are fixed, the logs will contain output from the self-tests too, which could be interesting. FWIW, I use automake 1.10.1 with cross-compile builds without any problem with 'make check'. /Simon
Re: [PATCH]: Missing tests-base in gnulib-cache.m4
Hi Yoann, The --tests-base argument is not saved within gnulib-cache.m4. The attached patch fixes this issue. It is saved, but only as argument of gl_TESTS_BASE, not in the comment. I have applied your patch. Additionally, I'm running into another problem when cross compiling for Win32 systems: - Importing GnuLib file using the following command: ../gnulib/gnulib-tool --import --dir=. --lib=libmissing --tests-base=libmissing/tests --source-base=libmissing --m4-base=libmissing/m4 --doc-base=libmissing/doc --aux-dir=. --with-tests --lgpl --libtool --macro-prefix=gl --no-vc-files [modules list] - Then editing libmissing/Makefile.am by hand to list the tests directory as SUBDIRS (shouldn't this be handled automatically?). Right, it should be handled automatically. Currently gnulib-tool is asking the user to make a change to a file that is generated by gnulib-tool, and invoking gnulib-tool --import once again will erase the manual change. I'm fixing this through the patch below. - After generating the autotools build system, doing 'make check' will result in the following error (only when cross compiling for Win32 systems): $ make check make check-recursive make[1]: Entering directory `/home/yoann/dev/prelude/git/libprelude/libmissing' Making check in tests make[2]: Entering directory `/home/yoann/dev/prelude/git/libprelude/libmissing/tests' make check-recursive make[3]: Entering directory `/home/yoann/dev/prelude/git/libprelude/libmissing/tests' make[4]: Entering directory `/home/yoann/dev/prelude/git/libprelude/libmissing/tests' make libtests.a test-alloca-opt.exe test-arpa_inet.exe test-c-ctype.exe test-cond.exe test-errno.exe test-fopen.exe test-fseeko.exe test-getaddrinfo.exe test-getdelim.exe test-getline.exe test-gettimeofday.exe test-lock.exe test-lseek.exe test-memchr.exe test-memcmp.exe test-memmem.exe test-netinet_in.exe test-perror.exe test-poll.exe test-sleep.exe test-snprintf.exe test-sockets.exe test-stdbool.exe test-stdint.exe test-stdio.exe test-stdlib.exe test-strcasestr.exe test-strerror.exe test-string.exe test-strings.exe test-sys_select.exe test-sys_socket.exe test-sys_stat.exe test-sys_time.exe test-time.exe test-tls.exe test-unistd.exe test-vasnprintf.exe test-vsnprintf.exe test-wchar.exe test-wctype.exe make[5]: Entering directory `/home/yoann/dev/prelude/git/libprelude/libmissing/tests' make[5]: `libtests.a' is up to date. make[5]: `test-alloca-opt.exe' is up to date. make[5]: `test-arpa_inet.exe' is up to date. make[5]: `test-c-ctype.exe' is up to date. make[5]: `test-cond.exe' is up to date. make[5]: `test-errno.exe' is up to date. make[5]: `test-fopen.exe' is up to date. make[5]: `test-fseeko.exe' is up to date. make[5]: `test-getaddrinfo.exe' is up to date. make[5]: `test-getdelim.exe' is up to date. make[5]: `test-getline.exe' is up to date. make[5]: `test-gettimeofday.exe' is up to date. make[5]: `test-lock.exe' is up to date. make[5]: `test-lseek.exe' is up to date. make[5]: `test-memchr.exe' is up to date. make[5]: `test-memcmp.exe' is up to date. make[5]: `test-memmem.exe' is up to date. make[5]: `test-netinet_in.exe' is up to date. make[5]: `test-perror.exe' is up to date. make[5]: `test-poll.exe' is up to date. make[5]: `test-sleep.exe' is up to date. make[5]: `test-snprintf.exe' is up to date. make[5]: `test-sockets.exe' is up to date. make[5]: `test-stdbool.exe' is up to date. make[5]: `test-stdint.exe' is up to date. make[5]: `test-stdio.exe' is up to date. make[5]: `test-stdlib.exe' is up to date. make[5]: `test-strcasestr.exe' is up to date. make[5]: `test-strerror.exe' is up to date. make[5]: `test-string.exe' is up to date. make[5]: `test-strings.exe' is up to date. make[5]: `test-sys_select.exe' is up to date. make[5]: `test-sys_socket.exe' is up to date. make[5]: `test-sys_stat.exe' is up to date. make[5]: `test-sys_time.exe' is up to date. make[5]: `test-time.exe' is up to date. make[5]: `test-tls.exe' is up to date. make[5]: `test-unistd.exe' is up to date. make[5]: `test-vasnprintf.exe' is up to date. make[5]: `test-vsnprintf.exe' is up to date. make[5]: `test-wchar.exe' is up to date. make[5]: `test-wctype.exe' is up to date. make[5]: Leaving directory `/home/yoann/dev/prelude/git/libprelude/libmissing/tests' make check-TESTS make[5]: Entering directory `/home/yoann/dev/prelude/git/libprelude/libmissing/tests' i586-mingw32msvc-gcc -std=gnu99 -g -O2test-alloca-opt.c -o test-alloca-opt test-alloca-opt.c:19:20: error: config.h: No such file or directory test-alloca-opt.c:21:20: error: alloca.h: No such file or directory make[5]: *** [test-alloca-opt] Error 1 make[5]: Leaving directory `/home/yoann/dev/prelude/git/libprelude/libmissing/tests' make[4]: *** [check-am] Error 2 make[4]: Leaving directory `/home/yoann/dev/prelude/git/libprelude/libmissing/tests' make[3]: *** [check-recursive] Error 1 make[3]: Leaving directory
Re: [PATCH]: Missing tests-base in gnulib-cache.m4
* Bruno Haible wrote on Thu, Sep 25, 2008 at 02:42:39PM CEST: `/home/yoann/dev/prelude/git/libprelude/libmissing/tests' i586-mingw32msvc-gcc -std=gnu99 -g -O2test-alloca-opt.c -o test-alloca-opt test-alloca-opt.c:19:20: error: config.h: No such file or directory test-alloca-opt.c:21:20: error: alloca.h: No such file or directory make[5]: *** [test-alloca-opt] Error 1 [...] Can you investigate? I cannot reproduce. This is probably a followup error of using Automake 1.10. The target test-alloca-opt.exe will built correctly, the target test-alloca-opt only through a GNU make builtin rule (which lacks some of the flags). Cheers, Ralf
Re: [PATCH]: Missing tests-base in gnulib-cache.m4
Bruno Haible [EMAIL PROTECTED] writes: - Then editing libmissing/Makefile.am by hand to list the tests directory as SUBDIRS (shouldn't this be handled automatically?). Right, it should be handled automatically. Currently gnulib-tool is asking the user to make a change to a file that is generated by gnulib-tool, and invoking gnulib-tool --import once again will erase the manual change. I'm fixing this through the patch below. It doesn't work fully, in libidn doing a --import with the new gnulib-tool results in a diff: diff --git a/gl/Makefile.am b/gl/Makefile.am index 934ab4f..31890af 100644 --- a/gl/Makefile.am +++ b/gl/Makefile.am @@ -9,10 +9,11 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 - +# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 - AUTOMAKE_OPTIONS = 1.5 gnits +SUBDIRS = noinst_HEADERS = noinst_LIBRARIES = noinst_LTLIBRARIES = @@ -24,6 +25,7 @@ MOSTLYCLEANDIRS = CLEANFILES = DISTCLEANFILES = MAINTAINERCLEANFILES = +EXTRA_DIST += m4/gnulib-cache.m4 AM_CPPFLAGS = As you can see, the EXTRA_DIST contains the wrong path: it should be gl/m4/gnulib-cache.m4. Otherwise it looks good to me too, FWIW. /Simon
Re: [PATCH]: Missing tests-base in gnulib-cache.m4
Simon Josefsson wrote: It doesn't work fully, in libidn doing a --import with the new gnulib-tool results in a diff: @@ -9,10 +9,11 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 - +# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 - I cannot see any differences between these two lines. @@ -24,6 +25,7 @@ MOSTLYCLEANDIRS = CLEANFILES = DISTCLEANFILES = MAINTAINERCLEANFILES = +EXTRA_DIST += m4/gnulib-cache.m4 AM_CPPFLAGS = As you can see, the EXTRA_DIST contains the wrong path: it should be gl/m4/gnulib-cache.m4. No, it is correct. File names in gl/Makefile.am are supposed to be relative to the gl/ directory. Bruno
Re: [PATCH]: Missing tests-base in gnulib-cache.m4
Oops, the patch that I committed worked right in the second run, but not in the first run. Fixed: 2008-09-25 Bruno Haible [EMAIL PROTECTED] * gnulib-tool (func_import): When computing the edits, consider not only the Makefile.ams that exist but also those that will be generated. *** gnulib-tool.orig2008-09-25 15:59:10.0 +0200 --- gnulib-tool 2008-09-25 15:57:51.0 +0200 *** *** 2929,2940 fi func_note_Makefile_am_edit ACLOCAL_AMFLAGS -I ${m4base} { ! # Find the first parent directory of $m4base that contains a Makefile.am. sed_last='s,^.*/\([^/][^/]*\)//*$,\1/, s,//*$,/,' sed_butlast='s,[^/][^/]*//*$,,' dir1=${m4base}/; dir2= ! while test -n $dir1 test ! -f ${destdir}/${dir1}Makefile.am; do dir2=`echo $dir1 | sed -e $sed_last`$dir2 dir1=`echo $dir1 | sed -e $sed_butlast` done --- 2929,2947 fi func_note_Makefile_am_edit ACLOCAL_AMFLAGS -I ${m4base} { ! # Find the first parent directory of $m4base that contains or will contain ! # a Makefile.am. sed_last='s,^.*/\([^/][^/]*\)//*$,\1/, s,//*$,/,' sed_butlast='s,[^/][^/]*//*$,,' dir1=${m4base}/; dir2= ! while test -n $dir1 \ !! { test -f ${destdir}/${dir1}Makefile.am \ ! || test ${dir1}Makefile.am = $sourcebase/$makefile_am \ ! || test ./${dir1}Makefile.am = $sourcebase/$makefile_am \ ! || { test -n $inctests \ !{ test ${dir1}Makefile.am = $testsbase/$makefile_am \ !|| test ./${dir1}Makefile.am = $testsbase/$makefile_am; }; }; }; do dir2=`echo $dir1 | sed -e $sed_last`$dir2 dir1=`echo $dir1 | sed -e $sed_butlast` done
Re: [PATCH]: Missing tests-base in gnulib-cache.m4
Le jeudi 25 septembre 2008 à 12:55 +0200, Ralf Wildenhues a écrit : * Paolo Bonzini wrote on Thu, Sep 25, 2008 at 12:43:05PM CEST: - After generating the autotools build system, doing 'make check' will result in the following error (only when cross compiling for Win32 systems): make check does not work for Windows crosses because check-TESTS depends on $(TESTS), which includes test-allocaopt. So make attempts to make it instead of test-allocaopt.exe. I think that under native configurations make attempts to add the .exe automatically, but I am not sure of that. Which Automake version do you use? This should be fixed in 1.10, I believe. If not, I'd appreciate a bug report, thanks. I was using automake 1.9.6. I just tested using automake 1.10, and can confirm this solve the problem. Thanks! -- Yoann Vandoorselaere | Responsable RD / CTO | PreludeIDS Technologies Tel: +33 (0)9 50 70 21 58 Fax: +33(0)9 57 25 21 58 http://www.prelude-ids.com
Re: [PATCH]: Missing tests-base in gnulib-cache.m4
Bruno Haible [EMAIL PROTECTED] writes: +EXTRA_DIST += m4/gnulib-cache.m4 AM_CPPFLAGS = As you can see, the EXTRA_DIST contains the wrong path: it should be gl/m4/gnulib-cache.m4. No, it is correct. File names in gl/Makefile.am are supposed to be relative to the gl/ directory. Duh! Of course, I'm not sure what I was thinking. Thanks, /Simon