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

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Rich Salz via RT
% ./config --prefix=/opt/openssl
Operating system: i86pc-whatever-solaris2
Configuring for solaris64-x86_64-gcc
Configuring OpenSSL version 1.1.0-pre4 (0x0x10100004L)
    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 <[hidden email]>


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

--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

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

Rainer Jung-3
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 (0x0x10100004L)
>      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 <[hidden email]>
--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

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

Rich Salz 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 (0x0x10100004L)
>      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 <[hidden email]>


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

--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

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

Rich Salz via RT
In reply to this post by Rainer Jung-3
Vid Fre, 18 Mar 2016 kl. 16.34.05, skrev [hidden email]:
> 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
[hidden email]

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

--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

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

Rich Salz via RT
In reply to this post by Rainer Jung-3
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 [hidden email]:
> > 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
> [hidden email]

--
Richard Levitte
[hidden email]

--
Ticket here: http://rt.openssl.org/Ticket/Display.html?id=4444
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
Reply | Threaded
Open this post in threaded view
|

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

Rainer Jung-3
In reply to this post by Rich Salz via RT
Am 18.03.2016 um 17:49 schrieb Richard Levitte via RT:

> Vid Fre, 18 Mar 2016 kl. 16.34.05, skrev [hidden email]:
>> 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
Reply | Threaded
Open this post in threaded view
|

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

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

> Vid Fre, 18 Mar 2016 kl. 16.34.05, skrev [hidden email]:
>> 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=4444
Please log in as guest with password guest if prompted

--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

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

Rich Salz via RT
In reply to this post by Rainer Jung-3
Vid Fre, 18 Mar 2016 kl. 18.07.31, skrev [hidden email]:

> Am 18.03.2016 um 17:49 schrieb Richard Levitte via RT:
> > Vid Fre, 18 Mar 2016 kl. 16.34.05, skrev [hidden email]:
> >> 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
[hidden email]

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

--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

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

Rainer Jung-3
Am 18.03.2016 um 19:33 schrieb Richard Levitte via RT:

> Vid Fre, 18 Mar 2016 kl. 18.07.31, skrev [hidden email]:
>> Am 18.03.2016 um 17:49 schrieb Richard Levitte via RT:
>>> Vid Fre, 18 Mar 2016 kl. 16.34.05, skrev [hidden email]:
>>>> 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 there were no variable "d" IMHO it might become a
bit more understandable.

BTW: I do like the new build system :)

Regards,

Rainer
--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

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

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

> Vid Fre, 18 Mar 2016 kl. 18.07.31, skrev [hidden email]:
>> Am 18.03.2016 um 17:49 schrieb Richard Levitte via RT:
>>> Vid Fre, 18 Mar 2016 kl. 16.34.05, skrev [hidden email]:
>>>> 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 there were no variable "d" IMHO it might become a
bit more understandable.

BTW: I do like the new build system :)

Regards,

Rainer


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

--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

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

Erik Forsberg-11
In reply to this post by Rich Salz 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 [hidden email]:
>> > 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
>> [hidden email]
>
>
>--
>Richard Levitte
>[hidden email]
>
>--
>Ticket here: http://rt.openssl.org/Ticket/Display.html?id=4444
>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
Reply | Threaded
Open this post in threaded view
|

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

Rich Salz 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 [hidden email]:
>> > 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
>> [hidden email]
>
>
>--
>Richard Levitte
>[hidden email]
>
>--
>Ticket here: http://rt.openssl.org/Ticket/Display.html?id=4444
>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=4444
Please log in as guest with password guest if prompted

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