From unknown Fri Aug 15 14:15:21 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#62705 <62705@debbugs.gnu.org> To: bug#62705 <62705@debbugs.gnu.org> Subject: Status: [PATCH] gnu: Add clog. Reply-To: bug#62705 <62705@debbugs.gnu.org> Date: Fri, 15 Aug 2025 21:15:21 +0000 retitle 62705 [PATCH] gnu: Add clog. reassign 62705 guix-patches submitter 62705 Antero Mejr severity 62705 normal tag 62705 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 06 21:06:42 2023 Received: (at submit) by debbugs.gnu.org; 7 Apr 2023 01:06:42 +0000 Received: from localhost ([127.0.0.1]:55405 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pkaYr-0005ke-M8 for submit@debbugs.gnu.org; Thu, 06 Apr 2023 21:06:42 -0400 Received: from lists.gnu.org ([209.51.188.17]:36682) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pkaYn-0005kT-Oj for submit@debbugs.gnu.org; Thu, 06 Apr 2023 21:06:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pkaYn-0007og-Hy for guix-patches@gnu.org; Thu, 06 Apr 2023 21:06:37 -0400 Received: from mout-p-101.mailbox.org ([80.241.56.151]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1pkaYk-0001N8-MI for guix-patches@gnu.org; Thu, 06 Apr 2023 21:06:37 -0400 Received: from smtp102.mailbox.org (unknown [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4Pt0Yw11Tkz9sb8 for ; Fri, 7 Apr 2023 03:06:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1680829588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=bOEcSw/CBQ2mtMZqNWWvLw/VLDt36/fmyjR+X9uiQpc=; b=OkG4v7MrCO8/Az8RakST0pgonVCv4Mg2hEEU9IA7GC2XHGTaZOgK3KB9NEhfVX/Kdn9ZJK PSZzONNHqNoA9pBbvPGahypxv4mA5RKOfld5DMeWWM/5Z3e+eHVfwk0P4KHaBMdvxVJ8SL bpHMZTnbHuOWIf48EVe9cqjVQXbzihi5sexiqY2UGK6+iykViLVh2xguYzUcxhBrCW4cQz e6IBrqcgf1SAbZ5YyeijVeNlXhpT93Gk7jZsddsCh5ZRb2S5KjVFECJjzC2EsCp5wycdcb RtS0GtRkL35rUJW+pDv6c5esY7w7drqCvCHaFkP7lw7IPF7KLgsgTputrK+Z9A== From: Antero Mejr To: guix-patches@gnu.org Subject: [PATCH] gnu: Add clog. Date: Fri, 7 Apr 2023 01:06:20 +0000 Message-Id: <20230407010620.13291-1-antero@mailbox.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-MBO-RS-META: cjdad88adnc7iex3fecs5pw1qswy86se X-MBO-RS-ID: 13e1ba257445953d888 Received-SPF: pass client-ip=80.241.56.151; envelope-from=antero@mailbox.org; helo=mout-p-101.mailbox.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) * gnu/packages/parallel.scm (clog): New variable. * gnu/packages/patches/clog-fix-shared-build.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- Putting clog in parallel.scm (next to cpuinfo) because putting it in logging.scm causes a circular dependency. Plus it's part of cpuinfo. gnu/local.mk | 1 + gnu/packages/parallel.scm | 29 +++++++ .../patches/clog-fix-shared-build.patch | 85 +++++++++++++++++++ 3 files changed, 115 insertions(+) create mode 100644 gnu/packages/patches/clog-fix-shared-build.patch diff --git a/gnu/local.mk b/gnu/local.mk index b7e19b6bc2..10778d6585 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1001,6 +1001,7 @@ dist_patch_DATA = \ %D%/packages/patches/classpath-aarch64-support.patch \ %D%/packages/patches/classpath-miscompilation.patch \ %D%/packages/patches/cling-use-shared-library.patch \ + %D%/packages/patches/clog-fix-shared-build.patch \ %D%/packages/patches/clucene-pkgconfig.patch \ %D%/packages/patches/cmake-curl-certificates.patch \ %D%/packages/patches/cmake-curl-certificates-3.24.patch \ diff --git a/gnu/packages/parallel.scm b/gnu/packages/parallel.scm index 3c638e4ff9..9a22774789 100644 --- a/gnu/packages/parallel.scm +++ b/gnu/packages/parallel.scm @@ -490,6 +490,35 @@ (define-public cpuinfo processor name, cache information, and topology information.") (license license:bsd-2)))) +(define-public clog + (package + (inherit cpuinfo) ;distributed with cpuinfo but not built by it + (name "clog") + (source (origin + (inherit (package-source cpuinfo)) + (patches (search-patches "clog-fix-shared-build.patch")))) + (arguments + (list #:configure-flags #~(list "-DBUILD_SHARED_LIBS=ON") + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda _ + (chdir "deps/clog")))))) + (native-inputs (list googletest)) + (inputs '()) + (synopsis "C-style logging library based on printf") + (description + "This package provides a C-style library for logging errors, +warnings, information notes, and debug information. Its features are: +@itemize +@item printf-style interface for formatting variadic parameters. +@item Separate functions for logging errors, warnings, information notes, and +debug information. +@item Independent logging settings for different modules. +@item Logging to logcat on Android and stderr/stdout on other platforms. +@item Compatible with C99 and C++. +@item Covered with unit tests. +@end itemize"))) + (define-public psimd ;; There is currently no tag in this repo. (let ((commit "072586a71b55b7f8c584153d223e95687148a900") diff --git a/gnu/packages/patches/clog-fix-shared-build.patch b/gnu/packages/patches/clog-fix-shared-build.patch new file mode 100644 index 0000000000..bf80544b90 --- /dev/null +++ b/gnu/packages/patches/clog-fix-shared-build.patch @@ -0,0 +1,85 @@ +Author: Antero Mejr +Notes: Disabled function visibility hacks and googletest download. Enabled +non-static builds. + +diff --git a/deps/clog/CMakeLists.txt b/deps/clog/CMakeLists.txt +index 083f519..b7b225a 100644 +--- a/deps/clog/CMakeLists.txt ++++ b/deps/clog/CMakeLists.txt +@@ -38,20 +38,8 @@ SET(CONFU_DEPENDENCIES_SOURCE_DIR ${CMAKE_SOURCE_DIR}/deps + SET(CONFU_DEPENDENCIES_BINARY_DIR ${CMAKE_BINARY_DIR}/deps + CACHE PATH "Confu-style dependencies binary directory") + +-IF(CLOG_BUILD_TESTS) +- IF(NOT DEFINED GOOGLETEST_SOURCE_DIR) +- MESSAGE(STATUS "Downloading Google Test to ${CONFU_DEPENDENCIES_SOURCE_DIR}/googletest (define GOOGLETEST_SOURCE_DIR to avoid it)") +- CONFIGURE_FILE(cmake/DownloadGoogleTest.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest-download/CMakeLists.txt") +- EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . +- WORKING_DIRECTORY "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest-download") +- EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" --build . +- WORKING_DIRECTORY "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest-download") +- SET(GOOGLETEST_SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/googletest" CACHE STRING "Google Test source directory") +- ENDIF() +-ENDIF() +- + # ---[ clog library +-ADD_LIBRARY(clog STATIC src/clog.c) ++ADD_LIBRARY(clog src/clog.c) + SET_TARGET_PROPERTIES(clog PROPERTIES + C_STANDARD 99 + C_EXTENSIONS NO) +@@ -74,16 +62,6 @@ INSTALL(TARGETS clog + + # ---[ clog tests + IF(CLOG_BUILD_TESTS) +- # ---[ Build google test +- IF(NOT TARGET gtest) +- IF(MSVC AND NOT CLOG_RUNTIME_TYPE STREQUAL "static") +- SET(gtest_force_shared_crt ON CACHE BOOL "" FORCE) +- ENDIF() +- ADD_SUBDIRECTORY( +- "${GOOGLETEST_SOURCE_DIR}" +- "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest") +- ENDIF() +- + ADD_EXECUTABLE(clog-test test/clog.cc) + SET_TARGET_PROPERTIES(clog-test PROPERTIES + CXX_STANDARD 11 +diff --git a/deps/clog/include/clog.h b/deps/clog/include/clog.h +index 4143761..aa9000f 100644 +--- a/deps/clog/include/clog.h ++++ b/deps/clog/include/clog.h +@@ -11,16 +11,6 @@ + #define CLOG_INFO 4 + #define CLOG_DEBUG 5 + +-#ifndef CLOG_VISIBILITY +- #if defined(__ELF__) +- #define CLOG_VISIBILITY __attribute__((__visibility__("internal"))) +- #elif defined(__MACH__) +- #define CLOG_VISIBILITY __attribute__((__visibility__("hidden"))) +- #else +- #define CLOG_VISIBILITY +- #endif +-#endif +- + #ifndef CLOG_ARGUMENTS_FORMAT + #if defined(__GNUC__) + #define CLOG_ARGUMENTS_FORMAT __attribute__((__format__(__printf__, 1, 2))) +@@ -33,11 +23,11 @@ + extern "C" { + #endif + +-CLOG_VISIBILITY void clog_vlog_debug(const char* module, const char* format, va_list args); +-CLOG_VISIBILITY void clog_vlog_info(const char* module, const char* format, va_list args); +-CLOG_VISIBILITY void clog_vlog_warning(const char* module, const char* format, va_list args); +-CLOG_VISIBILITY void clog_vlog_error(const char* module, const char* format, va_list args); +-CLOG_VISIBILITY void clog_vlog_fatal(const char* module, const char* format, va_list args); ++void clog_vlog_debug(const char* module, const char* format, va_list args); ++void clog_vlog_info(const char* module, const char* format, va_list args); ++void clog_vlog_warning(const char* module, const char* format, va_list args); ++void clog_vlog_error(const char* module, const char* format, va_list args); ++void clog_vlog_fatal(const char* module, const char* format, va_list args); + + #define CLOG_DEFINE_LOG_DEBUG(log_debug_function_name, module, level) \ + CLOG_ARGUMENTS_FORMAT \ -- 2.38.1 From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 21 04:59:58 2023 Received: (at submit) by debbugs.gnu.org; 21 Apr 2023 08:59:58 +0000 Received: from localhost ([127.0.0.1]:39262 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppmcX-0001gs-Pi for submit@debbugs.gnu.org; Fri, 21 Apr 2023 04:59:58 -0400 Received: from lists.gnu.org ([209.51.188.17]:35786) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppmcW-0001gl-R4 for submit@debbugs.gnu.org; Fri, 21 Apr 2023 04:59:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppmcW-0001tT-KP for guix-patches@gnu.org; Fri, 21 Apr 2023 04:59:56 -0400 Received: from relay6-d.mail.gandi.net ([2001:4b98:dc4:8::226]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppmcV-00058b-5m for guix-patches@gnu.org; Fri, 21 Apr 2023 04:59:56 -0400 Received: (Authenticated sender: admin@nicolasgoaziou.fr) by mail.gandi.net (Postfix) with ESMTPSA id 3DF3BC0013; Fri, 21 Apr 2023 08:59:51 +0000 (UTC) From: Nicolas Goaziou To: Antero Mejr via Guix-patches via Subject: Re: [bug#62705] [PATCH] gnu: Add clog. References: <20230407010620.13291-1-antero@mailbox.org> Date: Fri, 21 Apr 2023 10:59:51 +0200 In-Reply-To: <20230407010620.13291-1-antero@mailbox.org> (Antero Mejr via Guix-patches via's message of "Fri, 7 Apr 2023 01:06:20 +0000") Message-ID: <875y9p6260.fsf@nicolasgoaziou.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2001:4b98:dc4:8::226; envelope-from=mail@nicolasgoaziou.fr; helo=relay6-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: submit Cc: Antero Mejr , 62705-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) Hello, Antero Mejr via Guix-patches via writes: > * gnu/packages/parallel.scm (clog): New variable. > * gnu/packages/patches/clog-fix-shared-build.patch: New file. > * gnu/local.mk (dist_patch_DATA): Add it. Applied. Thank you. Regards, -- Nicolas Goaziou From unknown Fri Aug 15 14:15:21 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 19 May 2023 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator