Opened 20 months ago

Closed 6 weeks ago

#20302 closed defect (fixed)

FTE compilation in our gitian setup is broken for Windows with GCC 6.2.0

Reported by: gk Owned by: kpdyer
Priority: High Milestone:
Component: Obfuscation/FTE Version:
Severity: Blocker Keywords: tbb-rbm, boklm201804, TorBrowserTeam201804R
Cc: dcf Actual Points:
Parent ID: #25420 Points:
Reviewer: Sponsor:

Description

After #13893 landed (bump mingw-w64 and GCC to 6.2.0) it turns out that FTE compilation is broken:

+ make
wine /home/ubuntu/install/python/python.exe setup.py build_ext -c mingw32
fixme:msvcrt:MSVCRT__wsopen_s : pmode 0x81b6 ignored
fixme:msvcrt:MSVCRT__wsopen_s : pmode 0x81b6 ignored
fixme:msvcrt:MSVCRT__wsopen_s : pmode 0x81b6 ignored
fixme:msvcrt:MSVCRT__wsopen_s : pmode 0x81b6 ignored
running build_ext
fixme:msvcrt:MSVCRT__wsopen_s : pmode 0x81b6 ignored
fixme:msvcrt:MSVCRT__wsopen_s : pmode 0x81b6 ignored
building 'fte.cDFA' extension
creating build
creating build\temp.win32-2.7
creating build\temp.win32-2.7\Release
creating build\temp.win32-2.7\Release\fte
C:\windows\gcc.exe -mno-cygwin -mdll -O -Wall -Ifte -Ithirdparty/gmp/include -IZ:\home\ubuntu\install\python\include -IZ:\home\ubuntu\install\python\PC -c fte/rank_unrank.cc -o build\temp.win32-2.7\Release\fte\rank_unrank.o -O3 -fPIC
Exception WindowsError: (6, 'Invalid handle') in <bound method Popen.__del__ of <subprocess.Popen object at 0x00159130>> ignored
C:\windows\gcc.exe -mno-cygwin -mdll -O -Wall -Ifte -Ithirdparty/gmp/include -IZ:\home\ubuntu\install\python\include -IZ:\home\ubuntu\install\python\PC -c fte/cDFA.cc -o build\temp.win32-2.7\Release\fte\cdfa.o -O3 -fPIC
In file included from /home/ubuntu/install/mingw-w64/i686-w64-mingw32/include/c++/6.2.0/math.h:36:0,
                 from /home/ubuntu/.wine/dosdevices/z:/home/ubuntu/install/python/include/pyport.h:325,
                 from /home/ubuntu/.wine/dosdevices/z:/home/ubuntu/install/python/include/Python.h:58,
                 from /home/ubuntu/.wine/dosdevices/z:/home/ubuntu/build/libfte/fte/cDFA.cc:1:
/home/ubuntu/install/mingw-w64/i686-w64-mingw32/include/c++/6.2.0/cmath:1133:11: error: '::hypot' has not been declared
   using ::hypot;
           ^~~~~
In file included from /home/ubuntu/.wine/dosdevices/z:/home/ubuntu/install/python/include/Python.h:80:0,
                 from /home/ubuntu/.wine/dosdevices/z:/home/ubuntu/build/libfte/fte/cDFA.cc:1:
/home/ubuntu/.wine/dosdevices/z:/home/ubuntu/build/libfte/fte/cDFA.cc: In function 'void initcDFA()':
/home/ubuntu/.wine/dosdevices/z:/home/ubuntu/install/python/include/object.h:767:22: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     ((PyObject*)(op))->ob_refcnt++)

                      ^
/home/ubuntu/.wine/dosdevices/z:/home/ubuntu/build/libfte/fte/cDFA.cc:273:5: note: in expansion of macro 'Py_INCREF'
     Py_INCREF(&DFAType);
     ^~~~~~~~~
Exception WindowsError: (6, 'Invalid handle') in <bound method Popen.__del__ of <subprocess.Popen object at 0x00159150>> ignored
error: command 'gcc' failed with exit status 1
fixme:msvcrt:__clean_type_info_names_internal (0x1d114810) stub
fixme:msvcrt:__clean_type_info_names_internal (0xa254f0) stub
fixme:msvcrt:__clean_type_info_names_internal (0x100d4460) stub
fixme:msvcrt:__clean_type_info_names_internal (0x42ba30) stub
fixme:msvcrt:__clean_type_info_names_internal (0x1e24c178) stub
make: *** [fte/cDFA.pyd] Error 1

Child Tickets

Change History (14)

comment:2 Changed 20 months ago by gk

Keywords: TorBrowserTeam201610R added
Status: newneeds_review

bug_20302 (https://gitweb.torproject.org/user/gk/tor-browser-bundle.git/commit/?h=bug_20302&id=8d47b8e5bd03239b3c4d4918102369ba2615f7b0) in my public tor-browser-bundle repo has a fix for this for review:

kpdyer: It would be neat if you could look over the patch to setup.py and merge it upstream if you think this is okay. In this case we'd just bump the libfte tag.

It seems that FTE is not working, though. It gets stuck at "Establishing an encrypted directory connection". That's probably a separate issue. Any ideas on how to debug this one?

comment:3 Changed 19 months ago by gk

Keywords: TorBrowserTeam201610 added; TorBrowserTeam201610R removed
Status: needs_reviewnew

Taking off the review queue as GCC 6 seems to be too unstable to use right now. See #20381 for further details.

comment:4 Changed 19 months ago by dcf

Cc: dcf added

comment:5 Changed 9 months ago by gk

Keywords: tbb-rbm added; tbb-gitian removed

Moving over to rbm

comment:6 Changed 3 months ago by boklm

Keywords: TorBrowserTeam201802 boklm201802 added; TorBrowserTeam201610 removed

comment:7 Changed 3 months ago by boklm

Parent ID: #25304

comment:8 Changed 3 months ago by boklm

Keywords: TorBrowserTeam201803 boklm201803 added; TorBrowserTeam201802 boklm201802 removed
Parent ID: #25304#25420

comment:9 Changed 7 weeks ago by boklm

Keywords: boklm201804 added; boklm201803 removed

boklm201803 -> boklm201804

comment:10 Changed 6 weeks ago by gk

Keywords: TorBrowserTeam201804 added; TorBrowserTeam201803 removed

Moving our tickets to April.

comment:11 Changed 6 weeks ago by gk

Priority: Very HighHigh

comment:12 Changed 6 weeks ago by boklm

Keywords: TorBrowserTeam201804R added; TorBrowserTeam201804 removed
Status: newneeds_review

comment:13 Changed 6 weeks ago by boklm

I don't know if merging this patch to https://github.com/kpdyer/libfte will be possible soon. If not, the branch bug_20302 is adding the patch in tor-browser-build:
https://gitweb.torproject.org/user/boklm/tor-browser-build.git/commit/?h=bug_20302&id=8e21b3462302b724aabae24f32b1a7329a32b06a

comment:14 Changed 6 weeks ago by gk

Resolution: fixed
Status: needs_reviewclosed

Looks good and applied to master (commit 8e21b3462302b724aabae24f32b1a7329a32b06a).

Note: See TracTickets for help on using tickets.