[tor-bugs] #25895 [Core Tor/Tor]: Cross-compiling tor rust for Windows is broken

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Apr 23 07:47:14 UTC 2018


#25895: Cross-compiling tor rust for Windows is broken
------------------------------+--------------------
     Reporter:  gk            |      Owner:  (none)
         Type:  defect        |     Status:  new
     Priority:  Medium        |  Milestone:
    Component:  Core Tor/Tor  |    Version:
     Severity:  Normal        |   Keywords:  rust
Actual Points:                |  Parent ID:  #25849
       Points:                |   Reviewer:
      Sponsor:                |
------------------------------+--------------------
 I managed to cross-compile at least a rust compiler for 64bit Windows but
 tor is not prepared for that:
 {{{
 x86_64-w64-mingw32-gcc  -mwindows -fstack-protector-all -Wstack-protector
 --param ssp-buffer-size=4 -fno-strict-overflow -Wno-missing-field-
 initializers -Wformat -Wformat-security -U_FORTIFY_SOURCE
 -D_FORTIFY_SOURCE=2 -fstack-protector-all -Wstack-protector --param ssp-
 buffer-size=1 -fasynchronous-unwind-tables -Wall -fno-strict-aliasing
 -Waddress -Warray-bounds -Wdate-time -Wdouble-promotion -Wduplicated-cond
 -Wextra -Wfloat-conversion -Wignored-attributes -Winit-self -Wlogical-op
 -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-noreturn
 -Wnormalized=nfkc -Wnull-dereference -Woverlength-strings -Woverride-init
 -Wshadow -Wshift-count-negative -Wshift-count-overflow -Wshift-negative-
 value -Wshift-overflow=2 -Wsizeof-array-argument -Wstrict-overflow=1
 -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wswitch-bool
 -Wsync-nand -Wtrampolines -Wunused-but-set-parameter -Wunused-but-set-
 variable -Wunused-const-variable=2 -Wunused-local-typedefs -Wvariadic-
 macros -W -Wfloat-equal -Wundef -Wpointer-arith -Wstrict-prototypes
 -Wmissing-prototypes -Wwrite-strings -Wredundant-decls -Wchar-subscripts
 -Wcomment -Wformat=2 -Wwrite-strings -Wnested-externs -Wbad-function-cast
 -Wswitch-enum -Waggregate-return -Wpacked -Wunused -Wunused-parameter
 -Wold-style-definition -Wmissing-declarations  -mwindows -Wl,--dynamicbase
 -Wl,--nxcompat -Wl,--enable-reloc-section -lssp
 -L/var/tmp/dist/mingw-w64/gcclibs -Wl,--nxcompat -Wl,--dynamicbase -o
 src/tools/tor-resolve.exe src/tools/tor-resolve.o src/common/libor.a
 src/common/libor-ctime.a ./src/rust/target/release/tor_rust.lib  -lws2_32
 -luserenv
 x86_64-w64-mingw32-gcc: error: ./src/rust/target/release/tor_rust.lib: No
 such file or directory
 }}}
 We don't want to have a *lib file I think. What we get instead when cross-
 compiling (libtor_rust.a) looks actually promising.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/25895>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list