xgo icon indicating copy to clipboard operation
xgo copied to clipboard

windows: missing Secure Template Overloads

Open tamird opened this issue 9 years ago • 1 comments

Fixed upstream: https://sourceforge.net/p/mingw-w64/mingw-w64/ci/6ec4fb2d8c1b1abfd5aca69c382c24feb6961342/

xgo --targets=windows-6.0/amd64 --go=1.6.2 github.com/cockroachdb/cockroach
Checking docker installation...
Client:
 Version:      1.11.1
 API version:  1.23
 Go version:   go1.6.2
 Git commit:   5604cbe
 Built:        Wed Apr 27 15:27:26 UTC 2016
 OS/Arch:      darwin/amd64

Server:
 Version:      1.11.1
 API version:  1.23
 Go version:   go1.5.4
 Git commit:   5604cbe
 Built:        Wed Apr 27 00:34:20 2016
 OS/Arch:      linux/amd64

Cross compiling github.com/cockroachdb/cockroach...
Building locally github.com/cockroachdb/cockroach...
Compiling for windows-6.0/amd64...
# github.com/cockroachdb/c-rocksdb
In file included from internal/util/iostats_context_imp.h:7:0,
                 from ../c-rocksdb/internal_util_iostats_context.cc:8:
internal/include/rocksdb/iostats_context.h:51:42: warning: 'thread' attribute directive ignored [-Wattributes]
 extern __declspec(thread) IOStatsContext iostats_context;
                                          ^
# github.com/cockroachdb/c-rocksdb
In file included from internal/util/perf_context_imp.h:7:0,
                 from ../c-rocksdb/internal_util_perf_context.cc:8:
internal/include/rocksdb/perf_context.h:99:39: warning: 'thread' attribute directive ignored [-Wattributes]
 extern __declspec(thread) PerfContext perf_context;
                                       ^
# github.com/cockroachdb/c-rocksdb
In file included from internal/util/iostats_context_imp.h:7:0,
                 from internal/port/win/win_logger.cc:24,
                 from ../c-rocksdb/logger_platform.cpp:2:
internal/include/rocksdb/iostats_context.h:51:42: warning: 'thread' attribute directive ignored [-Wattributes]
 extern __declspec(thread) IOStatsContext iostats_context;
                                          ^
# github.com/cockroachdb/c-rocksdb
In file included from ../c-rocksdb/port_platform.cc:4:0:
internal/port/win/port_win.cc: In function 'rocksdb::port::DIR* rocksdb::port::opendir(const char*)':
internal/port/win/port_win.cc:142:73: error: invalid conversion from 'char*' to 'size_t {aka long long unsigned int}' [-fpermissive]
   strncpy_s(dir->entry_.d_name, dir->data_.name, strlen(dir->data_.name));
                                                                         ^
internal/port/win/port_win.cc:142:72: error: invalid conversion from 'size_t {aka long long unsigned int}' to 'const char*' [-fpermissive]
   strncpy_s(dir->entry_.d_name, dir->data_.name, strlen(dir->data_.name));
                                                                        ^
internal/port/win/port_win.cc:142:73: error: too few arguments to function 'errno_t strncpy_s(char*, size_t, const char*, size_t)'
   strncpy_s(dir->entry_.d_name, dir->data_.name, strlen(dir->data_.name));
                                                                         ^
In file included from /usr/share/mingw-w64/include/string.h:180:0,
                 from /usr/share/mingw-w64/include/guiddef.h:148,
                 from /usr/share/mingw-w64/include/winnt.h:628,
                 from /usr/share/mingw-w64/include/minwindef.h:163,
                 from /usr/share/mingw-w64/include/windef.h:8,
                 from /usr/share/mingw-w64/include/windows.h:69,
                 from internal/port/win/port_win.h:24,
                 from internal/port/win/port_win.cc:14,
                 from ../c-rocksdb/port_platform.cc:4:
/usr/share/mingw-w64/include/sec_api/string_s.h:30:27: note: declared here
   _CRTIMP errno_t __cdecl strncpy_s(char *_Dst,size_t _DstSizeInChars,const char *_Src,size_t _MaxCount);
                           ^
In file included from ../c-rocksdb/port_platform.cc:4:0:
internal/port/win/port_win.cc: In function 'rocksdb::port::dirent* rocksdb::port::readdir(rocksdb::port::DIR*)':
internal/port/win/port_win.cc:164:76: error: invalid conversion from 'char*' to 'size_t {aka long long unsigned int}' [-fpermissive]
   strncpy_s(dirp->entry_.d_name, dirp->data_.name, strlen(dirp->data_.name));
                                                                            ^
internal/port/win/port_win.cc:164:75: error: invalid conversion from 'size_t {aka long long unsigned int}' to 'const char*' [-fpermissive]
   strncpy_s(dirp->entry_.d_name, dirp->data_.name, strlen(dirp->data_.name));
                                                                           ^
internal/port/win/port_win.cc:164:76: error: too few arguments to function 'errno_t strncpy_s(char*, size_t, const char*, size_t)'
   strncpy_s(dirp->entry_.d_name, dirp->data_.name, strlen(dirp->data_.name));
                                                                            ^
In file included from /usr/share/mingw-w64/include/string.h:180:0,
                 from /usr/share/mingw-w64/include/guiddef.h:148,
                 from /usr/share/mingw-w64/include/winnt.h:628,
                 from /usr/share/mingw-w64/include/minwindef.h:163,
                 from /usr/share/mingw-w64/include/windef.h:8,
                 from /usr/share/mingw-w64/include/windows.h:69,
                 from internal/port/win/port_win.h:24,
                 from internal/port/win/port_win.cc:14,
                 from ../c-rocksdb/port_platform.cc:4:
/usr/share/mingw-w64/include/sec_api/string_s.h:30:27: note: declared here
   _CRTIMP errno_t __cdecl strncpy_s(char *_Dst,size_t _DstSizeInChars,const char *_Src,size_t _MaxCount);
                           ^
2016/05/26 15:19:18 Failed to cross compile package: exit status 2.

tamird avatar May 26 '16 20:05 tamird

Is it possible to pick up a new version of mingw64 in the docker images? Looks like there have been a number of releases since my fix.

tamird avatar Oct 21 '16 21:10 tamird