Opened 3 years ago

Closed 2 years ago

#21710 closed task (fixed)

Upgrade Go to 1.8.1

Reported by: dcf Owned by: tbb-team
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: tbb-gitian TorBrowserTeam201704R
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description (last modified by dcf)

Note:

Go 1.8 now only supports OS X 10.8 or later. This is likely the last Go release to support 10.8. Compiling Go or running binaries on older OS X versions is untested.

See also #21709 for Go 1.7.5. I'm going to test a 1.7.5 patch before working on 1.8.

Child Tickets

Change History (13)

comment:1 Changed 3 years ago by dcf

Go 1.8 fixes GH#15457, which means we can remove the workaround introduced for 1.6.2.

comment:2 in reply to:  description Changed 3 years ago by dcf

Replying to dcf:

Note:

Go 1.8 now only supports OS X 10.8 or later. This is likely the last Go release to support 10.8. Compiling Go or running binaries on older OS X versions is untested.

Ticket about dropping support for OS X 10.6, 10.7, 10.8 in Tor Browser: #18530.

comment:3 Changed 2 years ago by dcf

Description: modified (diff)
Summary: Upgrade Go to 1.8Upgrade Go to 1.8.1

Changed 2 years ago by dcf

comment:4 Changed 2 years ago by dcf

Keywords: TorBrowserTeam201704R added
Status: newneeds_review

Hi, two patches for review:

There's no tag of sandboxed-tor-browser that has the Go 1.8 fix yet (the first patch). I don't know if you want to wait for a new tag before merging this.

I tested this with make alpha on top of bug_21753_v3 from #21753. I only tested running it on linux-amd64 (bootstrapping with obfs4).

comment:5 Changed 2 years ago by gk

Yes, I think we wait for a new tag. I am a bit confused about your commit message (just nits):

1) "Remove workarounds for fixed upstream bug" <- it seems you are removing just one and not several in your patch?
2) "I wasn't able to remove the cc-for-target workaround for GitHub been fixed" <- I have a hard time understanding that one.

comment:6 in reply to:  5 Changed 2 years ago by dcf

Replying to gk:

Yes, I think we wait for a new tag. I am a bit confused about your commit message (just nits):

1) "Remove workarounds for fixed upstream bug" <- it seems you are removing just one and not several in your patch?
2) "I wasn't able to remove the cc-for-target workaround for GitHub been fixed" <- I have a hard time understanding that one.

Sorry, there were some errors in the commit message. I'll paste the long error output here and shorten the log message.


Despite https://github.com/golang/go/issues/15457 supposedly being fixed, make.bash says:

echo '##### Building packages and commands for darwin/amd64.'
CC='/home/debian/build/clang/bin/clang -target x86_64-apple-darwin10 -mlinker-version=136 -B /home/debian/build/cctools/bin -isysroot /home/debian/build/MacOSX10.7.sdk -std=gnu99' /home/debian/build/go/pkg/tool/linux_amd64/go_bootstrap install -gcflags '' -ldflags '' -v std cmd

it ends up running something that discards all the options:

cd /home/debian/build/go/src/plugin
CGO_LDFLAGS="-g" "-O2" /home/debian/build/go/pkg/tool/linux_amd64/cgo -objdir $WORK/plugin/_obj/ -importpath plugin -- -I $WORK/plugin/_obj/ -g -O2 plugin_dlopen.go
/home/debian/build/clang/bin/clang -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -gno-record-gcc-switches -fno-common -I $WORK/plugin/_obj/ -g -O2 -o $WORK/plugin/_obj/_cgo_export.o -c $WORK/plugin/_obj/_cgo_export.c
/home/debian/build/clang/bin/clang -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -gno-record-gcc-switches -fno-common -I $WORK/plugin/_obj/ -g -O2 -o $WORK/plugin/_obj/plugin_dlopen.cgo2.o -c $WORK/plugin/_obj/plugin_dlopen.cgo2.c
/home/debian/build/clang/bin/clang -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -gno-record-gcc-switches -fno-common -I $WORK/plugin/_obj/ -g -O2 -o $WORK/plugin/_obj/_cgo_main.o -c $WORK/plugin/_obj/_cgo_main.c
/home/debian/build/clang/bin/clang -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -gno-record-gcc-switches -fno-common -o $WORK/plugin/_obj/_cgo_.o $WORK/plugin/_obj/_cgo_main.o $WORK/plugin/_obj/_cgo_export.o $WORK/plugin/_obj/plugin_dlopen.cgo2.o -g -O2

and fails with these errors:

/tmp/go-build417206360/plugin/_obj/plugin_dlopen.cgo2.o: In function `_cgo_e64586f1776f_Cfunc_pluginLookup':
/tmp/go-build417206360/plugin/_obj/plugin_dlopen.cgo2.c:(.text+0x2f): undefined reference to `dlsym'
/tmp/go-build417206360/plugin/_obj/plugin_dlopen.cgo2.c:(.text+0x3c): undefined reference to `dlerror'
/tmp/go-build417206360/plugin/_obj/plugin_dlopen.cgo2.o: In function `_cgo_e64586f1776f_Cfunc_pluginOpen':
/tmp/go-build417206360/plugin/_obj/plugin_dlopen.cgo2.c:(.text+0x80): undefined reference to `dlopen'
/tmp/go-build417206360/plugin/_obj/plugin_dlopen.cgo2.c:(.text+0x8d): undefined reference to `dlerror'
clang: error: linker command failed with exit code 1 (use -v to see invocation)

comment:7 Changed 2 years ago by dcf

sandboxed-tor-browser has a 0.0.5 patch now, and I was able to do a complete build for all platforms and test obfs4 bootstrap on linux-amd64. I applied these patches on top of 1942f7b2f6. I additionally applied attachment:0001-Ignore-dump_syms_regtest.o.patch:ticket:21954 (which has already been merged to master) to fix the webrtc error of #21954.

comment:8 Changed 2 years ago by gk

Resolution: fixed
Status: needs_reviewclosed

Thanks. FWIW: I picked patch.2 as I had trouble to get patch.3 to apply. While reviewing the differences it seemed to me they were Go unrelated and thus picking patch.2 should be fine. This is commit 9d546f20ae711e7df9c574d9bdfccf34ddf1b650 on master.

Note: See TracTickets for help on using tickets.