The last commit to freerdp re-enabled execinfo.h detection and broke the
build on sparc64 because of missing symbols in some test programs:
/usr/obj/ports/freerdp-2.3.2/build-sparc64/winpr/libwinpr/libwinpr2.so.1.0: undefined reference to `backtrace_symbols'
/usr/obj/ports/freerdp-2.3.2/build-sparc64/winpr/libwinpr/libwinpr2.so.1.0: undefined reference to `backtrace'
/usr/obj/ports/freerdp-2.3.2/build-sparc64/winpr/libwinpr/libwinpr2.so.1.0: undefined reference to `backtrace_symbols_fd'
http://build-failures.rhaalovely.net/sparc64/2021-06-13/x11/freerdp.log
The patch below is adapted from what sthen did for epoll-shim and links
libwinpr against libexecinfo. It's not clear ot me whether this could
result in a runtime failure on ldd architectures.
This builds and packages fine on amd64 and sparc64, tests seem to hang:
9/186 Test #9: TestSynchTimerQueue ...................... Passed 5.00 sec
Start 10: TestSynchWaitableTimer
Finally, there's no C++ here, so we should set COMPILER_LANGS = c.
Index: Makefile
===================================================================
RCS file: /cvs/ports/x11/freerdp/Makefile,v
retrieving revision 1.47
diff -u -p -r1.47 Makefile
--- Makefile 10 Jun 2021 14:07:26 -0000 1.47
+++ Makefile 17 Jun 2021 10:19:14 -0000
@@ -7,7 +7,7 @@ COMMENT = client for Microsoft RDP (rem
DISTNAME = freerdp-2.3.2
DPB_PROPERTIES = parallel
CATEGORIES = x11 net
-REVISION = 1
+REVISION = 2
SHARED_LIBS += freerdp-client2 1.0
SHARED_LIBS += freerdp2 1.1
@@ -26,11 +26,12 @@ PATCH_DIST_STRIP = -p1
PERMIT_PACKAGE = Yes
WANTLIB += X11 Xcursor Xext Xfixes Xi Xinerama Xrandr Xrender Xv
-WANTLIB += avcodec avutil c crypto cups epoll-shim m pthread sndio
+WANTLIB += avcodec avutil c crypto cups epoll-shim execinfo m pthread sndio
WANTLIB += ssl swresample usb-1.0 xkbfile
-# thread-local storage
+# thread-local storage; C11
COMPILER = base-clang ports-gcc
+COMPILER_LANGS = c
MODULES = devel/cmake
Index: patches/patch-CMakeLists_txt
===================================================================
RCS file: /cvs/ports/x11/freerdp/patches/patch-CMakeLists_txt,v
retrieving revision 1.10
diff -u -p -r1.10 patch-CMakeLists_txt
--- patches/patch-CMakeLists_txt 10 Jun 2021 14:07:26 -0000 1.10
+++ patches/patch-CMakeLists_txt 17 Jun 2021 10:05:38 -0000
@@ -3,7 +3,7 @@ $OpenBSD: patch-CMakeLists_txt,v 1.10 20
Index: CMakeLists.txt
--- CMakeLists.txt.orig
+++ CMakeLists.txt
-@@ -198,12 +198,14 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "BSD")
+@@ -198,12 +198,15 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "BSD")
set(BSD TRUE)
if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
set(FREEBSD TRUE)
@@ -15,10 +15,11 @@ Index: CMakeLists.txt
if(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
set(OPENBSD TRUE)
+ set(EPOLLSHIM TRUE)
++ set(EXECINFO TRUE)
endif()
endif()
-@@ -212,7 +214,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "DragonFly")
+@@ -212,11 +215,16 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "DragonFly")
set(FREEBSD TRUE)
endif()
@@ -27,7 +28,16 @@ Index: CMakeLists.txt
find_path(EPOLLSHIM_INCLUDE_DIR NAMES sys/epoll.h sys/timerfd.h HINTS /usr/local/include/libepoll-shim)
find_library(EPOLLSHIM_LIBS NAMES epoll-shim libepoll-shim HINTS /usr/local/lib)
endif()
-@@ -636,11 +638,11 @@ if(UNIX OR CYGWIN)
+
++if(EXECINFO)
++ find_path(EXECINFO_INCLUDE_DIR NAMES execinfo.h HINTS /usr/include)
++ find_library(EXECINFO_LIBS NAMES execinfo libexecinfo HINTS /usr/lib)
++endif()
++
+ # Configure MSVC Runtime
+ if(MSVC)
+ include(MSVCRuntime)
+@@ -636,12 +644,18 @@ if(UNIX OR CYGWIN)
if (HAVE_SYS_EVENTFD_H)
check_symbol_exists(eventfd_read sys/eventfd.h WITH_EVENTFD_READ_WRITE)
endif()
@@ -35,9 +45,16 @@ Index: CMakeLists.txt
+ if (EPOLLSHIM)
list(APPEND CMAKE_REQUIRED_INCLUDES ${EPOLLSHIM_INCLUDE_DIR})
endif()
++ if (EXECINFO)
++ list(APPEND CMAKE_REQUIRED_INCLUDES ${EXECINFO_INCLUDE_DIR})
++ endif()
check_include_files(sys/timerfd.h HAVE_SYS_TIMERFD_H)
- if (FREEBSD)
+ if (EPOLLSHIM)
list(REMOVE_ITEM CMAKE_REQUIRED_INCLUDES ${EPOLLSHIM_INCLUDE_DIR})
++ endif()
++ if (EXECINFO)
++ list(REMOVE_ITEM CMAKE_REQUIRED_INCLUDES ${EXECINFO_INCLUDE_DIR})
endif()
check_include_files(poll.h HAVE_POLL_H)
+ list(APPEND CMAKE_REQUIRED_LIBRARIES m)
Index: patches/patch-winpr_libwinpr_synch_CMakeLists_txt
===================================================================
RCS file: /cvs/ports/x11/freerdp/patches/patch-winpr_libwinpr_synch_CMakeLists_txt,v
retrieving revision 1.3
diff -u -p -r1.3 patch-winpr_libwinpr_synch_CMakeLists_txt
--- patches/patch-winpr_libwinpr_synch_CMakeLists_txt 28 Feb 2021 14:42:09 -0000 1.3
+++ patches/patch-winpr_libwinpr_synch_CMakeLists_txt 17 Jun 2021 10:05:38 -0000
@@ -3,7 +3,7 @@ $OpenBSD: patch-winpr_libwinpr_synch_CMa
Index: winpr/libwinpr/synch/CMakeLists.txt
--- winpr/libwinpr/synch/CMakeLists.txt.orig
+++ winpr/libwinpr/synch/CMakeLists.txt
-@@ -28,7 +28,7 @@ winpr_module_add(
+@@ -28,9 +28,11 @@ winpr_module_add(
timer.c
wait.c)
@@ -11,4 +11,8 @@ Index: winpr/libwinpr/synch/CMakeLists.t
+if(OPENBSD)
winpr_include_directory_add(${EPOLLSHIM_INCLUDE_DIR})
winpr_library_add_private(${EPOLLSHIM_LIBS})
++ winpr_include_directory_add(${EXECINFO_INCLUDE_DIR})
++ winpr_library_add_private(${EXECINFO_LIBS})
endif()
+
+ if(BUILD_TESTING)
Index: patches/patch-winpr_libwinpr_synch_test_CMakeLists_txt
===================================================================
RCS file: /cvs/ports/x11/freerdp/patches/patch-winpr_libwinpr_synch_test_CMakeLists_txt,v
retrieving revision 1.1
diff -u -p -r1.1 patch-winpr_libwinpr_synch_test_CMakeLists_txt
--- patches/patch-winpr_libwinpr_synch_test_CMakeLists_txt 28 Feb 2021 14:42:09 -0000 1.1
+++ patches/patch-winpr_libwinpr_synch_test_CMakeLists_txt 17 Jun 2021 10:05:38 -0000
@@ -3,12 +3,17 @@ $OpenBSD: patch-winpr_libwinpr_synch_tes
Index: winpr/libwinpr/synch/test/CMakeLists.txt
--- winpr/libwinpr/synch/test/CMakeLists.txt.orig
+++ winpr/libwinpr/synch/test/CMakeLists.txt
-@@ -21,7 +21,7 @@ create_test_sourcelist(${MODULE_PREFIX}_SRCS
+@@ -21,8 +21,12 @@ create_test_sourcelist(${MODULE_PREFIX}_SRCS
${${MODULE_PREFIX}_DRIVER}
${${MODULE_PREFIX}_TESTS})
-if(FREEBSD)
+if(EPOLLSHIM)
include_directories(${EPOLLSHIM_INCLUDE_DIR})
++endif()
++
++if(EXECINFO)
++ include_directories(${EXECINFO_INCLUDE_DIR})
endif()
+ add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
No comments:
Post a Comment