[openssl-dev] [openssl.org #4492] Configure, Unix and Linux, and malformed command line when path includes spaces

noloader@gmail.com via RT rt at openssl.org
Tue Mar 29 06:53:30 UTC 2016


Unix and Linux builds have problems when the path includes spaces.
In-tree is witnessing the issue, and out-of-tree may experience the
issue.

This problem was observed on Windows due to "C:\Program Files" and
"C:\Documents and Settings"; see Issues 4486 and 4490. Windows uses
UAC, which means make usually does not fails and it sprays the errant
directories onto the filesystem.

Conventional wisdom is to "don't use spaces"; however, it does not
apply to Windows so the problem may as well be completely remediated
since it has to be fixed under Windows.

To duplicate:

    cd /tmp
    git clone git://git.openssl.org/openssl.git "openssl workspace"
    cd "openssl workspace"
    ./config

You should encounter paths like the following on the command lines.
Notice the include options have "-I../openssl -Iworkspace/include -I.
-Icrypto/include -Iinclude -Icrypto/bn/workspace/crypto/include".

cc -DDSO_DLFCN -DHAVE_DLFCN_H -DOPENSSL_THREADS
-DOPENSSL_NO_DYNAMIC_ENGINE -DOPENSSL_PIC -DOPENSSL_IA32_SSE2
-DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m
-DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM
-DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM
-DOPENSSLDIR="\"/usr/local/ssl\""
-DENGINESDIR="\"/usr/local/lib/engines\"" -O3 -D_REENTRANT -arch
x86_64 -DL_ENDIAN -Wall  -fPIC -I../openssl -Iworkspace/include -I.
-Icrypto/include -Iinclude -Icrypto/bn/workspace/crypto/include -MMD
-MF crypto/aes/aes-x86_64.d.tmp -MT crypto/aes/aes-x86_64.o -c -o
crypto/aes/aes-x86_64.o crypto/aes/aes-x86_64.s
...

***********

I see where some of the potential problems are. I just don't have the
requisite Perl experience to remediate them and offer a patch. Some
other places are where $bilddir, $srcdir and $args{incs} are used.

openssl workspace$ grep -R "\-I" * | egrep -iv
'makefile|\.conf|\.h|\.c|\.txt|\.pod|//test|test\.pl'
Configurations/descrip.mms.tmpl:                staging_instdir =
staging_instdir - "]A.;" + ".OPENSSL-INSTALL]"
Configurations/descrip.mms.tmpl:                staging_instdir =
staging_instdir - "A.;" + "[OPENSSL-INSTALL]"
Configurations/descrip.mms.tmpl:        $(PERL) "-I." "-Mvmsconfig" {-
sourcefile("util", "dofile.pl") -} -
Configurations/descrip.mms.tmpl:        $(PERL) "-I." "-Mvmsconfig" {-
sourcefile("util", "dofile.pl") -} -
Configurations/descrip.mms.tmpl:        \$(PERL) "-I\$(BUILDDIR)"
"-Mconfigdata" $dofile -
Configure:            $withargs{zlib_include}="-I$1";
Configure:    my $cmd = "$config{perl} \"-I.\" \"-Mconfigdata\"
$dofile -o\"Configure\" \"".join("\" \"", at templates)."\" >
\"$out.new\"";
...
test/run_tests.pl:$switches = "-w \"-I$testlib\" \"-I$utillib\"";


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



More information about the openssl-dev mailing list