It is fixed in my branch. I updated docs to use ./src/Native/build-native.sh directly. That should avoid problems with getting tools.
Tomas On 9/19/17, 10:18 PM, "owner-freebsd-m...@freebsd.org on behalf of Russell Haley" <owner-freebsd-m...@freebsd.org on behalf of russ.ha...@gmail.com> wrote: On Tue, Sep 19, 2017 at 10:11 PM, Tomas Weinfurt <tomas.weinf...@microsoft.com> wrote: > I’ll take a look. Once you on path where it tries to install Tools it is bad. > Please try src/Native/build-native.sh directly. Okay, that started things in the right direction: russellh@prescott:/storage/russellh/Git/corefx/src/Native% ./build-native.sh Setting up directories for build WARNING: Can not determine runtime id for current distro. Checking pre-requisites... Commencing build of corefx native components for FreeBSD.x64.Debug Invoking cmake with arguments: "/storage/russellh/Git/corefx/src/Native/Unix" DEBUG -DFEATURE_DISTRO_AGNOSTIC_SSL=0 -DCMAKE_STATIC_LIB_LINK=0 -- The C compiler identification is Clang 4.0.0 -- The CXX compiler identification is Clang 4.0.0 -- Check for working C compiler: /usr/bin/clang -- Check for working C compiler: /usr/bin/clang -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/clang++ -- Check for working CXX compiler: /usr/bin/clang++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for include file linux/in.h -- Looking for include file linux/in.h - not found -- Performing Test HAVE_IN_PKTINFO -- Performing Test HAVE_IN_PKTINFO - Success -- Performing Test HAVE_IP_MREQN -- Performing Test HAVE_IP_MREQN - Success -- Performing Test HAVE_FLOCK64 -- Performing Test HAVE_FLOCK64 - Failed -- Looking for lseek64 -- Looking for lseek64 - not found -- Looking for mmap64 -- Looking for mmap64 - not found -- Looking for ftruncate64 -- Looking for ftruncate64 - not found -- Looking for posix_fadvise64 -- Looking for posix_fadvise64 - not found -- Looking for stat64 -- Looking for stat64 - not found -- Looking for pipe2 -- Looking for pipe2 - found -- Looking for getmntinfo -- Looking for getmntinfo - found -- Looking for strcpy_s -- Looking for strcpy_s - not found -- Looking for strlcpy -- Looking for strlcpy - found -- Looking for posix_fadvise -- Looking for posix_fadvise - found -- Looking for ioctl -- Looking for ioctl - found -- Looking for sched_getaffinity -- Looking for sched_getaffinity - not found -- Looking for sched_setaffinity -- Looking for sched_setaffinity - not found -- Looking for TIOCGWINSZ -- Looking for TIOCGWINSZ - found -- Looking for tcgetattr -- Looking for tcgetattr - found -- Looking for tcsetattr -- Looking for tcsetattr - found -- Looking for ECHO -- Looking for ECHO - found -- Looking for ICANON -- Looking for ICANON - found -- Looking for TCSANOW -- Looking for TCSANOW - found -- Performing Test HAVE_STAT_BIRTHTIME -- Performing Test HAVE_STAT_BIRTHTIME - Success -- Performing Test HAVE_DIRENT_NAME_LEN -- Performing Test HAVE_DIRENT_NAME_LEN - Success -- Performing Test HAVE_STATFS_FSTYPENAME -- Performing Test HAVE_STATFS_FSTYPENAME - Success -- Performing Test HAVE_STATVFS_FSTYPENAME -- Performing Test HAVE_STATVFS_FSTYPENAME - Failed -- Check size of struct statfs -- Check size of struct statfs - done -- Performing Test HAVE_GNU_STRERROR_R -- Performing Test HAVE_GNU_STRERROR_R - Failed -- Performing Test HAVE_READDIR_R -- Performing Test HAVE_READDIR_R - Success -- Performing Test KEVENT_HAS_VOID_UDATA -- Performing Test KEVENT_HAS_VOID_UDATA - Success -- Performing Test HAVE_FDS_BITS -- Performing Test HAVE_FDS_BITS - Success -- Performing Test HAVE_PRIVATE_FDS_BITS -- Performing Test HAVE_PRIVATE_FDS_BITS - Success -- Performing Test HAVE_SENDFILE_4 -- Performing Test HAVE_SENDFILE_4 - Failed -- Performing Test HAVE_SENDFILE_6 -- Performing Test HAVE_SENDFILE_6 - Failed -- Looking for fcopyfile -- Looking for fcopyfile - not found -- Looking for epoll_create1 -- Looking for epoll_create1 - not found -- Looking for accept4 -- Looking for accept4 - found -- Looking for kqueue -- Looking for kqueue - found -- Performing Test HAVE_GETHOSTBYADDR_R -- Performing Test HAVE_GETHOSTBYADDR_R - Success -- Performing Test HAVE_GETHOSTBYNAME_R -- Performing Test HAVE_GETHOSTBYNAME_R - Success -- Performing Test HAVE_GETNAMEINFO_SIGNED_FLAGS -- Performing Test HAVE_GETNAMEINFO_SIGNED_FLAGS - Success -- Performing Test HAVE_CLOCK_MONOTONIC -- Performing Test HAVE_CLOCK_MONOTONIC - Success -- Performing Test HAVE_CLOCK_REALTIME -- Performing Test HAVE_CLOCK_REALTIME - Success -- Looking for mach_absolute_time -- Looking for mach_absolute_time - not found -- Looking for mach_timebase_info -- Looking for mach_timebase_info - not found -- Looking for futimes -- Looking for futimes - found -- Looking for futimens -- Looking for futimens - found -- Performing Test BIND_ADDRLEN_UNSIGNED -- Performing Test BIND_ADDRLEN_UNSIGNED - Success -- Performing Test IPV6MR_INTERFACE_UNSIGNED -- Performing Test IPV6MR_INTERFACE_UNSIGNED - Success -- Performing Test INOTIFY_RM_WATCH_WD_UNSIGNED -- Performing Test INOTIFY_RM_WATCH_WD_UNSIGNED - Failed -- Performing Test HAVE_SHM_OPEN_THAT_WORKS_WELL_ENOUGH_WITH_MMAP -- Performing Test HAVE_SHM_OPEN_THAT_WORKS_WELL_ENOUGH_WITH_MMAP - Success -- Checking prototype getpriority for PRIORITY_REQUIRES_INT_WHO - True -- Checking prototype kevent for KEVENT_REQUIRES_INT_PARAMS - True -- Performing Test HAVE_MKSTEMPS -- Performing Test HAVE_MKSTEMPS - Success -- Performing Test HAVE_MKSTEMP -- Performing Test HAVE_MKSTEMP - Success -- Performing Test HAVE_TCP_VAR_H -- Performing Test HAVE_TCP_VAR_H - Failed -- Looking for include file sys/cdefs.h -- Looking for include file sys/cdefs.h - found -- Performing Test HAVE_TCP_H_TCPSTATE_ENUM -- Performing Test HAVE_TCP_H_TCPSTATE_ENUM - Failed -- Looking for TCPS_ESTABLISHED -- Looking for TCPS_ESTABLISHED - found -- Performing Test HAVE_RT_MSGHDR -- Performing Test HAVE_RT_MSGHDR - Failed -- Looking for include file sys/sysctl.h -- Looking for include file sys/sysctl.h - not found -- Looking for include file linux/rtnetlink.h -- Looking for include file linux/rtnetlink.h - not found -- Looking for getpeereid -- Looking for getpeereid - found -- Looking for getdomainname -- Looking for getdomainname - found -- Looking for uname -- Looking for uname - found -- Performing Test HAVE_GETDOMAINNAME_SIZET -- Performing Test HAVE_GETDOMAINNAME_SIZET - Failed -- Looking for inotify_init -- Looking for inotify_init - not found -- Looking for inotify_add_watch -- Looking for inotify_add_watch - not found -- Looking for inotify_rm_watch -- Looking for inotify_rm_watch - not found -- Performing Test HAVE_CURLM_ADDED_ALREADY -- Performing Test HAVE_CURLM_ADDED_ALREADY - Failed -- Performing Test HAVE_CURL_HTTP_VERSION_2_0 -- Performing Test HAVE_CURL_HTTP_VERSION_2_0 - Failed -- Performing Test HAVE_CURLPIPE_MULTIPLEX -- Performing Test HAVE_CURLPIPE_MULTIPLEX - Failed -- Performing Test HAVE_CURL_SSLVERSION_TLSv1_012 -- Performing Test HAVE_CURL_SSLVERSION_TLSv1_012 - Failed -- Looking for include file GSS/GSS.h -- Looking for include file GSS/GSS.h - not found -- Looking for GSS_SPNEGO_MECHANISM -- Looking for GSS_SPNEGO_MECHANISM - not found -- Looking for GSS_KRB5_CRED_NO_CI_FLAGS_X -- Looking for GSS_KRB5_CRED_NO_CI_FLAGS_X - not found -- Looking for include file crt_externs.h -- Looking for include file crt_externs.h - not found -- Performing Test HAVE_IN_EXCL_UNLINK -- Performing Test HAVE_IN_EXCL_UNLINK - Failed -- Found ZLIB: /usr/lib/libz.so (found version "1.2.11") -- Found CURL: /usr/local/lib/libcurl.so (found version "7.54.0") -- Found OpenSSL: /usr/local/lib/libssl.so (found version "2.0.0") -- Looking for TLSv1_1_method in /usr/local/lib/libssl.so -- Looking for TLSv1_1_method in /usr/local/lib/libssl.so - found -- Looking for TLSv1_2_method in /usr/local/lib/libssl.so -- Looking for TLSv1_2_method in /usr/local/lib/libssl.so - found -- Looking for EC_GF2m_simple_method -- Looking for EC_GF2m_simple_method - found -- Configuring done -- Generating done -- Build files have been written to: /storage/russellh/Git/corefx/bin/obj/FreeBSD.x64.Debug/native Executing make install -j 1 Scanning dependencies of target System.IO.Compression.Native [ 1%] Building CXX object System.IO.Compression.Native/CMakeFiles/System.IO.Compression.Native.dir/pal_zlib.cpp.o [ 2%] Building C object System.IO.Compression.Native/CMakeFiles/System.IO.Compression.Native.dir/storage/russellh/Git/corefx/bin/obj/version.c.o [ 3%] Linking CXX shared library System.IO.Compression.Native.so [ 3%] Built target System.IO.Compression.Native Scanning dependencies of target System.Native-Static [ 5%] Building CXX object System.Native/CMakeFiles/System.Native-Static.dir/pal_console.cpp.o [ 6%] Building CXX object System.Native/CMakeFiles/System.Native-Static.dir/pal_errno.cpp.o [ 7%] Building CXX object System.Native/CMakeFiles/System.Native-Static.dir/pal_interfaceaddresses.cpp.o [ 8%] Building CXX object System.Native/CMakeFiles/System.Native-Static.dir/pal_io.cpp.o [ 10%] Building CXX object System.Native/CMakeFiles/System.Native-Static.dir/pal_maphardwaretype.cpp.o [ 11%] Building CXX object System.Native/CMakeFiles/System.Native-Static.dir/pal_memory.cpp.o [ 12%] Building CXX object System.Native/CMakeFiles/System.Native-Static.dir/pal_mount.cpp.o [ 13%] Building CXX object System.Native/CMakeFiles/System.Native-Static.dir/pal_networking.cpp.o /storage/russellh/Git/corefx/src/Native/Unix/System.Native/pal_networking.cpp:1163:45: error: unknown type name 'in_pktinfo'; did you mean 'in6_pktinfo'? return (isIPv4 != 0 ? CMSG_SPACE(sizeof(in_pktinfo)) : 0) + (isIPv6 != 0 ? CMSG_SPACE(sizeof(in6_pktinfo)) : 0); ^~~~~~~~~~ in6_pktinfo /usr/include/sys/socket.h:542:65: note: expanded from macro 'CMSG_SPACE' #define CMSG_SPACE(l) (_ALIGN(sizeof(struct cmsghdr)) + _ALIGN(l)) ^ /usr/include/x86/_align.h:50:35: note: expanded from macro '_ALIGN' #define _ALIGN(p) (((__uintptr_t)(p) + _ALIGNBYTES) & ~_ALIGNBYTES) ^ /usr/include/netinet6/in6.h:549:8: note: 'in6_pktinfo' declared here struct in6_pktinfo { ^ /storage/russellh/Git/corefx/src/Native/Unix/System.Native/pal_networking.cpp:1171:43: error: unknown type name 'in_pktinfo'; did you mean 'in6_pktinfo'? if (controlMessage->cmsg_len < sizeof(in_pktinfo)) ^~~~~~~~~~ in6_pktinfo /usr/include/netinet6/in6.h:549:8: note: 'in6_pktinfo' declared here struct in6_pktinfo { ^ /storage/russellh/Git/corefx/src/Native/Unix/System.Native/pal_networking.cpp:1177:38: error: unknown type name 'in_pktinfo'; did you mean 'in6_pktinfo'? auto* pktinfo = reinterpret_cast<in_pktinfo*>(CMSG_DATA(controlMessage)); ^~~~~~~~~~ in6_pktinfo /usr/include/netinet6/in6.h:549:8: note: 'in6_pktinfo' declared here struct in6_pktinfo { ^ /storage/russellh/Git/corefx/src/Native/Unix/System.Native/pal_networking.cpp:1178:99: error: no member named 'ipi_addr' in 'in6_pktinfo' ConvertInAddrToByteArray(&packetInfo->Address.Address[0], NUM_BYTES_IN_IPV4_ADDRESS, pktinfo->ipi_addr); ~~~~~~~ ^ /storage/russellh/Git/corefx/src/Native/Unix/System.Native/pal_networking.cpp:1180:64: error: no member named 'ipi_ifindex' in 'in6_pktinfo'; did you mean 'ipi6_ifindex'? packetInfo->InterfaceIndex = static_cast<int32_t>(pktinfo->ipi_ifindex); ^~~~~~~~~~~ ipi6_ifindex /usr/include/netinet6/in6.h:551:15: note: 'ipi6_ifindex' declared here unsigned int ipi6_ifindex; /* send/recv interface index */ ^ /storage/russellh/Git/corefx/src/Native/Unix/System.Native/pal_networking.cpp:1248:90: error: use of undeclared identifier 'IP_PKTINFO' if (controlMessage->cmsg_level == IPPROTO_IP && controlMessage->cmsg_type == IP_PKTINFO) ^ /storage/russellh/Git/corefx/src/Native/Unix/System.Native/pal_networking.cpp:1954:31: error: use of undeclared identifier 'IP_PKTINFO' optName = IP_PKTINFO; ^ 7 errors generated. *** [System.Native/CMakeFiles/System.Native-Static.dir/pal_networking.cpp.o] Error code 1 make[2]: stopped in /storage/russellh/Git/corefx/bin/obj/FreeBSD.x64.Debug/native 1 error make[2]: stopped in /storage/russellh/Git/corefx/bin/obj/FreeBSD.x64.Debug/native *** [System.Native/CMakeFiles/System.Native-Static.dir/all] Error code 2 make[1]: stopped in /storage/russellh/Git/corefx/bin/obj/FreeBSD.x64.Debug/native 1 error make[1]: stopped in /storage/russellh/Git/corefx/bin/obj/FreeBSD.x64.Debug/native *** [all] Error code 2 make: stopped in /storage/russellh/Git/corefx/bin/obj/FreeBSD.x64.Debug/native 1 error make: stopped in /storage/russellh/Git/corefx/bin/obj/FreeBSD.x64.Debug/native Failed to build corefx native components. russellh@prescott:/storage/russellh/Git/corefx/src/Native% Looks like there is a missing struct that is in Windows and Linux. in_pktinfo? https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Farchives%2Fgstreamer-bugs%2F2016-July%2F180624.html&data=02%7C01%7CTomas.Weinfurt%40microsoft.com%7C36ff54be5d2947fbfb8908d4ffe7096a%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636414815146425625&sdata=GuzVbw%2FXTA2LBQfXdFb5NEr1vxF6ymThLFr5hwb3qHc%3D&reserved=0 > Tomas > > On 9/19/17, 10:07 PM, "Russell Haley" <russ.ha...@gmail.com> wrote: > > Hey Tomas, > > coreclr native parts built first time for me. I am trying to build the > dotnet fx native parts and I'm still stalled out on Linux emulation > errors. I have a question in the TrueOS forums and will poke around: > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdiscourse.trueos.org%2Ft%2Fexecuting-64-bit-linux-binaries%2F703%2F2&data=02%7C01%7CTomas.Weinfurt%40microsoft.com%7C3b720d481d9b4e70aceb08d4ffe57ac2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636414808455309694&sdata=us2YL%2F%2BjZg2xtSCtzDCrhRwGH3EqoTwPK8MWcazmNEo%3D&reserved=0 > > Here is my build output: > > russellh@prescott:/storage/russellh/Git/corefx% ./build.sh native > -clang=clang3.9 > Unsupported OS 'FreeBSD' detected. Downloading linux-x64 tools. > Installing dotnet cli... > Restoring BuildTools version 2.0.0-prerelease-01931-01... > ELF interpreter /lib64/ld-linux-x86-64.so.2 not found, error 2 > /storage/russellh/Git/corefx/init-tools.sh: line 142: 39789 Abort trap > $__DOTNET_CMD restore "$__INIT_TOOLS_RESTORE_PROJECT" > --no-cache --packages $__PACKAGES_DIR --source $__BUILDTOOLS_SOURCE > /p:BuildToolsPackageVersion=$__BUILD_TOOLS_PACKAGE_VERSION >> > $__init_tools_log > ERROR: Could not restore build tools correctly. > Please check the detailed log that follows. > Running: /storage/russellh/Git/corefx/init-tools.sh > Installing 'https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdotnetcli.azureedge.net%2Fdotnet%2FSdk%2F2.0.0-preview1-005977%2Fdotnet-dev-linux-x64.2.0.0-preview1-005977.tar.gz&data=02%7C01%7CTomas.Weinfurt%40microsoft.com%7C3b720d481d9b4e70aceb08d4ffe57ac2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636414808455309694&sdata=nmUCgZjM2kCcFAeFciTqw0mXOOAUO0qaIrJD0ODTSGM%3D&reserved=0' > to '/storage/russellh/Git/corefx/Tools/dotnetcli/dotnet.tar' > Running: /storage/russellh/Git/corefx/Tools/dotnetcli/dotnet restore > "/storage/russellh/Git/corefx/init-tools.msbuild" --no-cache > --packages /storage/russellh/Git/corefx/packages --source > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdotnet.myget.org%2FF%2Fdotnet-buildtools%2Fapi%2Fv3%2Findex.json&data=02%7C01%7CTomas.Weinfurt%40microsoft.com%7C3b720d481d9b4e70aceb08d4ffe57ac2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636414808455309694&sdata=uIeCnyr%2FTLSr%2FphUMAPJJ0AF3iKxzBMHD6YpOYBRSTw%3D&reserved=0 > /p:BuildToolsPackageVersion=2.0.0-prerelease-01931-01 > Initializing BuildTools... > chmod: /storage/russellh/Git/corefx/packages/microsoft.dotnet.buildtools/2.0.0-prerelease-01931-01/lib/init-tools.sh: > No such file or directory > /storage/russellh/Git/corefx/init-tools.sh: line 121: > /storage/russellh/Git/corefx/packages/microsoft.dotnet.buildtools/2.0.0-prerelease-01931-01/lib/init-tools.sh: > No such file or directory > ERROR: An error occurred when trying to initialize the tools. > Please check the detailed log that follows. > Running: /storage/russellh/Git/corefx/init-tools.sh > Installing 'https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdotnetcli.azureedge.net%2Fdotnet%2FSdk%2F2.0.0-preview1-005977%2Fdotnet-dev-linux-x64.2.0.0-preview1-005977.tar.gz&data=02%7C01%7CTomas.Weinfurt%40microsoft.com%7C3b720d481d9b4e70aceb08d4ffe57ac2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636414808455309694&sdata=nmUCgZjM2kCcFAeFciTqw0mXOOAUO0qaIrJD0ODTSGM%3D&reserved=0' > to '/storage/russellh/Git/corefx/Tools/dotnetcli/dotnet.tar' > Running: /storage/russellh/Git/corefx/Tools/dotnetcli/dotnet restore > "/storage/russellh/Git/corefx/init-tools.msbuild" --no-cache > --packages /storage/russellh/Git/corefx/packages --source > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdotnet.myget.org%2FF%2Fdotnet-buildtools%2Fapi%2Fv3%2Findex.json&data=02%7C01%7CTomas.Weinfurt%40microsoft.com%7C3b720d481d9b4e70aceb08d4ffe57ac2%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636414808455309694&sdata=uIeCnyr%2FTLSr%2FphUMAPJJ0AF3iKxzBMHD6YpOYBRSTw%3D&reserved=0 > /p:BuildToolsPackageVersion=2.0.0-prerelease-01931-01 > Running: /storage/russellh/Git/corefx/packages/microsoft.dotnet.buildtools/2.0.0-prerelease-01931-01/lib/init-tools.sh > /storage/russellh/Git/corefx > /storage/russellh/Git/corefx/Tools/dotnetcli/dotnet > /storage/russellh/Git/corefx/Tools > russellh@prescott:/storage/russellh/Git/corefx% > > > I tried building the mscorelib in monodevelop (and also tried xbuild) > but got the following error: > > Error: /storage/russellh/Git/coreclr/src/mscorlib/System.Private.CoreLib.csproj: > /storage/russellh/Git/coreclr/dir.targets: Project file could not be > imported, it was being imported by > /storage/russellh/Git/coreclr/src/mscorlib/System.Private.CoreLib.csproj: > /storage/russellh/Git/coreclr/dir.targets could not import > "$(ToolsDir)/Build.Common.targets" (System.Private.CoreLib)x > > A quick search showed something about wrong framework version. I > wonder if I should ping off the Xamarina/Mono team? > > Russ > > _______________________________________________ freebsd-mono@freebsd.org mailing list https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freebsd.org%2Fmailman%2Flistinfo%2Ffreebsd-mono&data=02%7C01%7CTomas.Weinfurt%40microsoft.com%7C36ff54be5d2947fbfb8908d4ffe7096a%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636414815146425625&sdata=SQRpsssMonN8lMdyhonFdQi1J%2BBgDaqSEWMOhXvj%2FKM%3D&reserved=0 To unsubscribe, send any mail to "freebsd-mono-unsubscr...@freebsd.org" _______________________________________________ freebsd-mono@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-mono To unsubscribe, send any mail to "freebsd-mono-unsubscr...@freebsd.org"