[openssl-dev] [openssl.org #4444] [openssl-1.1.0-pre4] Make fails with "recipe for target 'depend' failed" on solaris64-x86_64

2016-05-11 Thread Richard Levitte via RT
Thanks. re-closing.

On Wed May 11 03:34:26 2016, e...@efca.com wrote:
> no idea where this OLD message came from.
> In any case, do ignore, problem has been solved for many weeks.
>
> >-- Original Message --
> >
> >
> >still not working right.
> >Attached a longish log file extract.
> >But root cause seems to be that we try to process test dependencies
> >while doing depend in crypto, way before we had done any work in
> >the test subdir. That causes the find to exit with failed status aborting
> >the depend.
> >
> >
> >>-- Original Message --
> >>
> >>Fixup show in last message has now been merged with master, commit
> >>a6adf099cbd7c3bc5c7051ad3d334636ef5e7f90
> >>
> >>--
> >>Richard Levitte
> >>levi...@openssl.org
> >>
> >>--
> >>Ticket here: http://rt.openssl.org/Ticket/Display.html?id=
> >>Please log in as guest with password guest if prompted
> >>
> >>--
> >>openssl-dev mailing list
> >>To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
> >
> >
> >--
> >Ticket here: http://rt.openssl.org/Ticket/Display.html?id=
> >Please log in as guest with password guest if prompted
> >
> >
> >Attachment: depend.log (34.6 KB)
> >
> >--
> >openssl-dev mailing list
> >To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
>


--
Richard Levitte
levi...@openssl.org

-- 
Ticket here: http://rt.openssl.org/Ticket/Display.html?id=
Please log in as guest with password guest if prompted

-- 
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev


Re: [openssl-dev] [openssl.org #4444] [openssl-1.1.0-pre4] Make fails with "recipe for target 'depend' failed" on solaris64-x86_64

2016-05-10 Thread Erik Forsberg via RT
no idea where this OLD message came from.
In any case, do ignore, problem has been solved for many weeks.

>-- Original Message --
>
>
>still not working right.
>Attached a longish log file extract.
>But root cause seems to be that we try to process test dependencies
>while doing depend in crypto, way before we had done any work in
>the test subdir. That causes the find to exit with failed status aborting
>the depend.
>
>
>>-- Original Message --
>>
>>Fixup show in last message has now been merged with master, commit
>>a6adf099cbd7c3bc5c7051ad3d334636ef5e7f90
>>
>>--
>>Richard Levitte
>>levi...@openssl.org
>>
>>-- 
>>Ticket here: http://rt.openssl.org/Ticket/Display.html?id=
>>Please log in as guest with password guest if prompted
>>
>>-- 
>>openssl-dev mailing list
>>To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
>
>
>-- 
>Ticket here: http://rt.openssl.org/Ticket/Display.html?id=
>Please log in as guest with password guest if prompted
>
>
>Attachment: depend.log (34.6 KB)
>
>-- 
>openssl-dev mailing list
>To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev


-- 
Ticket here: http://rt.openssl.org/Ticket/Display.html?id=
Please log in as guest with password guest if prompted

-- 
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev


Re: [openssl-dev] [openssl.org #4444] [openssl-1.1.0-pre4] Make fails with "recipe for target 'depend' failed" on solaris64-x86_64

2016-05-10 Thread Erik Forsberg
no idea where this OLD message came from.
In any case, do ignore, problem has been solved for many weeks.

>-- Original Message --
>
>
>still not working right.
>Attached a longish log file extract.
>But root cause seems to be that we try to process test dependencies
>while doing depend in crypto, way before we had done any work in
>the test subdir. That causes the find to exit with failed status aborting
>the depend.
>
>
>>-- Original Message --
>>
>>Fixup show in last message has now been merged with master, commit
>>a6adf099cbd7c3bc5c7051ad3d334636ef5e7f90
>>
>>--
>>Richard Levitte
>>levi...@openssl.org
>>
>>-- 
>>Ticket here: http://rt.openssl.org/Ticket/Display.html?id=
>>Please log in as guest with password guest if prompted
>>
>>-- 
>>openssl-dev mailing list
>>To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
>
>
>-- 
>Ticket here: http://rt.openssl.org/Ticket/Display.html?id=
>Please log in as guest with password guest if prompted
>
>
>Attachment: depend.log (34.6 KB)
>
>-- 
>openssl-dev mailing list
>To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev

-- 
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev


Re: [openssl-dev] [openssl.org #4444] [openssl-1.1.0-pre4] Make fails with "recipe for target 'depend' failed" on solaris64-x86_64

2016-05-10 Thread Erik Forsberg via RT
still not working right.
Attached a longish log file extract.
But root cause seems to be that we try to process test dependencies
while doing depend in crypto, way before we had done any work in
the test subdir. That causes the find to exit with failed status aborting
the depend.


>-- Original Message --
>
>Fixup show in last message has now been merged with master, commit
>a6adf099cbd7c3bc5c7051ad3d334636ef5e7f90
>
>--
>Richard Levitte
>levi...@openssl.org
>
>-- 
>Ticket here: http://rt.openssl.org/Ticket/Display.html?id=
>Please log in as guest with password guest if prompted
>
>-- 
>openssl-dev mailing list
>To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev


-- 
Ticket here: http://rt.openssl.org/Ticket/Display.html?id=
Please log in as guest with password guest if prompted



depend.log
Description: Binary data
-- 
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev


[openssl-dev] [openssl.org #4444] [openssl-1.1.0-pre4] Make fails with "recipe for target 'depend' failed" on solaris64-x86_64

2016-03-19 Thread Kiyoshi KANAZAWA via RT
% ./config --prefix=/opt/openssl
Operating system: i86pc-whatever-solaris2
Configuring for solaris64-x86_64-gcc
Configuring OpenSSL version 1.1.0-pre4 (0x0x1014L)
    no-crypto-mdebug [default]  OPENSSL_NO_CRYPTO_MDEBUG (skip dir)
    no-crypto-mdebug-backtrace [forced]   OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE 
(skip dir)
    no-dynamic-engine [forced]  
    no-ec_nistp_64_gcc_128 [default]  OPENSSL_NO_EC_NISTP_64_GCC_128 (skip dir)
    no-egd  [default]  OPENSSL_NO_EGD (skip dir)
    no-heartbeats   [default]  OPENSSL_NO_HEARTBEATS (skip dir)
    no-md2  [default]  OPENSSL_NO_MD2 (skip dir)
    no-rc5  [default]  OPENSSL_NO_RC5 (skip dir)
    no-sctp [default]  OPENSSL_NO_SCTP (skip dir)
    no-shared   [default] 
    no-ssl-trace    [default]  OPENSSL_NO_SSL_TRACE (skip dir)
    no-ssl3 [default]  OPENSSL_NO_SSL3 (skip dir)
    no-ssl3-method  [default]  OPENSSL_NO_SSL3_METHOD (skip dir)
    no-unit-test    [default]  OPENSSL_NO_UNIT_TEST (skip dir)
    no-weak-ssl-ciphers [default]  OPENSSL_NO_WEAK_SSL_CIPHERS (skip dir)
    no-zlib [default] 
    no-zlib-dynamic [default] 
Configuring for solaris64-x86_64-gcc
IsMK1MF   =no
CC    =gcc
CFLAG =-m64 -Wall -DL_ENDIAN -O3 -pthread -DFILIO_H  -Wa,--noexecstack
SHARED_CFLAG  =-fPIC
DEFINES   =DSO_DLFCN HAVE_DLFCN_H OPENSSL_THREADS OPENSSL_NO_DYNAMIC_ENGINE 
OPENSSL_PIC OPENSSL_IA32_SSE2 OPENSSL_BN_ASM_MONT OPENSSL_BN_ASM_MONT5 
OPENSSL_BN_ASM_GF2m SHA1_ASM SHA256_ASM SHA512_ASM MD5_ASM AES_ASM VPAES_ASM 
BSAES_ASM GHASH_ASM ECP_NISTZ256_ASM POLY1305_ASM
LFLAG =
PLIB_LFLAG    =
EX_LIBS   =-lresolv -lsocket -lnsl -ldl 
APPS_OBJ  =
CPUID_OBJ =x86_64cpuid.o
UPLINK_OBJ    =
BN_ASM    =asm/x86_64-gcc.o x86_64-mont.o x86_64-mont5.o x86_64-gf2m.o 
rsaz_exp.o rsaz-x86_64.o rsaz-avx2.o
EC_ASM    =ecp_nistz256.o ecp_nistz256-x86_64.o
DES_ENC   =des_enc.o fcrypt_b.o
AES_ENC   =aes-x86_64.o vpaes-x86_64.o bsaes-x86_64.o aesni-x86_64.o 
aesni-sha1-x86_64.o aesni-sha256-x86_64.o aesni-mb-x86_64.o
BF_ENC    =bf_enc.o
CAST_ENC  =c_enc.o
RC4_ENC   =rc4-x86_64.o rc4-md5-x86_64.o
RC5_ENC   =rc5_enc.o
MD5_OBJ_ASM   =md5-x86_64.o
SHA1_OBJ_ASM  =sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o sha1-mb-x86_64.o 
sha256-mb-x86_64.o
RMD160_OBJ_ASM=
CMLL_ENC  =cmll-x86_64.o cmll_misc.o
MODES_OBJ =ghash-x86_64.o aesni-gcm-x86_64.o
PADLOCK_OBJ   =e_padlock-x86_64.o
CHACHA_ENC    =chacha-x86_64.o
POLY1305_OBJ  =poly1305-x86_64.o
BLAKE2_OBJ    =
PROCESSOR =
RANLIB    =/usr/ccs/bin/ranlib
ARFLAGS   =
PERL  =/opt/perl5/bin/perl

SIXTY_FOUR_BIT_LONG mode

Configured for solaris64-x86_64-gcc.


% make
  :
make[1]: Leaving directory '/tmp/openssl-1.1.0-pre4'
/opt/perl5/bin/perl "-I." -Mconfigdata "util/dofile.pl" \
    "-oMakefile" apps/CA.pl.in > "apps/CA.pl"
chmod a+x apps/CA.pl
/opt/perl5/bin/perl "-I." -Mconfigdata "util/dofile.pl" \
    "-oMakefile" tools/c_rehash.in > "tools/c_rehash"
chmod a+x tools/c_rehash
Makefile:170: recipe for target 'depend' failed
make: *** [depend] Error 1



Other information
OS: Solaris10 x86/64

perl version:v5.22.1
gcc version: 4.8.5
ld: /usr/ccs/bin/ld


Best Regards,


--- Kiyoshi 


-- 
Ticket here: http://rt.openssl.org/Ticket/Display.html?id=
Please log in as guest with password guest if prompted

-- 
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev


[openssl-dev] [openssl.org #4444] [openssl-1.1.0-pre4] Make fails with "recipe for target 'depend' failed" on solaris64-x86_64

2016-03-19 Thread Richard Levitte via RT
Vid Fre, 18 Mar 2016 kl. 19.10.42, skrev rainer.j...@kippdata.de:
> Your suggested fix would mean on platforms without "-nt" we would
> always
> rebuild and that's in fact what I observed (make test rebuilds a lot
> of
> object files) whereas the "find" variant should work on all platforms
> and only adds the dependencies that are newer than the Makefile. If
> you
> want to add all dependencies even if only one is newer than the
> Makefile, a "find" based solution would be:
>
> depend:
> @:
> @if [ "X`find $(DEPS) -newer Makefile`" != "X" ]; then \
> ( sed -e '/^# DO NOT DELETE THIS LINE.*/,$$d' < Makefile; \
> echo '# DO NOT DELETE THIS LINE -- make depend depends
> on
> it.'; \
> echo; \
> for d in $(DEPS); do \
> if [ -f $$d ]; then cat $$d; fi; \
> done ) > Makefile.new; \
> if cmp Makefile.new Makefile >/dev/null 2>&1; then \
> rm -f Makefile.new; \
> else \
> mv -f Makefile.new Makefile; \
> fi; \
> fi
> @:

This, I like. Makes total sense. Thank you.

> One final suggestion: if the final solution will still contain a "for
> d
> in ..." loop, you might want to rename the loop variable from d to
> something else, like e.g. "f". Why? It took me quite some time to
> understand why
>
> sed -e '/^# DO NOT DELETE THIS LINE.*/,$$d' < Makefile;
>
> works although the variable "d" was only defined below that line. Only
> later I noticed, that here the "$$d" has a totally different meaning
> than $$d in the loop (",$$" resolves to ",$" meaning until end of file
> and "d" is the sed delete command). So my confusion was triggered by
> seeing "$$d" in two places close to each other but having totally
> different meaning. If there were no variable "d" IMHO it might become
> a
> bit more understandable.

Yeah, ok, I can see that confusion. Will do.

> BTW: I do like the new build system :)

Thank you :-)

--
Richard Levitte
levi...@openssl.org

-- 
Ticket here: http://rt.openssl.org/Ticket/Display.html?id=
Please log in as guest with password guest if prompted

-- 
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev


[openssl-dev] [openssl.org #4444] [openssl-1.1.0-pre4] Make fails with "recipe for target 'depend' failed" on solaris64-x86_64

2016-03-19 Thread Richard Levitte via RT
Perfect. Thanks for confirming. Closing this ticket now.

Cheers,
Richard

Vid Sat, 19 Mar 2016 kl. 13.39.02, skrev rainer.j...@kippdata.de:
> Works here. No more "-nt" error, no warnings or other STDERR output.
> Tested on Solaris 10 Sparc using GCC doing a 32 bit build and another
> 64
> bit build. Builds succeed, tests pass.
>
> Am 19.03.2016 um 12:34 schrieb Richard Levitte via RT:
> > Fixed in commit 243a98d4a03a411dfe6db727dbf90adbfa2e7474. Can we
> > close this
> > ticket for good now?
> >
> > Vid Sat, 19 Mar 2016 kl. 10.14.25, skrev levitte:
> >> Right. A little 'exit 0' in the right spot should fix that.
> >>
> >> It's true that the dependencies that are generated depend quite a
> >> lot
> >> on what
> >> you've built so far, I hope that's not an enormous bother.
> >>
> >> Cheers,
> >> Richard
> >>
> >> Vid Sat, 19 Mar 2016 kl. 01.31.53, skrev e...@efca.com:
> >>> still not working right.
> >>> Attached a longish log file extract.
> >>> But root cause seems to be that we try to process test dependencies
> >>> while doing depend in crypto, way before we had done any work in
> >>> the test subdir. That causes the find to exit with failed status
> >>> aborting
> >>> the depend.
> >>>
> >>>
>  -- Original Message --
> 
>  Fixup show in last message has now been merged with master, commit
>  a6adf099cbd7c3bc5c7051ad3d334636ef5e7f90
> 
>  --
>  Richard Levitte
>  levi...@openssl.org
> 
>  --
>  Ticket here: http://rt.openssl.org/Ticket/Display.html?id=
>  Please log in as guest with password guest if prompted
> 
>  --
>  openssl-dev mailing list
>  To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-
>  dev
> >>>
> >>
> >>
> >> --
> >> Richard Levitte
> >> levi...@openssl.org
> >
> >
> > --
> > Richard Levitte
> > levi...@openssl.org


--
Richard Levitte
levi...@openssl.org

-- 
Ticket here: http://rt.openssl.org/Ticket/Display.html?id=
Please log in as guest with password guest if prompted

-- 
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev


Re: [openssl-dev] [openssl.org #4444] [openssl-1.1.0-pre4] Make fails with "recipe for target 'depend' failed" on solaris64-x86_64

2016-03-19 Thread Rainer Jung via RT
I had the same problem. /bin/sh on Solaris does not understand the "-nt" 
operator used in the definition of the "depend" target in the top-level 
Makefile, e.g. in line

if [ Makefile -nt Makefile ] ...

and elsewhere.

 From "man test" on Solaris:

...
  file1 -nt file2 True if file1 exists  and  is  newer
  than file2. (Not available in sh.)
...

Also normative standards documents as 
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html 
indicate, that "-nt" can't be expected. Quoting: "Some additional 
primaries newly invented or from the KornShell appeared in an early 
proposal as part of the conditional command ([[]]): s1 > s2, s1 < s2, 
str = pattern, str != pattern, f1 -nt f2, f1 -ot f2, and f1 -ef f2. They 
were not carried forward into the test utility when the conditional 
command was removed from the shell because they have not been included 
in the test utility built into historical implementations of the sh 
utility."

I added a line

SHELL=/bin/ksh

to the Makefile on Solaris, because I was afraid that more non-standard 
shell stuff might be in the Makefile now or in the future. It would be 
better though to replace the non-standard stuff, but I didn't have the 
time to work on a full patch. Using the SHELL=/bin/ksh workaround should 
allow you to proceed building on Solaris. "make" then uses the Korn 
Shell for shell constructs contained in the Makefile.

Regards,

Rainer

Am 18.03.2016 um 08:51 schrieb Kiyoshi KANAZAWA via RT:
> % ./config --prefix=/opt/openssl
> Operating system: i86pc-whatever-solaris2
> Configuring for solaris64-x86_64-gcc
> Configuring OpenSSL version 1.1.0-pre4 (0x0x1014L)
>  no-crypto-mdebug [default]  OPENSSL_NO_CRYPTO_MDEBUG (skip dir)
>  no-crypto-mdebug-backtrace [forced]   OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE 
> (skip dir)
>  no-dynamic-engine [forced]
>  no-ec_nistp_64_gcc_128 [default]  OPENSSL_NO_EC_NISTP_64_GCC_128 (skip 
> dir)
>  no-egd  [default]  OPENSSL_NO_EGD (skip dir)
>  no-heartbeats   [default]  OPENSSL_NO_HEARTBEATS (skip dir)
>  no-md2  [default]  OPENSSL_NO_MD2 (skip dir)
>  no-rc5  [default]  OPENSSL_NO_RC5 (skip dir)
>  no-sctp [default]  OPENSSL_NO_SCTP (skip dir)
>  no-shared   [default]
>  no-ssl-trace[default]  OPENSSL_NO_SSL_TRACE (skip dir)
>  no-ssl3 [default]  OPENSSL_NO_SSL3 (skip dir)
>  no-ssl3-method  [default]  OPENSSL_NO_SSL3_METHOD (skip dir)
>  no-unit-test[default]  OPENSSL_NO_UNIT_TEST (skip dir)
>  no-weak-ssl-ciphers [default]  OPENSSL_NO_WEAK_SSL_CIPHERS (skip dir)
>  no-zlib [default]
>  no-zlib-dynamic [default]
> Configuring for solaris64-x86_64-gcc
> IsMK1MF   =no
> CC=gcc
> CFLAG =-m64 -Wall -DL_ENDIAN -O3 -pthread -DFILIO_H  -Wa,--noexecstack
> SHARED_CFLAG  =-fPIC
> DEFINES   =DSO_DLFCN HAVE_DLFCN_H OPENSSL_THREADS 
> OPENSSL_NO_DYNAMIC_ENGINE OPENSSL_PIC OPENSSL_IA32_SSE2 OPENSSL_BN_ASM_MONT 
> OPENSSL_BN_ASM_MONT5 OPENSSL_BN_ASM_GF2m SHA1_ASM SHA256_ASM SHA512_ASM 
> MD5_ASM AES_ASM VPAES_ASM BSAES_ASM GHASH_ASM ECP_NISTZ256_ASM POLY1305_ASM
> LFLAG =
> PLIB_LFLAG=
> EX_LIBS   =-lresolv -lsocket -lnsl -ldl
> APPS_OBJ  =
> CPUID_OBJ =x86_64cpuid.o
> UPLINK_OBJ=
> BN_ASM=asm/x86_64-gcc.o x86_64-mont.o x86_64-mont5.o x86_64-gf2m.o 
> rsaz_exp.o rsaz-x86_64.o rsaz-avx2.o
> EC_ASM=ecp_nistz256.o ecp_nistz256-x86_64.o
> DES_ENC   =des_enc.o fcrypt_b.o
> AES_ENC   =aes-x86_64.o vpaes-x86_64.o bsaes-x86_64.o aesni-x86_64.o 
> aesni-sha1-x86_64.o aesni-sha256-x86_64.o aesni-mb-x86_64.o
> BF_ENC=bf_enc.o
> CAST_ENC  =c_enc.o
> RC4_ENC   =rc4-x86_64.o rc4-md5-x86_64.o
> RC5_ENC   =rc5_enc.o
> MD5_OBJ_ASM   =md5-x86_64.o
> SHA1_OBJ_ASM  =sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o sha1-mb-x86_64.o 
> sha256-mb-x86_64.o
> RMD160_OBJ_ASM=
> CMLL_ENC  =cmll-x86_64.o cmll_misc.o
> MODES_OBJ =ghash-x86_64.o aesni-gcm-x86_64.o
> PADLOCK_OBJ   =e_padlock-x86_64.o
> CHACHA_ENC=chacha-x86_64.o
> POLY1305_OBJ  =poly1305-x86_64.o
> BLAKE2_OBJ=
> PROCESSOR =
> RANLIB=/usr/ccs/bin/ranlib
> ARFLAGS   =
> PERL  =/opt/perl5/bin/perl
>
> SIXTY_FOUR_BIT_LONG mode
>
> Configured for solaris64-x86_64-gcc.
>
>
> % make
>:
> make[1]: Leaving directory '/tmp/openssl-1.1.0-pre4'
> /opt/perl5/bin/perl "-I." -Mconfigdata "util/dofile.pl" \
>  "-oMakefile" apps/CA.pl.in > "apps/CA.pl"
> chmod a+x apps/CA.pl
> /opt/perl5/bin/perl "-I." -Mconfigdata "util/dofile.pl" \
>  "-oMakefile" tools/c_rehash.in > "tools/c_rehash"
> chmod a+x tools/c_rehash
> Makefile:170: recipe for target 'depend' failed
> make: *** [depend] Error 1
>
>
>
> Other information
> OS: Solaris10 x86/64
>
> perl version:v5.22.1
> gcc version: 4.8.5
> ld: /usr/ccs/bin/ld
>
>
> Best Regards,
>
>
> --- Kiyoshi 


-- 
Ticket 

Re: [openssl-dev] [openssl.org #4444] [openssl-1.1.0-pre4] Make fails with "recipe for target 'depend' failed" on solaris64-x86_64

2016-03-19 Thread Rainer Jung
I had the same problem. /bin/sh on Solaris does not understand the "-nt" 
operator used in the definition of the "depend" target in the top-level 
Makefile, e.g. in line


if [ Makefile -nt Makefile ] ...

and elsewhere.

From "man test" on Solaris:

...
 file1 -nt file2 True if file1 exists  and  is  newer
 than file2. (Not available in sh.)
...

Also normative standards documents as 
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html 
indicate, that "-nt" can't be expected. Quoting: "Some additional 
primaries newly invented or from the KornShell appeared in an early 
proposal as part of the conditional command ([[]]): s1 > s2, s1 < s2, 
str = pattern, str != pattern, f1 -nt f2, f1 -ot f2, and f1 -ef f2. They 
were not carried forward into the test utility when the conditional 
command was removed from the shell because they have not been included 
in the test utility built into historical implementations of the sh 
utility."


I added a line

SHELL=/bin/ksh

to the Makefile on Solaris, because I was afraid that more non-standard 
shell stuff might be in the Makefile now or in the future. It would be 
better though to replace the non-standard stuff, but I didn't have the 
time to work on a full patch. Using the SHELL=/bin/ksh workaround should 
allow you to proceed building on Solaris. "make" then uses the Korn 
Shell for shell constructs contained in the Makefile.


Regards,

Rainer

Am 18.03.2016 um 08:51 schrieb Kiyoshi KANAZAWA via RT:

% ./config --prefix=/opt/openssl
Operating system: i86pc-whatever-solaris2
Configuring for solaris64-x86_64-gcc
Configuring OpenSSL version 1.1.0-pre4 (0x0x1014L)
 no-crypto-mdebug [default]  OPENSSL_NO_CRYPTO_MDEBUG (skip dir)
 no-crypto-mdebug-backtrace [forced]   OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE 
(skip dir)
 no-dynamic-engine [forced]
 no-ec_nistp_64_gcc_128 [default]  OPENSSL_NO_EC_NISTP_64_GCC_128 (skip dir)
 no-egd  [default]  OPENSSL_NO_EGD (skip dir)
 no-heartbeats   [default]  OPENSSL_NO_HEARTBEATS (skip dir)
 no-md2  [default]  OPENSSL_NO_MD2 (skip dir)
 no-rc5  [default]  OPENSSL_NO_RC5 (skip dir)
 no-sctp [default]  OPENSSL_NO_SCTP (skip dir)
 no-shared   [default]
 no-ssl-trace[default]  OPENSSL_NO_SSL_TRACE (skip dir)
 no-ssl3 [default]  OPENSSL_NO_SSL3 (skip dir)
 no-ssl3-method  [default]  OPENSSL_NO_SSL3_METHOD (skip dir)
 no-unit-test[default]  OPENSSL_NO_UNIT_TEST (skip dir)
 no-weak-ssl-ciphers [default]  OPENSSL_NO_WEAK_SSL_CIPHERS (skip dir)
 no-zlib [default]
 no-zlib-dynamic [default]
Configuring for solaris64-x86_64-gcc
IsMK1MF   =no
CC=gcc
CFLAG =-m64 -Wall -DL_ENDIAN -O3 -pthread -DFILIO_H  -Wa,--noexecstack
SHARED_CFLAG  =-fPIC
DEFINES   =DSO_DLFCN HAVE_DLFCN_H OPENSSL_THREADS OPENSSL_NO_DYNAMIC_ENGINE 
OPENSSL_PIC OPENSSL_IA32_SSE2 OPENSSL_BN_ASM_MONT OPENSSL_BN_ASM_MONT5 
OPENSSL_BN_ASM_GF2m SHA1_ASM SHA256_ASM SHA512_ASM MD5_ASM AES_ASM VPAES_ASM 
BSAES_ASM GHASH_ASM ECP_NISTZ256_ASM POLY1305_ASM
LFLAG =
PLIB_LFLAG=
EX_LIBS   =-lresolv -lsocket -lnsl -ldl
APPS_OBJ  =
CPUID_OBJ =x86_64cpuid.o
UPLINK_OBJ=
BN_ASM=asm/x86_64-gcc.o x86_64-mont.o x86_64-mont5.o x86_64-gf2m.o 
rsaz_exp.o rsaz-x86_64.o rsaz-avx2.o
EC_ASM=ecp_nistz256.o ecp_nistz256-x86_64.o
DES_ENC   =des_enc.o fcrypt_b.o
AES_ENC   =aes-x86_64.o vpaes-x86_64.o bsaes-x86_64.o aesni-x86_64.o 
aesni-sha1-x86_64.o aesni-sha256-x86_64.o aesni-mb-x86_64.o
BF_ENC=bf_enc.o
CAST_ENC  =c_enc.o
RC4_ENC   =rc4-x86_64.o rc4-md5-x86_64.o
RC5_ENC   =rc5_enc.o
MD5_OBJ_ASM   =md5-x86_64.o
SHA1_OBJ_ASM  =sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o sha1-mb-x86_64.o 
sha256-mb-x86_64.o
RMD160_OBJ_ASM=
CMLL_ENC  =cmll-x86_64.o cmll_misc.o
MODES_OBJ =ghash-x86_64.o aesni-gcm-x86_64.o
PADLOCK_OBJ   =e_padlock-x86_64.o
CHACHA_ENC=chacha-x86_64.o
POLY1305_OBJ  =poly1305-x86_64.o
BLAKE2_OBJ=
PROCESSOR =
RANLIB=/usr/ccs/bin/ranlib
ARFLAGS   =
PERL  =/opt/perl5/bin/perl

SIXTY_FOUR_BIT_LONG mode

Configured for solaris64-x86_64-gcc.


% make
   :
make[1]: Leaving directory '/tmp/openssl-1.1.0-pre4'
/opt/perl5/bin/perl "-I." -Mconfigdata "util/dofile.pl" \
 "-oMakefile" apps/CA.pl.in > "apps/CA.pl"
chmod a+x apps/CA.pl
/opt/perl5/bin/perl "-I." -Mconfigdata "util/dofile.pl" \
 "-oMakefile" tools/c_rehash.in > "tools/c_rehash"
chmod a+x tools/c_rehash
Makefile:170: recipe for target 'depend' failed
make: *** [depend] Error 1



Other information
OS: Solaris10 x86/64

perl version:v5.22.1
gcc version: 4.8.5
ld: /usr/ccs/bin/ld


Best Regards,


--- Kiyoshi 

--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev


Re: [openssl-dev] [openssl.org #4444] [openssl-1.1.0-pre4] Make fails with "recipe for target 'depend' failed" on solaris64-x86_64

2016-03-19 Thread Rainer Jung via RT
Works here. No more "-nt" error, no warnings or other STDERR output.
Tested on Solaris 10 Sparc using GCC doing a 32 bit build and another 64 
bit build. Builds succeed, tests pass.

Am 19.03.2016 um 12:34 schrieb Richard Levitte via RT:
> Fixed in commit 243a98d4a03a411dfe6db727dbf90adbfa2e7474. Can we close this
> ticket for good now?
>
> Vid Sat, 19 Mar 2016 kl. 10.14.25, skrev levitte:
>> Right. A little 'exit 0' in the right spot should fix that.
>>
>> It's true that the dependencies that are generated depend quite a lot
>> on what
>> you've built so far, I hope that's not an enormous bother.
>>
>> Cheers,
>> Richard
>>
>> Vid Sat, 19 Mar 2016 kl. 01.31.53, skrev e...@efca.com:
>>> still not working right.
>>> Attached a longish log file extract.
>>> But root cause seems to be that we try to process test dependencies
>>> while doing depend in crypto, way before we had done any work in
>>> the test subdir. That causes the find to exit with failed status
>>> aborting
>>> the depend.
>>>
>>>
 -- Original Message --

 Fixup show in last message has now been merged with master, commit
 a6adf099cbd7c3bc5c7051ad3d334636ef5e7f90

 --
 Richard Levitte
 levi...@openssl.org

 --
 Ticket here: http://rt.openssl.org/Ticket/Display.html?id=
 Please log in as guest with password guest if prompted

 --
 openssl-dev mailing list
 To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-
 dev
>>>
>>
>>
>> --
>> Richard Levitte
>> levi...@openssl.org
>
>
> --
> Richard Levitte
> levi...@openssl.org


-- 
Ticket here: http://rt.openssl.org/Ticket/Display.html?id=
Please log in as guest with password guest if prompted

-- 
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev


Re: [openssl-dev] [openssl.org #4444] [openssl-1.1.0-pre4] Make fails with "recipe for target 'depend' failed" on solaris64-x86_64

2016-03-19 Thread Rainer Jung via RT
Am 18.03.2016 um 19:33 schrieb Richard Levitte via RT:
> Vid Fre, 18 Mar 2016 kl. 18.07.31, skrev rainer.j...@kippdata.de:
>> Am 18.03.2016 um 17:49 schrieb Richard Levitte via RT:
>>> Vid Fre, 18 Mar 2016 kl. 16.34.05, skrev rainer.j...@kippdata.de:
 I had the same problem. /bin/sh on Solaris does not understand the
 "-
 nt"
 operator used in the definition of the "depend" target in the top-
 level
 Makefile, e.g. in line

 if [ Makefile -nt Makefile ] ...
>>>
>>> That can't be the cause, because whatever the exit code from the test
>>> is, it's
>>> "swallowed" by 'if'. A little like this is:
>>
>> If it were syntactically correct, but it isn't.
>
> You'll have to explain that to me. I just had a look here:
> https://docs.oracle.com/cd/E26502_01/html/E29030/sh-1.html:
>
>
 if list ; then list elif list ; then list ; ] . . . [ else list ; ] fi
>
 The list following if is executed and, if it returns a zero exit status,
> the list following the first then is executed. Otherwise, the list following
> elif is executed and, if its value is zero, the list following the next then 
> is
> executed. Failing that, the else list is executed. If no else list or then 
> list
> is executed, then the if command returns a zero exit status.
>
>> I added the "set -ex" and:
>>
>> % make depend
>> catdepends=false
>> + [ Makefile -nt Makefile ]
>> Makefile:172: recipe for target 'depend' failed
>> make: *** [depend] Error 1
>
> Would the following make a difference?
>
> if ( [ Makefile -nt Makefile ] 2>/dev/null || [ $$? = 1 ] ); then

Yes, that works. Works means: it correctly detects, that Solaris doesn't 
support "-nt" and adds all dependencies to the end of the Makefile.

> or perhaps using 'test' instead of '[' (and removing the ']' in that case, of
> course)?

Also works.

>> or - since there's no more real need for the catdepends variable
>
> That's an incorrect assumption. 'depend' is run as part of the larger targets,
> and on some slower systems, having the same file copying happening every time
> is quite time consuming. Checking if there's a need for all the data copying 
> at
> all first takes down the time for the cases when the .d files haven't been
> updated since last time.

I think the variant I suggested still does that, at least in my tests. 
If there's no newer dependency, then it will not add anything to the 
Makefile, since the result of the "find" command is empty.

depend:
 @:
 @( sed -e '/^# DO NOT DELETE THIS LINE.*/,$$d' < Makefile; \
   echo '# DO NOT DELETE THIS LINE -- make depend depends on it.'; \
   echo; \
   for d in `find $(DEPS) -newer Makefile`; do \
 if [ -f $$d ]; then cat $$d; fi; \
   done ) > Makefile.new; \
 if cmp Makefile.new Makefile >/dev/null 2>&1; then \
   rm -f Makefile.new; \
 else \
  mv -f Makefile.new Makefile; \
 fi
 @:

With "no need for catdepends" I only wanted to say there's no need any 
more for first checking, then remembering the check result in the 
variable and then executing on the check result. Instead one can move 
the dependency change detection directly into the latter part as shown 
in my previous mail. It has also the benefit of only adding the 
dependency snippets that are newer than the Makefile, not all of them. 
Is that a logically correct aim, or do we need to add all dependencies 
even if only some of the files are newer than Makefile?

Your suggested fix would mean on platforms without "-nt" we would always 
rebuild and that's in fact what I observed (make test rebuilds a lot of 
object files) whereas the "find" variant should work on all platforms 
and only adds the dependencies that are newer than the Makefile. If you 
want to add all dependencies even if only one is newer than the 
Makefile, a "find" based solution would be:

depend:
 @:
 @if [ "X`find $(DEPS) -newer Makefile`" != "X" ]; then \
   ( sed -e '/^# DO NOT DELETE THIS LINE.*/,$$d' < Makefile; \
 echo '# DO NOT DELETE THIS LINE -- make depend depends on 
it.'; \
 echo; \
 for d in $(DEPS); do \
   if [ -f $$d ]; then cat $$d; fi; \
 done ) > Makefile.new; \
   if cmp Makefile.new Makefile >/dev/null 2>&1; then \
 rm -f Makefile.new; \
   else \
 mv -f Makefile.new Makefile; \
   fi; \
 fi
 @:

One final suggestion: if the final solution will still contain a "for d 
in ..." loop, you might want to rename the loop variable from d to 
something else, like e.g. "f". Why? It took me quite some time to 
understand why

sed -e '/^# DO NOT DELETE THIS LINE.*/,$$d' < Makefile;

works although the variable "d" was only defined below that line. Only 
later I noticed, that here the "$$d" has a totally different meaning 
than $$d in the loop (",$$" resolves to ",$" meaning until end of file 
and "d" is 

[openssl-dev] [openssl.org #4444] [openssl-1.1.0-pre4] Make fails with "recipe for target 'depend' failed" on solaris64-x86_64

2016-03-19 Thread Richard Levitte via RT
Fixed in commit 243a98d4a03a411dfe6db727dbf90adbfa2e7474. Can we close this
ticket for good now?

Vid Sat, 19 Mar 2016 kl. 10.14.25, skrev levitte:
> Right. A little 'exit 0' in the right spot should fix that.
>
> It's true that the dependencies that are generated depend quite a lot
> on what
> you've built so far, I hope that's not an enormous bother.
>
> Cheers,
> Richard
>
> Vid Sat, 19 Mar 2016 kl. 01.31.53, skrev e...@efca.com:
> > still not working right.
> > Attached a longish log file extract.
> > But root cause seems to be that we try to process test dependencies
> > while doing depend in crypto, way before we had done any work in
> > the test subdir. That causes the find to exit with failed status
> > aborting
> > the depend.
> >
> >
> > > -- Original Message --
> > >
> > > Fixup show in last message has now been merged with master, commit
> > > a6adf099cbd7c3bc5c7051ad3d334636ef5e7f90
> > >
> > > --
> > > Richard Levitte
> > > levi...@openssl.org
> > >
> > > --
> > > Ticket here: http://rt.openssl.org/Ticket/Display.html?id=
> > > Please log in as guest with password guest if prompted
> > >
> > > --
> > > openssl-dev mailing list
> > > To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-
> > > dev
> >
>
>
> --
> Richard Levitte
> levi...@openssl.org


--
Richard Levitte
levi...@openssl.org

-- 
Ticket here: http://rt.openssl.org/Ticket/Display.html?id=
Please log in as guest with password guest if prompted

-- 
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev


[openssl-dev] [openssl.org #4444] [openssl-1.1.0-pre4] Make fails with "recipe for target 'depend' failed" on solaris64-x86_64

2016-03-19 Thread Richard Levitte via RT
Right. A little 'exit 0' in the right spot should fix that.

It's true that the dependencies that are generated depend quite a lot on what
you've built so far, I hope that's not an enormous bother.

Cheers,
Richard

Vid Sat, 19 Mar 2016 kl. 01.31.53, skrev e...@efca.com:
> still not working right.
> Attached a longish log file extract.
> But root cause seems to be that we try to process test dependencies
> while doing depend in crypto, way before we had done any work in
> the test subdir. That causes the find to exit with failed status aborting
> the depend.
>
>
> >-- Original Message --
> >
> >Fixup show in last message has now been merged with master, commit
> >a6adf099cbd7c3bc5c7051ad3d334636ef5e7f90
> >
> >--
> >Richard Levitte
> >levi...@openssl.org
> >
> >--
> >Ticket here: http://rt.openssl.org/Ticket/Display.html?id=
> >Please log in as guest with password guest if prompted
> >
> >--
> >openssl-dev mailing list
> >To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
>


--
Richard Levitte
levi...@openssl.org

-- 
Ticket here: http://rt.openssl.org/Ticket/Display.html?id=
Please log in as guest with password guest if prompted

-- 
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev


Re: [openssl-dev] [openssl.org #4444] [openssl-1.1.0-pre4] Make fails with "recipe for target 'depend' failed" on solaris64-x86_64

2016-03-19 Thread Rainer Jung via RT
Am 18.03.2016 um 17:49 schrieb Richard Levitte via RT:
> Vid Fre, 18 Mar 2016 kl. 16.34.05, skrev rainer.j...@kippdata.de:
>> I had the same problem. /bin/sh on Solaris does not understand the "-
>> nt"
>> operator used in the definition of the "depend" target in the top-
>> level
>> Makefile, e.g. in line
>>
>> if [ Makefile -nt Makefile ] ...
>
> That can't be the cause, because whatever the exit code from the test is, it's
> "swallowed" by 'if'. A little like this is:

If it were syntactically correct, but it isn't. I added the "set -ex" and:

% make depend
catdepends=false
+ [ Makefile -nt Makefile ]
Makefile:172: recipe for target 'depend' failed
make: *** [depend] Error 1

Line numbers are:

 167 # To check if test has the file age comparison operator, we
 168 # simply try, and rely test to exit with 0 if the comparison
 169 # was true, 1 if false, and most importantly, 2 if it doesn't
 170 # recognise the operator.
 171 depend:
 172 @:
 173 @set -ex; catdepends=false; \
 174 if [ Makefile -nt Makefile ] 2>/dev/null || [ $$? = 1 
]; then \
...

> $ if (exit 1); then :; fi; echo $? 0 I cannot tell you what's going wrong, and
> the only suggestion I currently have is to apply the attached patch and then
> reconfigure and make and see what the output is. Can I assume you know what
> 'set -ex' does?

You can and "man sh" would tell me otherwise ;)

I tried a couple of other approaches. One could simulate the "-nt" using 
perl and stat() but my current favorite is using "find" with "-newer":

 171 depend:
 172 @:
 173 @catdepends=false; \
 174 if [ "X`find $(DEPS) -newer Makefile`" != "X" ]; then \
 175   catdepends=true; \
 176 fi; \
 177 if [ $$catdepends = true ]; then \
... rest unchanged

or - since there's no more real need for the catdepends variable shorter 
and more direct:

 171 depend:
 172 @:
 173 @( sed -e '/^# DO NOT DELETE THIS LINE.*/,$$d' < 
Makefile; \
 174   echo '# DO NOT DELETE THIS LINE -- make depend 
depends on it.'; \
 175   echo; \
 176   for d in `find $(DEPS) -newer Makefile`; do \
 177 if [ -f $$d ]; then cat $$d; fi; \
 178   done ) > Makefile.new; \
 179 if cmp Makefile.new Makefile >/dev/null 2>&1; then \
 180   rm -f Makefile.new; \
 181 else \
 182  mv -f Makefile.new Makefile; \
 183 fi
 184 @:

I don't know which length restrictions for $(DEPS) as find arguments we 
have, but at least for current OpenSSL 1.1.0 pre 4 on Solaris - which is 
typically more limited than Linux - it works. One could also iterate 
over "find" using one DEPS file for each iteration, but that would be 
much slower due to the overhead of forking "find" lots of times (on my 
slow system the above takes less than one second, but 6 seconds after 
switching to a loop over $(DEPS) with find inside the loop.

Regards,

Rainer


-- 
Ticket here: http://rt.openssl.org/Ticket/Display.html?id=
Please log in as guest with password guest if prompted

-- 
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev


[openssl-dev] [openssl.org #4444] [openssl-1.1.0-pre4] Make fails with "recipe for target 'depend' failed" on solaris64-x86_64

2016-03-19 Thread Richard Levitte via RT
Perhaps with said attachment this time...

Vid Fre, 18 Mar 2016 kl. 16.49.13, skrev levitte:
> Vid Fre, 18 Mar 2016 kl. 16.34.05, skrev rainer.j...@kippdata.de:
> > I had the same problem. /bin/sh on Solaris does not understand the "-
> > nt"
> > operator used in the definition of the "depend" target in the top-
> > level
> > Makefile, e.g. in line
> >
> > if [ Makefile -nt Makefile ] ...
>
> That can't be the cause, because whatever the exit code from the test
> is, it's
> "swallowed" by 'if'. A little like this is:
>
> $ if (exit 1); then :; fi; echo $? 0 I cannot tell you what's going
> wrong, and
> the only suggestion I currently have is to apply the attached patch
> and then
> reconfigure and make and see what the output is. Can I assume you know
> what
> 'set -ex' does?
>
> Cheers,
> Richard
>
> --
> Richard Levitte
> levi...@openssl.org


--
Richard Levitte
levi...@openssl.org

-- 
Ticket here: http://rt.openssl.org/Ticket/Display.html?id=
Please log in as guest with password guest if prompted

diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl
index 3a1ade7..d13ab5e 100644
--- a/Configurations/unix-Makefile.tmpl
+++ b/Configurations/unix-Makefile.tmpl
@@ -266,7 +266,7 @@ clean: libclean
 # recognise the operator.
 depend:
 	@: {- output_off() if $disabled{makedepend}; "" -}
-	@catdepends=false; \
+	@set -ex; catdepends=false; \
 	if [ Makefile -nt Makefile ] 2>/dev/null || [ $$? = 1 ]; then \
 	  for d in $(DEPS); do \
 	if [ $$d -nt Makefile ]; then \
-- 
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev


[openssl-dev] [openssl.org #4444] [openssl-1.1.0-pre4] Make fails with "recipe for target 'depend' failed" on solaris64-x86_64

2016-03-19 Thread Richard Levitte via RT
Patch for anyone interested in trying.

--
Richard Levitte
levi...@openssl.org

-- 
Ticket here: http://rt.openssl.org/Ticket/Display.html?id=
Please log in as guest with password guest if prompted

diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl
index 3a1ade7..be6299b 100644
--- a/Configurations/unix-Makefile.tmpl
+++ b/Configurations/unix-Makefile.tmpl
@@ -257,32 +257,15 @@ clean: libclean
 # This exists solely for those who still type 'make depend'
 #
 # We check if any depfile is newer than Makefile and decide to
-# concatenate only if that is true, or if 'test' (a.k.a [ )
-# doesn't have the option to figure it out (-nt).
-#
-# To check if test has the file age comparison operator, we
-# simply try, and rely test to exit with 0 if the comparison
-# was true, 1 if false, and most importantly, 2 if it doesn't
-# recognise the operator.
+# concatenate only if that is true.
 depend:
 	@: {- output_off() if $disabled{makedepend}; "" -}
-	@catdepends=false; \
-	if [ Makefile -nt Makefile ] 2>/dev/null || [ $$? = 1 ]; then \
-	  for d in $(DEPS); do \
-	if [ $$d -nt Makefile ]; then \
-	  catdepends=true; \
-	  break; \
-	fi; \
-	  done; \
-	else \
-	  catdepends=true; \
-	fi; \
-	if [ $$catdepends = true ]; then \
+	@if [ -z "`find $(DEPS) -newer Makefile`" ]; then \
 	  ( sed -e '/^# DO NOT DELETE THIS LINE.*/,$$d' < Makefile; \
 	echo '# DO NOT DELETE THIS LINE -- make depend depends on it.'; \
 	echo; \
-	for d in $(DEPS); do \
-	  if [ -f $$d ]; then cat $$d; fi; \
+	for f in $(DEPS); do \
+	  if [ -f $$f ]; then cat $$f; fi; \
 	done ) > Makefile.new; \
 	  if cmp Makefile.new Makefile >/dev/null 2>&1; then \
 	rm -f Makefile.new; \
-- 
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev


[openssl-dev] [openssl.org #4444] [openssl-1.1.0-pre4] Make fails with "recipe for target 'depend' failed" on solaris64-x86_64

2016-03-19 Thread Richard Levitte via RT
Fixup show in last message has now been merged with master, commit
a6adf099cbd7c3bc5c7051ad3d334636ef5e7f90

--
Richard Levitte
levi...@openssl.org

-- 
Ticket here: http://rt.openssl.org/Ticket/Display.html?id=
Please log in as guest with password guest if prompted

-- 
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev


[openssl-dev] [openssl.org #4444] [openssl-1.1.0-pre4] Make fails with "recipe for target 'depend' failed" on solaris64-x86_64

2016-03-19 Thread Richard Levitte via RT
Vid Fre, 18 Mar 2016 kl. 16.34.05, skrev rainer.j...@kippdata.de:
> I had the same problem. /bin/sh on Solaris does not understand the "-
> nt"
> operator used in the definition of the "depend" target in the top-
> level
> Makefile, e.g. in line
>
> if [ Makefile -nt Makefile ] ...

That can't be the cause, because whatever the exit code from the test is, it's
"swallowed" by 'if'. A little like this is:

$ if (exit 1); then :; fi; echo $? 0 I cannot tell you what's going wrong, and
the only suggestion I currently have is to apply the attached patch and then
reconfigure and make and see what the output is. Can I assume you know what
'set -ex' does?

Cheers,
Richard

--
Richard Levitte
levi...@openssl.org

-- 
Ticket here: http://rt.openssl.org/Ticket/Display.html?id=
Please log in as guest with password guest if prompted

-- 
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev


Re: [openssl-dev] [openssl.org #4444] [openssl-1.1.0-pre4] Make fails with "recipe for target 'depend' failed" on solaris64-x86_64

2016-03-18 Thread Rainer Jung

Am 18.03.2016 um 17:49 schrieb Richard Levitte via RT:

Vid Fre, 18 Mar 2016 kl. 16.34.05, skrev rainer.j...@kippdata.de:

I had the same problem. /bin/sh on Solaris does not understand the "-
nt"
operator used in the definition of the "depend" target in the top-
level
Makefile, e.g. in line

if [ Makefile -nt Makefile ] ...


That can't be the cause, because whatever the exit code from the test is, it's
"swallowed" by 'if'. A little like this is:


If it were syntactically correct, but it isn't. I added the "set -ex" and:

% make depend
catdepends=false
+ [ Makefile -nt Makefile ]
Makefile:172: recipe for target 'depend' failed
make: *** [depend] Error 1

Line numbers are:

167 # To check if test has the file age comparison operator, we
168 # simply try, and rely test to exit with 0 if the comparison
169 # was true, 1 if false, and most importantly, 2 if it doesn't
170 # recognise the operator.
171 depend:
172 @:
173 @set -ex; catdepends=false; \
174 if [ Makefile -nt Makefile ] 2>/dev/null || [ $$? = 1 
]; then \

...


$ if (exit 1); then :; fi; echo $? 0 I cannot tell you what's going wrong, and
the only suggestion I currently have is to apply the attached patch and then
reconfigure and make and see what the output is. Can I assume you know what
'set -ex' does?


You can and "man sh" would tell me otherwise ;)

I tried a couple of other approaches. One could simulate the "-nt" using 
perl and stat() but my current favorite is using "find" with "-newer":


171 depend:
172 @:
173 @catdepends=false; \
174 if [ "X`find $(DEPS) -newer Makefile`" != "X" ]; then \
175   catdepends=true; \
176 fi; \
177 if [ $$catdepends = true ]; then \
... rest unchanged

or - since there's no more real need for the catdepends variable shorter 
and more direct:


171 depend:
172 @:
173 @( sed -e '/^# DO NOT DELETE THIS LINE.*/,$$d' < 
Makefile; \
174   echo '# DO NOT DELETE THIS LINE -- make depend 
depends on it.'; \

175   echo; \
176   for d in `find $(DEPS) -newer Makefile`; do \
177 if [ -f $$d ]; then cat $$d; fi; \
178   done ) > Makefile.new; \
179 if cmp Makefile.new Makefile >/dev/null 2>&1; then \
180   rm -f Makefile.new; \
181 else \
182  mv -f Makefile.new Makefile; \
183 fi
184 @:

I don't know which length restrictions for $(DEPS) as find arguments we 
have, but at least for current OpenSSL 1.1.0 pre 4 on Solaris - which is 
typically more limited than Linux - it works. One could also iterate 
over "find" using one DEPS file for each iteration, but that would be 
much slower due to the overhead of forking "find" lots of times (on my 
slow system the above takes less than one second, but 6 seconds after 
switching to a loop over $(DEPS) with find inside the loop.


Regards,

Rainer

--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev


[openssl-dev] [openssl.org #4444] [openssl-1.1.0-pre4] Make fails with "recipe for target 'depend' failed" on solaris64-x86_64

2016-03-18 Thread Richard Levitte via RT
Vid Fre, 18 Mar 2016 kl. 18.07.31, skrev rainer.j...@kippdata.de:
> Am 18.03.2016 um 17:49 schrieb Richard Levitte via RT:
> > Vid Fre, 18 Mar 2016 kl. 16.34.05, skrev rainer.j...@kippdata.de:
> >> I had the same problem. /bin/sh on Solaris does not understand the
> >> "-
> >> nt"
> >> operator used in the definition of the "depend" target in the top-
> >> level
> >> Makefile, e.g. in line
> >>
> >> if [ Makefile -nt Makefile ] ...
> >
> > That can't be the cause, because whatever the exit code from the test
> > is, it's
> > "swallowed" by 'if'. A little like this is:
>
> If it were syntactically correct, but it isn't.

You'll have to explain that to me. I just had a look here:
https://docs.oracle.com/cd/E26502_01/html/E29030/sh-1.html:


>>> if list ; then list elif list ; then list ; ] . . . [ else list ; ] fi

>>> The list following if is executed and, if it returns a zero exit status,
the list following the first then is executed. Otherwise, the list following
elif is executed and, if its value is zero, the list following the next then is
executed. Failing that, the else list is executed. If no else list or then list
is executed, then the if command returns a zero exit status.

> I added the "set -ex" and:
>
> % make depend
> catdepends=false
> + [ Makefile -nt Makefile ]
> Makefile:172: recipe for target 'depend' failed
> make: *** [depend] Error 1

Would the following make a difference?

if ( [ Makefile -nt Makefile ] 2>/dev/null || [ $$? = 1 ] ); then

or perhaps using 'test' instead of '[' (and removing the ']' in that case, of
course)?

> or - since there's no more real need for the catdepends variable

That's an incorrect assumption. 'depend' is run as part of the larger targets,
and on some slower systems, having the same file copying happening every time
is quite time consuming. Checking if there's a need for all the data copying at
all first takes down the time for the cases when the .d files haven't been
updated since last time.

Cheers,
Richard

--
Richard Levitte
levi...@openssl.org

-- 
Ticket here: http://rt.openssl.org/Ticket/Display.html?id=
Please log in as guest with password guest if prompted

-- 
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev


Re: [openssl-dev] [openssl.org #4444] [openssl-1.1.0-pre4] Make fails with "recipe for target 'depend' failed" on solaris64-x86_64

2016-03-18 Thread Erik Forsberg via RT
It is the -nt that breaks Solaris 10

(dev0) 22$ make test
catdepends=false
+ [ Makefile -nt Makefile ] 
*** Error code 1

it stops executing on that line.

I like the suggestion of using /bin/ksh on Solaris 10, that is
generally needed also for many GNU autoconfig scripts, so why not OpenSSL too ?
It would be nice if that could be specified in the 10-main.conf snippets ?

>-- Original Message --
>
>
>Perhaps with said attachment this time...
>
>Vid Fre, 18 Mar 2016 kl. 16.49.13, skrev levitte:
>> Vid Fre, 18 Mar 2016 kl. 16.34.05, skrev rainer.j...@kippdata.de:
>> > I had the same problem. /bin/sh on Solaris does not understand the "-
>> > nt"
>> > operator used in the definition of the "depend" target in the top-
>> > level
>> > Makefile, e.g. in line
>> >
>> > if [ Makefile -nt Makefile ] ...
>>
>> That can't be the cause, because whatever the exit code from the test
>> is, it's
>> "swallowed" by 'if'. A little like this is:
>>
>> $ if (exit 1); then :; fi; echo $? 0 I cannot tell you what's going
>> wrong, and
>> the only suggestion I currently have is to apply the attached patch
>> and then
>> reconfigure and make and see what the output is. Can I assume you know
>> what
>> 'set -ex' does?
>>
>> Cheers,
>> Richard
>>
>> --
>> Richard Levitte
>> levi...@openssl.org
>
>
>--
>Richard Levitte
>levi...@openssl.org
>
>-- 
>Ticket here: http://rt.openssl.org/Ticket/Display.html?id=
>Please log in as guest with password guest if prompted
>
>
>diff --git a/Configurations/unix-Makefile.tmpl 
>b/Configurations/unix-Makefile.tmpl
>index 3a1ade7..d13ab5e 100644
>--- a/Configurations/unix-Makefile.tmpl
>+++ b/Configurations/unix-Makefile.tmpl
>@@ -266,7 +266,7 @@ clean: libclean
> # recognise the operator.
> depend:
>   @: {- output_off() if $disabled{makedepend}; "" -}
>-  @catdepends=false; \
>+  @set -ex; catdepends=false; \
>   if [ Makefile -nt Makefile ] 2>/dev/null || [ $$? = 1 ]; then \
> for d in $(DEPS); do \
>   if [ $$d -nt Makefile ]; then \
>
>-- 
>openssl-dev mailing list
>To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev


-- 
Ticket here: http://rt.openssl.org/Ticket/Display.html?id=
Please log in as guest with password guest if prompted

-- 
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev


Re: [openssl-dev] [openssl.org #4444] [openssl-1.1.0-pre4] Make fails with "recipe for target 'depend' failed" on solaris64-x86_64

2016-03-18 Thread Erik Forsberg
still not working right.
Attached a longish log file extract.
But root cause seems to be that we try to process test dependencies
while doing depend in crypto, way before we had done any work in
the test subdir. That causes the find to exit with failed status aborting
the depend.


>-- Original Message --
>
>Fixup show in last message has now been merged with master, commit
>a6adf099cbd7c3bc5c7051ad3d334636ef5e7f90
>
>--
>Richard Levitte
>levi...@openssl.org
>
>-- 
>Ticket here: http://rt.openssl.org/Ticket/Display.html?id=
>Please log in as guest with password guest if prompted
>
>-- 
>openssl-dev mailing list
>To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev



depend.log
Description: Binary data
-- 
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev


Re: [openssl-dev] [openssl.org #4444] [openssl-1.1.0-pre4] Make fails with "recipe for target 'depend' failed" on solaris64-x86_64

2016-03-18 Thread Rainer Jung

Am 18.03.2016 um 19:33 schrieb Richard Levitte via RT:

Vid Fre, 18 Mar 2016 kl. 18.07.31, skrev rainer.j...@kippdata.de:

Am 18.03.2016 um 17:49 schrieb Richard Levitte via RT:

Vid Fre, 18 Mar 2016 kl. 16.34.05, skrev rainer.j...@kippdata.de:

I had the same problem. /bin/sh on Solaris does not understand the
"-
nt"
operator used in the definition of the "depend" target in the top-
level
Makefile, e.g. in line

if [ Makefile -nt Makefile ] ...


That can't be the cause, because whatever the exit code from the test
is, it's
"swallowed" by 'if'. A little like this is:


If it were syntactically correct, but it isn't.


You'll have to explain that to me. I just had a look here:
https://docs.oracle.com/cd/E26502_01/html/E29030/sh-1.html:



if list ; then list elif list ; then list ; ] . . . [ else list ; ] fi



The list following if is executed and, if it returns a zero exit status,

the list following the first then is executed. Otherwise, the list following
elif is executed and, if its value is zero, the list following the next then is
executed. Failing that, the else list is executed. If no else list or then list
is executed, then the if command returns a zero exit status.


I added the "set -ex" and:

% make depend
catdepends=false
+ [ Makefile -nt Makefile ]
Makefile:172: recipe for target 'depend' failed
make: *** [depend] Error 1


Would the following make a difference?

if ( [ Makefile -nt Makefile ] 2>/dev/null || [ $$? = 1 ] ); then


Yes, that works. Works means: it correctly detects, that Solaris doesn't 
support "-nt" and adds all dependencies to the end of the Makefile.



or perhaps using 'test' instead of '[' (and removing the ']' in that case, of
course)?


Also works.


or - since there's no more real need for the catdepends variable


That's an incorrect assumption. 'depend' is run as part of the larger targets,
and on some slower systems, having the same file copying happening every time
is quite time consuming. Checking if there's a need for all the data copying at
all first takes down the time for the cases when the .d files haven't been
updated since last time.


I think the variant I suggested still does that, at least in my tests. 
If there's no newer dependency, then it will not add anything to the 
Makefile, since the result of the "find" command is empty.


depend:
@:
@( sed -e '/^# DO NOT DELETE THIS LINE.*/,$$d' < Makefile; \
  echo '# DO NOT DELETE THIS LINE -- make depend depends on it.'; \
  echo; \
  for d in `find $(DEPS) -newer Makefile`; do \
if [ -f $$d ]; then cat $$d; fi; \
  done ) > Makefile.new; \
if cmp Makefile.new Makefile >/dev/null 2>&1; then \
  rm -f Makefile.new; \
else \
 mv -f Makefile.new Makefile; \
fi
@:

With "no need for catdepends" I only wanted to say there's no need any 
more for first checking, then remembering the check result in the 
variable and then executing on the check result. Instead one can move 
the dependency change detection directly into the latter part as shown 
in my previous mail. It has also the benefit of only adding the 
dependency snippets that are newer than the Makefile, not all of them. 
Is that a logically correct aim, or do we need to add all dependencies 
even if only some of the files are newer than Makefile?


Your suggested fix would mean on platforms without "-nt" we would always 
rebuild and that's in fact what I observed (make test rebuilds a lot of 
object files) whereas the "find" variant should work on all platforms 
and only adds the dependencies that are newer than the Makefile. If you 
want to add all dependencies even if only one is newer than the 
Makefile, a "find" based solution would be:


depend:
@:
@if [ "X`find $(DEPS) -newer Makefile`" != "X" ]; then \
  ( sed -e '/^# DO NOT DELETE THIS LINE.*/,$$d' < Makefile; \
echo '# DO NOT DELETE THIS LINE -- make depend depends on 
it.'; \

echo; \
for d in $(DEPS); do \
  if [ -f $$d ]; then cat $$d; fi; \
done ) > Makefile.new; \
  if cmp Makefile.new Makefile >/dev/null 2>&1; then \
rm -f Makefile.new; \
  else \
mv -f Makefile.new Makefile; \
  fi; \
fi
@:

One final suggestion: if the final solution will still contain a "for d 
in ..." loop, you might want to rename the loop variable from d to 
something else, like e.g. "f". Why? It took me quite some time to 
understand why


sed -e '/^# DO NOT DELETE THIS LINE.*/,$$d' < Makefile;

works although the variable "d" was only defined below that line. Only 
later I noticed, that here the "$$d" has a totally different meaning 
than $$d in the loop (",$$" resolves to ",$" meaning until end of file 
and "d" is the sed delete command). So my confusion was triggered by 
seeing "$$d" in two places close to each other but having totally 
different meaning. If 

Re: [openssl-dev] [openssl.org #4444] [openssl-1.1.0-pre4] Make fails with "recipe for target 'depend' failed" on solaris64-x86_64

2016-03-18 Thread Erik Forsberg
commit ac89799c3e78e9af1031226eb2fd389a70ce3c1b @levitte levitte committed an 
hour ago 
tried to fix this but it still dont work. Even on Solaris 11 I get

(srv) 22# find foo -print
find: stat() error foo: No such file or directory
(srv) 23# echo $?
1
(srv) 24# find . -name foo -print
(srv) 25# echo $?
0

if you pass a non-existent file to find, it exits with non-zero status
which stops the make in progress.


>-- Original Message --
>
>
>still not working right.
>Attached a longish log file extract.
>But root cause seems to be that we try to process test dependencies
>while doing depend in crypto, way before we had done any work in
>the test subdir. That causes the find to exit with failed status aborting
>the depend.
>
>
>>-- Original Message --
>>
>>Fixup show in last message has now been merged with master, commit
>>a6adf099cbd7c3bc5c7051ad3d334636ef5e7f90
>>
>>--
>>Richard Levitte
>>levi...@openssl.org
>>
>>-- 
>>Ticket here: http://rt.openssl.org/Ticket/Display.html?id=
>>Please log in as guest with password guest if prompted
>>
>>-- 
>>openssl-dev mailing list
>>To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
>
>
>Attachment: depend.log (33.7 KB)
>
>-- 
>openssl-dev mailing list
>To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev

-- 
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev


Re: [openssl-dev] [openssl.org #4444] [openssl-1.1.0-pre4] Make fails with "recipe for target 'depend' failed" on solaris64-x86_64

2016-03-18 Thread Erik Forsberg
It is the -nt that breaks Solaris 10

(dev0) 22$ make test
catdepends=false
+ [ Makefile -nt Makefile ] 
*** Error code 1

it stops executing on that line.

I like the suggestion of using /bin/ksh on Solaris 10, that is
generally needed also for many GNU autoconfig scripts, so why not OpenSSL too ?
It would be nice if that could be specified in the 10-main.conf snippets ?

>-- Original Message --
>
>
>Perhaps with said attachment this time...
>
>Vid Fre, 18 Mar 2016 kl. 16.49.13, skrev levitte:
>> Vid Fre, 18 Mar 2016 kl. 16.34.05, skrev rainer.j...@kippdata.de:
>> > I had the same problem. /bin/sh on Solaris does not understand the "-
>> > nt"
>> > operator used in the definition of the "depend" target in the top-
>> > level
>> > Makefile, e.g. in line
>> >
>> > if [ Makefile -nt Makefile ] ...
>>
>> That can't be the cause, because whatever the exit code from the test
>> is, it's
>> "swallowed" by 'if'. A little like this is:
>>
>> $ if (exit 1); then :; fi; echo $? 0 I cannot tell you what's going
>> wrong, and
>> the only suggestion I currently have is to apply the attached patch
>> and then
>> reconfigure and make and see what the output is. Can I assume you know
>> what
>> 'set -ex' does?
>>
>> Cheers,
>> Richard
>>
>> --
>> Richard Levitte
>> levi...@openssl.org
>
>
>--
>Richard Levitte
>levi...@openssl.org
>
>-- 
>Ticket here: http://rt.openssl.org/Ticket/Display.html?id=
>Please log in as guest with password guest if prompted
>
>
>diff --git a/Configurations/unix-Makefile.tmpl 
>b/Configurations/unix-Makefile.tmpl
>index 3a1ade7..d13ab5e 100644
>--- a/Configurations/unix-Makefile.tmpl
>+++ b/Configurations/unix-Makefile.tmpl
>@@ -266,7 +266,7 @@ clean: libclean
> # recognise the operator.
> depend:
>   @: {- output_off() if $disabled{makedepend}; "" -}
>-  @catdepends=false; \
>+  @set -ex; catdepends=false; \
>   if [ Makefile -nt Makefile ] 2>/dev/null || [ $$? = 1 ]; then \
> for d in $(DEPS); do \
>   if [ $$d -nt Makefile ]; then \
>
>-- 
>openssl-dev mailing list
>To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev

-- 
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev