Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Tor Tor
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 325
    • Issues 325
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 30
    • Merge requests 30
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • The Tor Project
  • Core
  • TorTor
  • Issues
  • #40468
Closed
Open
Issue created Sep 14, 2021 by boklm@boklm

Tor fails to build with mingw-w64 and rust 1.53.0

When trying to build tor for Windows with mingw-w64 and rust 1.53.0, I get this build error:

x86_64-w64-mingw32-ar: `u' modifier ignored since `D' is the default (see `U')
  AR       src/lib/libtor-trace.a
x86_64-w64-mingw32-ar: `u' modifier ignored since `D' is the default (see `U')
  CCLD     src/test/test-switch-id.exe
x86_64-w64-mingw32-gcc: error: ./src/rust/target/x86_64-pc-windows-gnu/release/tor_rust.lib: No such file or directory
make[1]: *** [Makefile:11280: src/test/test-switch-id.exe] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/var/tmp/build/tor-7440a38846d7'
make: *** [Makefile:7372: all] Error 2

Doing this change fixed the build:

diff --git a/configure.ac b/configure.ac
index 1b1d3a9892..e3037ad02a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -691,13 +691,7 @@ if test "x$enable_rust" = "xyes"; then
     fi
   fi
 
-  dnl For now both MSVC and MinGW rust libraries will output static libs with
-  dnl the MSVC naming convention.
-  if test "$bwin32" = "true"; then
-    tor_rust_static_name=tor_rust.lib
-  else
-    tor_rust_static_name=libtor_rust.a
-  fi
+  tor_rust_static_name=libtor_rust.a
 
   AC_CANONICAL_BUILD
 

I think it might be related to https://github.com/rust-lang/rust/commit/5ecc18f3ece1124a56ff76a74c3eb4153be5b3b8

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking