Hugal31 / yara-rust

Rust bindings for VirusTotal/Yara

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

crt static link error

bigdogs opened this issue · comments

Hi,

I compile yara rust with

[target.'cfg(all(windows, target_env = "msvc"))']
rustflags = ["-C", "target-feature=+crt-static"]
yara = { version = "0.13.0", features = ["vendored", "bundled-4_1_3"] } 

failed with the following errors

     LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
          LINK : warning LNK4217: symbol '_fclose' defined in 'libucrt.lib(fclose.obj)' is imported by 'libyara_sys-95d3ea5e51a7dd2d.rlib(rules.o)' in function '_yr_rules_load'
          LINK : warning LNK4286: symbol '_fclose' defined in 'libucrt.lib(fclose.obj)' is imported by 'libyara_sys-95d3ea5e51a7dd2d.rlib(compiler.o)'
          LINK : warning LNK4217: symbol '_qsort' defined in 'libucrt.lib(qsort.obj)' is imported by 'libyara_sys-95d3ea5e51a7dd2d.rlib(rules.o)' in function '_yr_rules_get_stats'
          LINK : warning LNK4286: symbol '_qsort' defined in 'libucrt.lib(qsort.obj)' is imported by 'libyara_sys-95d3ea5e51a7dd2d.rlib(scanner.o)'
          LINK : warning LNK4286: symbol '___acrt_iob_func' defined in 'libucrt.lib(_file.obj)' is imported by 'libyara_sys-95d3ea5e51a7dd2d.rlib(base64.o)'
          LINK : warning LNK4286: symbol '___acrt_iob_func' defined in 'libucrt.lib(_file.obj)' is imported by 'libyara_sys-95d3ea5e51a7dd2d.rlib(lexer.o)'
          LINK : warning LNK4286: symbol '___acrt_iob_func' defined in 'libucrt.lib(_file.obj)' is imported by 'libyara_sys-95d3ea5e51a7dd2d.rlib(re.o)'
          LINK : warning LNK4286: symbol '___acrt_iob_func' defined in 'libucrt.lib(_file.obj)' is imported by 'libyara_sys-95d3ea5e51a7dd2d.rlib(hex_lexer.o)'
          LINK : warning LNK4286: symbol '___acrt_iob_func' defined in 'libucrt.lib(_file.obj)' is imported by 'libyara_sys-95d3ea5e51a7dd2d.rlib(re_lexer.o)'
          LINK : warning LNK4217: symbol '___acrt_iob_func' defined in 'libucrt.lib(_file.obj)' is imported by 'libyara_sys-95d3ea5e51a7dd2d.rlib(scanner.o)' in function '_printf'
          LINK : warning LNK4217: symbol '___acrt_iob_func' defined in 'libucrt.lib(_file.obj)' is imported by 'libyara_sys-95d3ea5e51a7dd2d.rlib(object.o)' in function '_yr_object_create'
          LINK : warning LNK4286: symbol '___acrt_iob_func' defined in 'libucrt.lib(_file.obj)' is imported by 'libyara_sys-95d3ea5e51a7dd2d.rlib(atoms.o)'
          LINK : warning LNK4286: symbol '___acrt_iob_func' defined in 'libucrt.lib(_file.obj)' is imported by 'libyara_sys-95d3ea5e51a7dd2d.rlib(ahocorasick.o)'
          LINK : warning LNK4286: symbol '___stdio_common_vfprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libyara_sys-95d3ea5e51a7dd2d.rlib(re.o)'
          LINK : warning LNK4286: symbol '___stdio_common_vfprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libyara_sys-95d3ea5e51a7dd2d.rlib(base64.o)'
          LINK : warning LNK4217: symbol '___stdio_common_vfprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libyara_sys-95d3ea5e51a7dd2d.rlib(scanner.o)' in function '__vfprintf_l'    
          LINK : warning LNK4217: symbol '___stdio_common_vfprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libyara_sys-95d3ea5e51a7dd2d.rlib(object.o)' in function '_yr_object_create'          LINK : warning LNK4286: symbol '___stdio_common_vfprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libyara_sys-95d3ea5e51a7dd2d.rlib(atoms.o)'
          LINK : warning LNK4286: symbol '___stdio_common_vfprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libyara_sys-95d3ea5e51a7dd2d.rlib(ahocorasick.o)'
          LINK : warning LNK4217: symbol '___stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libyara_sys-95d3ea5e51a7dd2d.rlib(parser.o)' in function '_yr_parser_reduce_rule_declaration_phase_2'
          LINK : warning LNK4217: symbol '___stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libyara_sys-95d3ea5e51a7dd2d.rlib(pe_utils.o)' in function '_ord_lookup'    
          LINK : warning LNK4217: symbol '___stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libyara_sys-95d3ea5e51a7dd2d.rlib(compiler.o)' in function '_snprintf'      
          LINK : warning LNK4286: symbol '___stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libyara_sys-95d3ea5e51a7dd2d.rlib(lexer.o)'
          LINK : warning LNK4286: symbol '___stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libyara_sys-95d3ea5e51a7dd2d.rlib(grammar.o)'
          LINK : warning LNK4217: symbol '___stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'libyara_sys-95d3ea5e51a7dd2d.rlib(dotnet.o)' in function '_dotnet_parse_tilde_2'

set flags by RUSTFLAGS env seems OK