Repository navigation
PROCFS_MEM_NAME undefined on FreeBSD #6352
Description
FreeBSD 10.3, coreclr throws during compile:
/home/dotnet/coreclr2/src/pal/src/debug/debug.cpp:1399:66: error: use of undeclared identifier 'PROCFS_MEM_NAME' snprintf(memPath, sizeof(memPath), "/proc/%u/%s", processId, PROCFS_MEM_NAME); ^ /home/dotnet/coreclr2/src/pal/src/debug/debug.cpp:1674:66: error: use of undeclared identifier 'PROCFS_MEM_NAME' snprintf(memPath, sizeof(memPath), "/proc/%u/%s", processId, PROCFS_MEM_NAME);
procfs is mounted.
I think it was working about month ago.
Problem is that HAVE_PROCFS_CTL is set to 1, but the test should fail:
Performing C++ SOURCE FILE Test HAVE_PROCFS_CTL succeeded with the following output:
Change Dir: /home/dotnet/coreclr2/bin/obj/FreeBSD.x64.Debug/CMakeFiles/CMakeTmp
Run Build Command:"/usr/local/bin/gmake" "cmTC_d35a1/fast"
/usr/local/bin/gmake -f CMakeFiles/cmTC_d35a1.dir/build.make CMakeFiles/cmTC_d35a1.dir/build
gmake[1]: Entering directory '/usr/home/dotnet/coreclr2/bin/obj/FreeBSD.x64.Debug/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_d35a1.dir/src.cxx.o
/usr/local/bin/clang++37 -D_FILE_OFFSET_BITS=64 -I/usr/local/include -Wall -Wno-null-conversion -std=c++11 -DHAVE_PROCFS_CTL -o CMakeFiles/cmTC_d35a1.dir/
src.cxx.o -c /home/dotnet/coreclr2/bin/obj/FreeBSD.x64.Debug/CMakeFiles/CMakeTmp/src.cxx
Linking CXX executable cmTC_d35a1
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_d35a1.dir/link.txt --verbose=1
/usr/local/bin/clang++37 -Wall -Wno-null-conversion -std=c++11 -DHAVE_PROCFS_CTL CMakeFiles/cmTC_d35a1.dir/src.cxx.o -o cmTC_d35a1
gmake[1]: Leaving directory '/usr/home/dotnet/coreclr2/bin/obj/FreeBSD.x64.Debug/CMakeFiles/CMakeTmp'
Return value: 1
Source file was:
# include <fcntl.h>
# include <stdlib.h>
# include <stdio.h>
# include <unistd.h>
int main(void) {
int fd;
# ifdef PATH_MAX
char path[PATH_MAX];
# elif defined(MAXPATHLEN)
char path[MAXPATHLEN];
# else
char path[1024];
# endif
sprintf(path, "/proc/%u/ctl", getpid());
fd = open(path, O_WRONLY);
if (fd == -1) {
exit(1);
}
exit(0);
}Return value 1 means it an error, right?
Activity
Tomcu commentedon Sep 28, 2016
The following diff will alleviate the issue.
gkhanna79 commentedon Mar 6, 2017
CC @rahku @janvorli
janvorli commentedon Mar 6, 2017
The "Return value" cmake logged is misleading. It doesn't represent the exit code of the testing app when there was a success, but rather the value that the HAVE_XXXX variable is set to.
Anyways, this issue is obsolete, we don't use PROCFS_MEM_NAME in CoreCLR anymore.
So I am closing the issue.