Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complex Build Scripts Fail with MSVC Targets #4

Open
Alexhuszagh opened this issue Jun 23, 2022 · 0 comments
Open

Complex Build Scripts Fail with MSVC Targets #4

Alexhuszagh opened this issue Jun 23, 2022 · 0 comments
Labels
A-windows Area: windows targets bug Something isn't working

Comments

@Alexhuszagh
Copy link
Collaborator

Alexhuszagh commented Jun 23, 2022

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

@Alexhuszagh Alexhuszagh added the bug Something isn't working label Jun 23, 2022
@Alexhuszagh Alexhuszagh added the A-windows Area: windows targets label Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-windows Area: windows targets bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant