Open davidebeatrici opened 1 month ago
Also, the upstream logic looks wrong to me:
#### Find socket directories
set(DBUS_SESSION_SOCKET_DIR "" CACHE STRING "Default directory for session socket")
if(UNIX)
if (CMAKE_CROSSCOMPILING)
if (NOT DBUS_SESSION_SOCKET_DIR)
message(FATAL_ERROR "cannot autodetect session socket directory "
"when crosscompiling, pass -DDBUS_SESSION_SOCKET_DIR=...")
endif()
elseif(NOT $ENV{TMPDIR} STREQUAL "")
set(DBUS_SESSION_SOCKET_DIR $ENV{TMPDIR})
elseif(NOT $ENV{TEMP} STREQUAL "")
set(DBUS_SESSION_SOCKET_DIR $ENV{TEMP})
elseif(NOT $ENV{TMP} STREQUAL "")
set(DBUS_SESSION_SOCKET_DIR $ENV{TMP})
else()
set(DBUS_SESSION_SOCKET_DIR /tmp)
endif()
endif()
On macOS the TMPDIR
environment variable's value appears to be a unique path that is generated for the current process. I believe DBUS_SESSION_SOCKET_DIR
should be set to /tmp
instead.
Editing the portfile to pass
-DDBUS_SESSION_SOCKET_DIR=/tmp
to CMake fixes the issue.
The actual value should depend on the target system.
the upstream logic looks wrong to me
Apart from the potential macOS issue, the given code hides the cache variable (aka input variable) for native builds by setting a normal variable.
The actual value should depend on the target system.
I agree, that should (and probably can only be) done at runtime.
Apart from the potential macOS issue, the given code hides the cache variable (aka input variable) for native builds by setting a normal variable.
That too, good catch.
Seeing this also with dbus:x86-linux
Seeing this also with
dbus:x86-linux
Well, it is cross compiling if you are on a x64 host.
Editing the portfile to pass
-DDBUS_SESSION_SOCKET_DIR=/tmp
to CMake fixes the issue.Operating system
macOS (ARM64)
Steps to reproduce the behavior
Failure logs