Skip to content

Complex Build Scripts Fail with MSVC Targets #4

Open
@Alexhuszagh

Description

@Alexhuszagh

Summary

When trying to compile a crate with a complex, external build system, MSVC's cl frequently fails, due to unexpected arguments. Another example is #14.

Example

Cargo.toml

[package]
name = "openssl"
version = "0.1.0"
edition = "2021"

[dependencies]
openssl = "0.10"

[features]
default = []
vendored = ["openssl/vendored"]

Building then with cross build --target x86_64-pc-windows-msvc fails.

Error Output

The error output is as follows:

  0114:fixme:file:server_get_file_info Unsupported info class e                                                                                                                                     
  014c:fixme:nls:RtlSetThreadPreferredUILanguages 256, 0000000000000000, 0000000000000000                                                                                                           
  014c:fixme:nls:RtlGetThreadPreferredUILanguages 00000034, 000000000101D75C, 0000000000000000 000000000101D758                                                                                     
  014c:fixme:nls:get_dummy_preferred_ui_language (0x34 000000000101D75C 0000000000000000 000000000101D758) returning a dummy value (current locale)                                                 
  014c:fixme:nls:RtlGetThreadPreferredUILanguages 00000034, 000000000101D75C, 0000000001055790 000000000101D758                                                                                     
  014c:fixme:nls:get_dummy_preferred_ui_language (0x34 000000000101D75C 0000000001055790 000000000101D758) returning a dummy value (current locale)                                                 
  Microsoft (R) C/C++ Optimizing Compiler Version 19.32.31332 for x64                                                                                                                               
  Copyright (C) Microsoft Corporation.  All rights reserved.                                                                                                                                        
                                                                                                                                                                                                    
  014c:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (000000000101F8A0 1 C) semi-stub                                                                                                                 
  014c:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (000000000101F510 1 C) semi-stub                                                                                                                 
  014c:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (000000000101F500 1 C) semi-stub                                                                                                                 
  cl : Command line warning D9002 : ignoring unknown option '-dM'                                                                                                                                   
  cl : Command line warning D9002 : ignoring unknown option '-x'                                                                                                                                    
  cl : Command line warning D9002 : ignoring unknown option '/dev/null'                                                                                                                             
  c                                                                                                                                                                                                 
  c1: fatal error C1083: Cannot open source file: 'c': No such file or directory                                                                                                                    
  thread 'main' panicked at 'failed to find nmake', /cargo/registry/src/github.com-1ecc6299db9ec823/openssl-src-111.20.0+1.1.1o/src/lib.rs:435:65                                                   
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace 

The Makefile used by nmake that causes the above failure is (the suffix has been changed so it can be uploaded to Github):

makefile

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-windowsArea: windows targetsbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions