Opened 7 weeks ago

Closed 7 weeks ago

#26662 closed defect (fixed)

Fix broken Windows compilation on master

Reported by: teor Owned by: nickm
Priority: Medium Milestone: Tor: 0.3.5.x-final
Component: Core Tor/Tor Version: Tor: unspecified
Severity: Normal Keywords: windows, tor-ci, 035-must regression
Cc: nickm Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

It looks like the split_or_directory branch broke Windows compilation:

x86_64-w64-mingw32-gcc -IC:/msys64/mingw64/include  -g -O2 -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 -Wduplicate-decl-specifier -Wduplicated-cond -Wextra -Wfloat-conversion -Wignored-attributes -Wimplicit-fallthrough -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 -Werror -L/c/OpenSSL-Win64/lib  -Wl,--nxcompat -Wl,--dynamicbase -o src/test/bench.exe src/test/bench.o src/core/libtor-app.a src/lib/libtor-compress.a src/lib/libtor-evloop.a src/lib/libtor-tls.a src/lib/libtor-crypt-ops.a src/ext/keccak-tiny/libkeccak-tiny.a src/lib/libcurve25519_donna.a src/ext/ed25519/ref10/libed25519_ref10.a src/ext/ed25519/donna/libed25519_donna.a src/lib/libtor-process.a src/lib/libtor-time.a src/lib/libtor-fs.a src/lib/libtor-encoding.a src/lib/libtor-sandbox.a src/lib/libtor-container.a src/lib/libtor-net.a src/lib/libtor-thread.a src/lib/libtor-memarea.a src/lib/libtor-math.a src/lib/libtor-meminfo.a src/lib/libtor-osinfo.a src/lib/libtor-log.a src/lib/libtor-lock.a src/lib/libtor-fdio.a src/lib/libtor-string.a src/lib/libtor-term.a src/lib/libtor-smartlist-core.a src/lib/libtor-malloc.a src/lib/libtor-wallclock.a src/lib/libtor-err.a src/lib/libtor-intmath.a src/lib/libtor-ctime.a src/trunnel/libor-trunnel.a src/lib/libtor-trace.a  -lz  -levent -lssl -lcrypto -lws2_32 -liphlpapi -lgdi32 -luserenv -LC:/msys64/mingw64/lib -llzma  
bash.exe : src/core/libtor-app.a(main.o): In function `run_main_loop_once':
At line:2 char:5
+     & $commandPath $args 2>&1
+     ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (src/core/libtor...ain_loop_once'::String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
C:\projects\tor\x86_64-w64-mingw32/../src/core/mainloop/main.c:2990: undefined reference to `nt_service_is_stopping'
src/core/libtor-app.a(main.o): In function `tor_run_main':
C:\projects\tor\x86_64-w64-mingw32/../src/core/mainloop/main.c:4247: undefined reference to `nt_service_parse_options'
C:\projects\tor\x86_64-w64-mingw32/../src/core/mainloop/main.c:4277: undefined reference to `nt_service_set_state'
collect2.exe: error: ld returned 1 exit status
make: *** [Makefile:6751: src/test/bench.exe] Error 1
make: *** Waiting for unfinished jobs....
Command executed with exception: make: *** Waiting for unfinished jobs....

https://ci.appveyor.com/project/torproject/tor/build/1.0.308/job/xxtbvepsfyif49sc

Child Tickets

Change History (7)

comment:1 Changed 7 weeks ago by nickm

Keywords: 035-must regression added

comment:2 Changed 7 weeks ago by nickm

Owner: set to nickm
Status: newaccepted

comment:3 Changed 7 weeks ago by nickm

This looks to me like we aren't linking with ntmain.c

comment:4 Changed 7 weeks ago by nickm

Oh. Because ntmain needs to go in libtor-app for now.

comment:5 Changed 7 weeks ago by nickm

Status: acceptedneeds_review

PR at https://github.com/torproject/tor/pull/212 ; Branch is bug26662. Will wait for CI before merging.

comment:6 Changed 7 weeks ago by nickm

CI seems happy; merging.

comment:7 Changed 7 weeks ago by nickm

Resolution: fixed
Status: needs_reviewclosed
Note: See TracTickets for help on using tickets.