#1096 CMake: list_spaces_append_once fails with spaces in filename

closed-accepted
5
2014-12-23
2012-02-27
theret
No

This is to confirm bug 3413233. Patch attached.

Curl version: 7.24.0
OS: Windows XP 32-bit, Windows 7 64-bit (any Windows with MSVC)
CMake version: 2.8.7

Windows standard libraries are located in C:/Program Files/Microsoft SDKs/[...]. They are already included in the default MSVC LIBPATH. Hence, find_library(WSOCK32_LIBRARY wsock32) and find_library(WS2_32_LIBRARY ws2_32) are not needed. They return the full path to the libraries including spaces. Of course, list_spaces_append_once will mangle the result and the build fails. Here is the build log from MSVC or SDK command prompt:

cd curl-7.24.0
mkdir build
cd build

cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=z:\software -DCMAKE_BUILD_TYPE=Release -DCURL_ZLIB=OFF -DCMAKE_USE_OPENSSL=OFF ..

nmake VERBOSE=1

Linking C shared library ..\libcurl.dll
cd Z:\software\src\curl-7.24.0\build\lib
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -E vs_link_dll C:\PROGRA~2\MICROS~1.0\VC\bin\amd64\link.exe /nologo @CMakeFiles\libcurl.dir\objects1.rsp @C:\Users\drno\AppData\Local\Temp\nm1C79.tmp
Visual Studio Non-Incremental Link
LINK:
C:\PROGRA~2\MICROS~1.0\VC\bin\amd64\link.exe /nologo @CMakeFiles\libcurl.dir\objects1.rsp /out:..\libcurl.dll /implib:..\libcurl_imp.lib /pdb:Z:\software\src\curl-7.24.0\build\lib\..\libcurl.pdb /dll /version:0.0 /STACK:10000000 /machine:x64 /INCREMENTAL:NO winmm.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib C:/Program Files/Microsoft SDKs/Windows/v7.1/Lib/x64/WSock32.Lib SDKs/Windows/v7.1/Lib/x64/WS2_32.Lib C:/Program Files/Microsoft SDKs/Windows/v7.1/Lib/x64/WSock32.Lib C:/Program Files/Microsoft SDKs/Windows/v7.1/Lib/x64/WS2_32.Lib /MANIFEST
LINK : fatal error LNK1181: cannot open input file 'C:/Program.obj'
LINK failed. with 1181
NMAKE : fatal error U1077: '"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe"' :
return code '0xffffffff'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\Bin\amd64\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\Bin\amd64\nmake.exe"' : return code '0x2'
Stop.

Discussion

  • theret

    theret - 2012-02-27

    Patch for curl-7.24.0/CMakeLists.txt

     
  • Daniel Stenberg

    Daniel Stenberg - 2012-03-04
    • status: open --> open-accepted
     
  • Daniel Stenberg

    Daniel Stenberg - 2012-03-04

    Thanks for the report and the patch!

    If you give me your name + email I'll give you proper credit when committing this!

     
  • Daniel Stenberg

    Daniel Stenberg - 2012-03-16
    • status: open-accepted --> closed-accepted
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks