Project

General

Profile

Actions

Bug #17588

open

Cannot build with library path with spaces on MSVC

Added by jmarrec (Julien Marrec) 5 months ago. Updated 5 months ago.

Status:
Open
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:102274]

Description

I checked out the ruby_2_7 from github, and I reproduced all steps in the github/workflows/windows.yml with success.

Then I edited the configure command here: https://github.com/ruby/ruby/blob/ruby_2_7/.github/workflows/windows.yml#L60 to include --with-static-linked-ext

..\win32\configure.bat --with-static-linked-ext --disable-install-doc --without-ext=+,dbm,gdbm --enable-bundled-libffi --with-opt-dir=C:/Users/julien/Software/Others/vcpkg/installed/x64-windows --with-openssl-dir="C:/Program Files/OpenSSL-Win64

It is failing with something that looks like it's due to an escaping problem: NMAKE : fatal error U1073: don't know how to make 'Files/OpenSSL-Win64/lib'. I don't know where to look to patch it...

Some more of the build log:

.....
linking static-library readline.lib
extracting ripper.y from ../../../parse.y
compiling compiler ripper.y
generating eventids1.c from ../../../parse.y
generating eventids2table.c from ../../../ext/ripper/eventids2.c
compiling ripper.c
ripper.c
C:\Users\julien\Software\Others\ruby\build\.ext\include\x64-mswin64_140\ruby/config.h(22): warning C4117: macro name '_INTEGRAL_MAX_BITS' is reserved, '#define' ignored
linking static-library ripper.lib
installing default ripper libraries
cp ../../../ext/ripper/lib/ripper/core.rb ../../.ext/common/ripper
cp ../../../ext/ripper/lib/ripper/filter.rb ../../.ext/common/ripper
cp ../../../ext/ripper/lib/ripper/lexer.rb ../../.ext/common/ripper
cp ../../../ext/ripper/lib/ripper/sexp.rb ../../.ext/common/ripper
cp ../../../ext/ripper/lib/ripper.rb ../../.ext/common
checking ../../../parse.y and ../../../ext/ripper/eventids2.c
installing default libraries
cp ../../../ext/rubyvm/lib/forwardable/impl.rb ../../.ext/common/forwardable
compiling ../../../ext/sdbm/_sdbm.c
_sdbm.c
C:\Users\julien\Software\Others\ruby\build\.ext\include\x64-mswin64_140\ruby/config.h(22): warning C4117: macro name '_INTEGRAL_MAX_BITS' is reserved, '#define' ignored
compiling ../../../ext/sdbm/init.c
init.c
C:\Users\julien\Software\Others\ruby\build\.ext\include\x64-mswin64_140\ruby/config.h(22): warning C4117: macro name '_INTEGRAL_MAX_BITS' is reserved, '#define' ignored
linking static-library sdbm.lib
generating constant definitions
compiling ../../../ext/socket/init.c
init.c
C:\Users\julien\Software\Others\ruby\build\.ext\include\x64-mswin64_140\ruby/config.h(22): warning C4117: macro name '_INTEGRAL_MAX_BITS' is reserved, '#define' ignored
compiling ../../../ext/socket/constants.c
constants.c
C:\Users\julien\Software\Others\ruby\build\.ext\include\x64-mswin64_140\ruby/config.h(22): warning C4117: macro name '_INTEGRAL_MAX_BITS' is reserved, '#define' ignored
compiling ../../../ext/socket/basicsocket.c
basicsocket.c
C:\Users\julien\Software\Others\ruby\build\.ext\include\x64-mswin64_140\ruby/config.h(22): warning C4117: macro name '_INTEGRAL_MAX_BITS' is reserved, '#define' ignored
compiling ../../../ext/socket/socket.c
socket.c
C:\Users\julien\Software\Others\ruby\build\.ext\include\x64-mswin64_140\ruby/config.h(22): warning C4117: macro name '_INTEGRAL_MAX_BITS' is reserved, '#define' ignored
compiling ../../../ext/socket/ipsocket.c
ipsocket.c
C:\Users\julien\Software\Others\ruby\build\.ext\include\x64-mswin64_140\ruby/config.h(22): warning C4117: macro name '_INTEGRAL_MAX_BITS' is reserved, '#define' ignored
compiling ../../../ext/socket/tcpsocket.c
tcpsocket.c
C:\Users\julien\Software\Others\ruby\build\.ext\include\x64-mswin64_140\ruby/config.h(22): warning C4117: macro name '_INTEGRAL_MAX_BITS' is reserved, '#define' ignored
compiling ../../../ext/socket/tcpserver.c
tcpserver.c
C:\Users\julien\Software\Others\ruby\build\.ext\include\x64-mswin64_140\ruby/config.h(22): warning C4117: macro name '_INTEGRAL_MAX_BITS' is reserved, '#define' ignored
compiling ../../../ext/socket/sockssocket.c
sockssocket.c
C:\Users\julien\Software\Others\ruby\build\.ext\include\x64-mswin64_140\ruby/config.h(22): warning C4117: macro name '_INTEGRAL_MAX_BITS' is reserved, '#define' ignored
compiling ../../../ext/socket/udpsocket.c
udpsocket.c
C:\Users\julien\Software\Others\ruby\build\.ext\include\x64-mswin64_140\ruby/config.h(22): warning C4117: macro name '_INTEGRAL_MAX_BITS' is reserved, '#define' ignored
compiling ../../../ext/socket/unixsocket.c
unixsocket.c
C:\Users\julien\Software\Others\ruby\build\.ext\include\x64-mswin64_140\ruby/config.h(22): warning C4117: macro name '_INTEGRAL_MAX_BITS' is reserved, '#define' ignored
compiling ../../../ext/socket/unixserver.c
unixserver.c
C:\Users\julien\Software\Others\ruby\build\.ext\include\x64-mswin64_140\ruby/config.h(22): warning C4117: macro name '_INTEGRAL_MAX_BITS' is reserved, '#define' ignored
compiling ../../../ext/socket/option.c
option.c
C:\Users\julien\Software\Others\ruby\build\.ext\include\x64-mswin64_140\ruby/config.h(22): warning C4117: macro name '_INTEGRAL_MAX_BITS' is reserved, '#define' ignored
compiling ../../../ext/socket/ancdata.c
ancdata.c
C:\Users\julien\Software\Others\ruby\build\.ext\include\x64-mswin64_140\ruby/config.h(22): warning C4117: macro name '_INTEGRAL_MAX_BITS' is reserved, '#define' ignored
compiling ../../../ext/socket/raddrinfo.c
raddrinfo.c
C:\Users\julien\Software\Others\ruby\build\.ext\include\x64-mswin64_140\ruby/config.h(22): warning C4117: macro name '_INTEGRAL_MAX_BITS' is reserved, '#define' ignored
compiling ../../../ext/socket/ifaddr.c
ifaddr.c
C:\Users\julien\Software\Others\ruby\build\.ext\include\x64-mswin64_140\ruby/config.h(22): warning C4117: macro name '_INTEGRAL_MAX_BITS' is reserved, '#define' ignored
linking static-library socket.lib
installing default socket libraries
cp ../../../ext/socket/lib/socket.rb ../../.ext/common
compiling ../../../ext/stringio/stringio.c
stringio.c
C:\Users\julien\Software\Others\ruby\build\.ext\include\x64-mswin64_140\ruby/config.h(22): warning C4117: macro name '_INTEGRAL_MAX_BITS' is reserved, '#define' ignored
linking static-library stringio.lib
compiling ../../../ext/strscan/strscan.c
strscan.c
C:\Users\julien\Software\Others\ruby\build\.ext\include\x64-mswin64_140\ruby/config.h(22): warning C4117: macro name '_INTEGRAL_MAX_BITS' is reserved, '#define' ignored
linking static-library strscan.lib
installing default libraries
cp ../../../ext/win32/lib/win32/importer.rb ../../.ext/common/win32
cp ../../../ext/win32/lib/win32/registry.rb ../../.ext/common/win32
cp ../../../ext/win32/lib/win32/resolv.rb ../../.ext/common/win32
cp ../../../ext/win32/lib/win32/resolv9x.rb ../../.ext/common/win32
cp ../../../ext/win32/lib/win32/sspi.rb ../../.ext/common/win32
cp ../../../ext/win32/lib/Win32API.rb ../../.ext/common
compiling ../../../../ext/win32/resolv/resolv.c
resolv.c
C:\Users\julien\Software\Others\ruby\build\.ext\include\x64-mswin64_140\ruby/config.h(22): warning C4117: macro name '_INTEGRAL_MAX_BITS' is reserved, '#define' ignored
linking static-library resolv.lib
compiling ../../../ext/win32ole/win32ole.c
win32ole.c
C:\Users\julien\Software\Others\ruby\build\.ext\include\x64-mswin64_140\ruby/config.h(22): warning C4117: macro name '_INTEGRAL_MAX_BITS' is reserved, '#define' ignored
compiling ../../../ext/win32ole/win32ole_error.c
win32ole_error.c
C:\Users\julien\Software\Others\ruby\build\.ext\include\x64-mswin64_140\ruby/config.h(22): warning C4117: macro name '_INTEGRAL_MAX_BITS' is reserved, '#define' ignored
compiling ../../../ext/win32ole/win32ole_event.c
win32ole_event.c
C:\Users\julien\Software\Others\ruby\build\.ext\include\x64-mswin64_140\ruby/config.h(22): warning C4117: macro name '_INTEGRAL_MAX_BITS' is reserved, '#define' ignored
compiling ../../../ext/win32ole/win32ole_method.c
win32ole_method.c
C:\Users\julien\Software\Others\ruby\build\.ext\include\x64-mswin64_140\ruby/config.h(22): warning C4117: macro name '_INTEGRAL_MAX_BITS' is reserved, '#define' ignored
compiling ../../../ext/win32ole/win32ole_param.c
win32ole_param.c
C:\Users\julien\Software\Others\ruby\build\.ext\include\x64-mswin64_140\ruby/config.h(22): warning C4117: macro name '_INTEGRAL_MAX_BITS' is reserved, '#define' ignored
compiling ../../../ext/win32ole/win32ole_record.c
win32ole_record.c
C:\Users\julien\Software\Others\ruby\build\.ext\include\x64-mswin64_140\ruby/config.h(22): warning C4117: macro name '_INTEGRAL_MAX_BITS' is reserved, '#define' ignored
compiling ../../../ext/win32ole/win32ole_type.c
win32ole_type.c
C:\Users\julien\Software\Others\ruby\build\.ext\include\x64-mswin64_140\ruby/config.h(22): warning C4117: macro name '_INTEGRAL_MAX_BITS' is reserved, '#define' ignored
compiling ../../../ext/win32ole/win32ole_typelib.c
win32ole_typelib.c
C:\Users\julien\Software\Others\ruby\build\.ext\include\x64-mswin64_140\ruby/config.h(22): warning C4117: macro name '_INTEGRAL_MAX_BITS' is reserved, '#define' ignored
compiling ../../../ext/win32ole/win32ole_variable.c
win32ole_variable.c
C:\Users\julien\Software\Others\ruby\build\.ext\include\x64-mswin64_140\ruby/config.h(22): warning C4117: macro name '_INTEGRAL_MAX_BITS' is reserved, '#define' ignored
compiling ../../../ext/win32ole/win32ole_variant.c
win32ole_variant.c
C:\Users\julien\Software\Others\ruby\build\.ext\include\x64-mswin64_140\ruby/config.h(22): warning C4117: macro name '_INTEGRAL_MAX_BITS' is reserved, '#define' ignored
compiling ../../../ext/win32ole/win32ole_variant_m.c
win32ole_variant_m.c
C:\Users\julien\Software\Others\ruby\build\.ext\include\x64-mswin64_140\ruby/config.h(22): warning C4117: macro name '_INTEGRAL_MAX_BITS' is reserved, '#define' ignored
linking static-library win32ole.lib
installing default win32ole libraries
cp ../../../ext/win32ole/lib/win32ole/property.rb ../../.ext/common/win32ole
cp ../../../ext/win32ole/lib/win32ole.rb ../../.ext/common
compiling ../../../ext/zlib/zlib.c
zlib.c
C:\Users\julien\Software\Others\ruby\build\.ext\include\x64-mswin64_140\ruby/config.h(22): warning C4117: macro name '_INTEGRAL_MAX_BITS' is reserved, '#define' ignored
linking static-library zlib.lib
ext/extinit.c updated
compiling ext/extinit.c
extinit.c
C:\Users\julien\Software\Others\ruby\build\.ext\include\x64-mswin64_140\ruby/config.h(22): warning C4117: macro name '_INTEGRAL_MAX_BITS' is reserved, '#define' ignored
NMAKE : fatal error U1073: don't know how to make 'Files/OpenSSL-Win64/lib'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\HostX64\x64\nmake.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\HostX64\x64\nmake.EXE"' : return code '0x2'
Stop.

Updated by MSP-Greg (Greg L) 5 months ago

It may be a copy paste issue, but does the line you edited (windows.yml#L60) end with a double quote?

Updated by nobu (Nobuyoshi Nakada) 5 months ago

As far as I tried years ago, cl.exe failed to pass library path with spaces to link.exe.

Actions #3

Updated by nobu (Nobuyoshi Nakada) 5 months ago

  • Subject changed from Cannot build 2.7.2 with `--with-static-linked-ext` on MSVC to Cannot build with library path with spaces on MSVC
Actions

Also available in: Atom PDF