Hi,
I just tries to build stunnel 5.20 on Solaris 10 Sparc and noticed a strange behaviour during „make check“ which yields in a try to build Windows executables:
dam@unstable10s [unstable10s]:/home/dam/mgar/pkg/stunnel/trunk/work/solaris10-sparc/build-isa-sparcv8plus/stunnel-5.20 > gmake check Making check in src gmake[1]: Entering directory '/home/dam/mgar/pkg/stunnel/trunk/work/solaris10-sparc/build-isa-sparcv8plus/stunnel-5.20/src' gmake stunnel.exe tstunnel.exe gmake[2]: Entering directory '/home/dam/mgar/pkg/stunnel/trunk/work/solaris10-sparc/build-isa-sparcv8plus/stunnel-5.20/src' i686-w64-mingw32-gcc -c -I/usr/src/openssl-1.0.2d-i686/include -mthreads -fstack-protector -O2 -Wall -Wextra -Wpedantic -Wformat=2 -Wconversion -Wno-long-long -D_FORTIFY_SOURCE=2 -DUNICODE -D_UNICODE -o tls.obj tls.c /bin/bash: i686-w64-mingw32-gcc: command not found Makefile:1206: recipe for target 'tls.obj' failed gmake[2]: *** [tls.obj] Error 127 gmake[2]: Leaving directory '/home/dam/mgar/pkg/stunnel/trunk/work/solaris10-sparc/build-isa-sparcv8plus/stunnel-5.20/src' Makefile:1054: recipe for target 'check-am' failed
I think this comes from these lines in src/Makefile.am:
# Just check if the programs can be built, don't perform any actual tests check_PROGRAMS = stunnel.exe tstunnel.exe
Essentially the „check“ phase could just not be called during build, but it would be cleaner to not bail out on Unix.
Best regards
— Dago
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 12.07.2015 21:24, Dagobert Michelsen wrote:
# Just check if the programs can be built, don't perform any actual tests check_PROGRAMS = stunnel.exe tstunnel.exe
Essentially the „check“ phase could just not be called during build, but it would be cleaner to not bail out on Unix.
I agree that testing whether the windows binaries can be correctly cross-compiled is probably only useful to me. On the other hand this check allows to easily test (with "make distcheck") whether the distributed sources are sufficient for building Windows targets.
Mike
On Mon, Jul 13, 2015 at 09:29:19AM +0200, Michal Trojnara wrote:
On 12.07.2015 21:24, Dagobert Michelsen wrote:
# Just check if the programs can be built, don't perform any actual tests check_PROGRAMS = stunnel.exe tstunnel.exe
Essentially the „check“ phase could just not be called during build, but it would be cleaner to not bail out on Unix.
I agree that testing whether the windows binaries can be correctly cross-compiled is probably only useful to me. On the other hand this check allows to easily test (with "make distcheck") whether the distributed sources are sufficient for building Windows targets.
Maybe wrap them in an AM_CONDITIONAL for an AUTHOR_TESTS or RELEASE_TESTS environment variable or something like this, like the Perl folks do?
G'luck, Peter
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 13.07.2015 10:10, Peter Pentchev wrote:
Maybe wrap them in an AM_CONDITIONAL for an AUTHOR_TESTS or RELEASE_TESTS environment variable or something like this, like the Perl folks do?
I guess these are good ideas. I'd appreciate some documentation and/or sample code pointers.
Mike
On Mon, Jul 13, 2015 at 01:09:09PM +0200, Michal Trojnara wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 13.07.2015 10:10, Peter Pentchev wrote:
Maybe wrap them in an AM_CONDITIONAL for an AUTHOR_TESTS or RELEASE_TESTS environment variable or something like this, like the Perl folks do?
I guess these are good ideas. I'd appreciate some documentation and/or sample code pointers.
Okay, what do you think about the attached patch?
For some documentation, see:
http://www.gnu.org/software/automake/manual/html_node/Usage-of-Conditionals....
...or, for a real-world example, the upvoted answer to:
http://stackoverflow.com/questions/15368848/checking-environment-variable-in...
...or the contrib/minizip source in zlib:
https://github.com/madler/zlib/blob/master/contrib/minizip/configure.ac https://github.com/madler/zlib/blob/master/contrib/minizip/Makefile.am
Of course, it's up to you whether to do it this way or in the somewhat more traditional --with/--enable-something style.
G'luck, Peter
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 13.07.2015 14:53, Peter Pentchev wrote:
Okay, what do you think about the attached patch?
It's quite neat. I'd prefer something that would automagically detect that it's me doing the 'make check' and not other people who just downloaded the tarball. What do you thin about the attached one?
Mike
On Mon, Jul 13, 2015 at 03:16:45PM +0200, Michal Trojnara wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 13.07.2015 14:53, Peter Pentchev wrote:
Okay, what do you think about the attached patch?
It's quite neat. I'd prefer something that would automagically detect that it's me doing the 'make check' and not other people who just downloaded the tarball. What do you thin about the attached one?
[snip]
+AM_CONDITIONAL([AUTHOR_TESTS], [test -d ".git"])
Uhm, this might prove problematic for the maintainers of stunnel packages for various OS's, who might want to keep their own work in a Git repository... like I do :)
G'luck, Peter