Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#5704 closed defect (fixed)

tor 0.2.3.14-alpha doesn't build with --enable-gcc-warnings on Windows

Reported by: erinn Owned by:
Priority: Medium Milestone: Tor: 0.2.3.x-final
Component: Core Tor/Tor Version:
Severity: Keywords: tor-client
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Here's the relevant portion from the build log:

mv -f .deps/address.Tpo .deps/address.Po
gcc -DHAVE_CONFIG_H -I. -I../..   -I../../src/common -I/c/Users/erinn/build-scri
pts.git/osx-bundles/build-alpha/lib -I/c/Users/erinn/build-scripts.git/osx-bundl
es/build-alpha/lib -I/c/Users/erinn/build-scripts.git/osx-bundles/build-alpha/li
b  -O -g -I/c/Users/erinn/build-scripts.git/osx-bundles/build-alpha/include -Wal
l -fno-strict-aliasing -W -Wfloat-equal -Wundef -Wpointer-arith -Wstrict-prototy
pes -Wmissing-prototypes -Wwrite-strings -Wredundant-decls -Wchar-subscripts -Wc
omment -Wformat=2 -Wwrite-strings -Wmissing-declarations -Wredundant-decls -Wnes
ted-externs -Wbad-function-cast -Wswitch-enum -Werror -Winit-self -Wmissing-fiel
d-initializers -Wdeclaration-after-statement -Wold-style-definition -Waddress -W
missing-noreturn -Wstrict-overflow=1 -Wnormalized=id -Woverride-init -Wextra -Wa
rray-bounds -MT compat.o -MD -MP -MF .deps/compat.Tpo -c -o compat.o compat.c
cc1.exe: warnings being treated as errors
compat.c:1672:1: error: function declaration isn't a prototype
compat.c:1672:15: error: redundant redeclaration of '__p__environ'
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/stdlib.h:149:51: note:
 previous declaration of '__p__environ' was here
make[4]: *** [compat.o] Error 1

Child Tickets

Change History (14)

comment:1 Changed 8 years ago by erinn

Summary: tor 0.2.3.14-alpha doesn't build with --enable-gcc-warnings on Windowstor 0.2.3.14-alpha doesn't build on Windows

Sorry, I was mistaken, this doesn't build at all. This is without --enable-gcc-warnings:

gcc -DHAVE_CONFIG_H -I. -I../..  -DSHARE_DATADIR="\"/c/Users/erinn/build-scripts
.git/osx-bundles/build-alpha/share\"" -DLOCALSTATEDIR="\"/c/Users/erinn/build-sc
ripts.git/osx-bundles/build-alpha/var\"" -DBINDIR="\"/c/Users/erinn/build-script
s.git/osx-bundles/build-alpha/bin\"" -I"../../src/or" -I../../src/common -I/c/Us
ers/erinn/build-scripts.git/osx-bundles/build-alpha/lib -I/c/Users/erinn/build-s
cripts.git/osx-bundles/build-alpha/lib -I/c/Users/erinn/build-scripts.git/osx-bu
ndles/build-alpha/lib  -O -g -I/c/Users/erinn/build-scripts.git/osx-bundles/buil
d-alpha/include -Wall -fno-strict-aliasing -MT test_util.o -MD -MP -MF .deps/tes
t_util.Tpo -c -o test_util.o test_util.c
test_util.c: In function 'test_util_expand_filename':
test_util.c:549:3: warning: implicit declaration of function 'setenv'
test_util.c:622:3: warning: implicit declaration of function 'unsetenv'
test_util.c: In function 'test_util_listdir':
test_util.c:1932:3: error: too many arguments to function 'mkdir'
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/io.h:302:37: note: dec
lared here
make[4]: *** [test_util.o] Error 1

comment:2 Changed 8 years ago by rransom

Milestone: Tor: 0.2.3.x-final
Resolution: fixed
Status: newclosed
Summary: tor 0.2.3.14-alpha doesn't build on Windowstor 0.2.3.14-alpha test suite fails on Windows

Already fixed in commit 9dddfe83f3041e1504d2def5622633eb59a9756f. Either skip the test suite for this build, or make arma tag and tar another release.

comment:3 Changed 8 years ago by rransom

Resolution: fixed
Status: closedreopened

Er, no. That was about the failure you mentioned in comment 1.

comment:4 Changed 8 years ago by rransom

Summary: tor 0.2.3.14-alpha test suite fails on Windowstor 0.2.3.14-alpha doesn't build with --enable-gcc-warnings on Windows

Changing the ticket name back to describe the bug in the ticket description; comment 1 was something entirely different.

comment:5 Changed 8 years ago by rransom

The bugfix will be on commit bc66878bdea0250991fc99b2d023146f67a6f4bb (released in tag tor-0.2.3.13-alpha), which apparently should have included stdlib.h in its autoconf test program for the sake of MinGW's non-POSIX-conformance.

comment:6 Changed 8 years ago by nickm

I think the problem might also be that windows doesn't have unistd.h, but that test wants it. Yay autoconf: so much fun.

comment:7 Changed 8 years ago by nickm

Status: reopenedneeds_review

Fix in branch "bug5704" in my public repository. There are two commits there; 6156403237fc1775a55 is the one you would want to cherry-pick to make Tor compile. The other one is just an identifier fixup.

comment:8 Changed 8 years ago by arma

Nick's patch looks plausible. Having somebody try it on Windows would clearly be useful though. :)

Erinn, should we be putting out an 0.2.3.15-alpha to include this fix and the various other cross-compiling fixes Nick put in over the past week, or is it simpler for you just to cherry-pick the one commit?

comment:9 Changed 8 years ago by Sebastian

Cherry-picking is always a pain

comment:10 Changed 8 years ago by erinn

nick -- I tested the fix and it works.

arma -- A new release would be better. How much trouble would it be to get it out?

comment:11 Changed 8 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Looks like somebody (arma?) merged this.

comment:12 in reply to:  10 Changed 8 years ago by arma

Replying to erinn:

nick -- I tested the fix and it works.

Merged.

arma -- A new release would be better. How much trouble would it be to get it out?

Tor 0.2.3.15-alpha is now out.

comment:13 Changed 8 years ago by nickm

Keywords: tor-client added

comment:14 Changed 8 years ago by nickm

Component: Tor ClientTor
Note: See TracTickets for help on using tickets.