From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 3ECFA1F47C for ; Thu, 26 Jan 2023 07:19:48 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; unprotected) header.d=openwall.com.au header.i=@openwall.com.au header.a=rsa-sha256 header.s=pcbvnislxexiljmocxhjeg5lp2gwjesd header.b=IaxRCsWS; dkim=pass (1024-bit key; unprotected) header.d=amazonses.com header.i=@amazonses.com header.a=rsa-sha256 header.s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw header.b=fExVYCS9; dkim=pass (2048-bit key; secure) header.d=openwall.com.au header.i=@openwall.com.au header.a=rsa-sha256 header.s=20180402 header.b=XLUDfScp; dkim-atps=neutral Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pKwXb-0001CQ-J4; Thu, 26 Jan 2023 02:19:23 -0500 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 <01000185ecf1f354-7785c91c-52c3-46f5-b2e7-7685f32c831f-000000@amazon-ses-us-east-1.openwall.com.au>) id 1pKwXZ-0001BX-Uj for bug-gnulib@gnu.org; Thu, 26 Jan 2023 02:19:21 -0500 Received: from a8-81.smtp-out.amazonses.com ([54.240.8.81]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.90_1) (envelope-from <01000185ecf1f354-7785c91c-52c3-46f5-b2e7-7685f32c831f-000000@amazon-ses-us-east-1.openwall.com.au>) id 1pKwXX-0005qf-VH for bug-gnulib@gnu.org; Thu, 26 Jan 2023 02:19:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=pcbvnislxexiljmocxhjeg5lp2gwjesd; d=openwall.com.au; t=1674717557; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type:In-Reply-To; bh=sX6Hp2NeODtlg6EXEPF7ZuPez3gxnFtmwxs0Gn2nTHA=; b=IaxRCsWSloMai8VMUSAr64cZS0CbJy5CyQqc15txaySkBFNNc0vftnsMAXD4YFFb +J9aULCpMFIjrw80cgAPuTv1GgrPh89DBUCRk1IXDFJvJa7NMeX51cBDcX7gRfnxEOY vFOIMFh4xaoPNxE3pwVWuS744QO4oe1TWqUeHx+c= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw; d=amazonses.com; t=1674717557; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type:In-Reply-To:Feedback-ID; bh=sX6Hp2NeODtlg6EXEPF7ZuPez3gxnFtmwxs0Gn2nTHA=; b=fExVYCS9tYtX1889uzZRZHrlLS2NMGsPsM+kZge0AYffh71xIhcp7lFI3i0KrPSJ xONC2CU/5PI3a3NIn99oNNFMEZ5Iyg8z//EzlCM3yJKNrK9c39heua5vEjOcbCztxwo tGHo0oqTMbj4sAX6t8MXo8Z+TalDBfhRXgn5ZN3o= ARC-Seal: i=1; a=rsa-sha256; d=openwall.com.au; s=20180402; t=1674717557; cv=none; b=FEt/0CnprSHrCS7qKy6gQMC5ajnZBXTK3Dpj+d3b2BxtGoEb98klP4W0wCR+p2t6sQB7i0MNwa+JUf0nPv5cZZmjwcqkadmNmUyA+TaTpTgIGAouMQy9X3YhJ1mznC5OZ0L60VB23p1YsAJVV6QecqNWSjiMk2xuvOaFmx1HD1q0qaAceIncMzmG7LKRNy141lKSL+NK9IvhydZTlMupJ1eawttiOWKoo5aFSfai6e8hHw13afhdhWwz4iCGEpxKTzke8xDM9beeDfFm9vqcOQMFEYDdF5zkDf3fVA8lDvwDo1Jn1mzPb9kSy4fVD0Hzq8RhrDQxcs0rcaZt9ddhvA== ARC-Message-Signature: i=1; a=rsa-sha256; d=openwall.com.au; s=20180402; t=1674717557; c=relaxed/simple; bh=sX6Hp2NeODtlg6EXEPF7ZuPez3gxnFtmwxs0Gn2nTHA=; h=From:To:Cc:Subject; b=XNSdV6dNrKdxVukHjCfKJXhCFZBgrLpoJ30H2ts/PB3RPyoWNp9lwswgO3ek+Saujnvp70l7SMU+NoauGUJXnvm+kWmwdhmI2HhfQSIXHik67TTwZ3wViKiHTONcMbiOYznmfDoLA65KGcrVn6M4V6li4J2sk4cIbCGV5giql4cKg8w1uWjhI5W7qy8u4KdmaHMqFayokmatB25QyAp1yQO57y/6OeoPMlbjDFJl3+y2slnEWk/mJLH7jjbUHQbT/9yCRTR6D5LRxc3n+yCe3XV5RcGCoBBDkoYFB8KO9S19WQumOJATn1PabFfxx6C6QaamMdveeKEqqlD0VZnJMA== ARC-Authentication-Results: i=1; mail.openwall.com.au; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=openwall.com.au; s=20180402; t=1674717557; bh=sX6Hp2NeODtlg6EXEPF7ZuPez3gxnFtmwxs0Gn2nTHA=; h=From:To:Cc:Subject:From; b=XLUDfScpWi8oDhnBpxxaAc9zzwK2cDccy6r8A/zcN78x8bCKIpRPUJwsLn9i7VLoD Ye0OmLymk29mPJ4FKYNj6XbyPA/vvd1ZeYv0JbY0uT0/qaZBxkHZq9vLZe+R/M6B7J kWVRWygcKAzpKOoDyN128WxV4No0tbFvr1qm6JpfEiRaBt20H0y2IFUf8EvnVZgf/Y VN5g66P/IRWtbcs2QrBYBPJfjapSo76GI7I93P7dTu/kkJrWfdzzZaxF7D5HtiT4ra nmDp0Gi/IWg8IWEwZLc1GCRfvESgDF40PmQHP5NHxvzMHjfmrcuv34ENR6p0d7ZQVE tprvqN+C5CvNw== Date: Thu, 26 Jan 2023 07:19:17 +0000 From: "(GalaxyMaster)" To: Bruno Haible Cc: bug-gnulib@gnu.org Subject: Re: backupfile and backup-rename are introducing the same object to make Message-ID: <01000185ecf1f354-7785c91c-52c3-46f5-b2e7-7685f32c831f-000000@email.amazonses.com> References: <01000185e8d1146f-84242ea5-e0a3-406f-8126-b306b40107f8-000000@email.amazonses.com> <3038350.4B0zn089NQ@nimes> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3038350.4B0zn089NQ@nimes> User-Agent: Mutt/1.5.21 (2010-09-15) Feedback-ID: 1.us-east-1.Br0WpcLm0XzNPYp+t39aA5qSwb/HYCx3zC5wkQY3G2s=:AmazonSES X-SES-Outgoing: 2023.01.26-54.240.8.81 Received-SPF: pass client-ip=54.240.8.81; envelope-from=01000185ecf1f354-7785c91c-52c3-46f5-b2e7-7685f32c831f-000000@amazon-ses-us-east-1.openwall.com.au; helo=a8-81.smtp-out.amazonses.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Bruno, On Wed, Jan 25, 2023 at 06:53:57PM +0100, Bruno Haible wrote: > Hi, > > (GalaxyMaster) wrote: > > backup-replace > You mean 'backup-rename', right? Yeah, it was a typo, it was in the middle of the night and my brain was not working efficiently. > > I just stumbled upon the following: when I include both backupfile and > > backup-replace modules I am getting a broken build due to multiple definitions > > of "simple_backup_suffix'. > > This is not expected, because usually the .o files are collected in a .a file, > from which one of the two backupfile.o will be picked, and it does not matter > which one since they are identical. This makes sense. My use case in not standard since I am actually building these into a shared library using libtool, so libtool sees the same object file listed twice and tries to resolve it by renaming one of them and then includes both in the resulting link command to produce a shared object. The linker rightfully complains about duplicates. Anyway, I think my use case is out of scope for this project, but the reason why I reported it was that it just does not look tidy to have two modules claiming ownership of the same files and including the same configuration to configure.ac/Makefile.am files. For my project, I am just patching backup-rename module's definition to only include parts that are different from backupfile and I also made a dependency on backupfile. > Please describe your situation: > - operating system? I am building a Linux distribution from ground up. > - building what kind of library or binary in which way? I am basically building what is directly against GNU Lib's philosophy (section 2.2 of the manual), a shared library containing every single compilable module with all functions defined as weak symbols. The resulting shared library then also stripped of all DT_NEEDED sections except for the system libc one, so that it does not have lots of dependencies (and with weak symbols it is usable in parts even if the dependencies are not met as long as the corresponding functions are not called). I clearly understand that my use case is not something supported or endorsed by the GNU Lib project and am not trying to change that, but it is another avenue to test stuff, which may be valueable to the project. > - which compiler: $CC = ? $CFLAGS = ? $CPPFLAGS = ? $LDFLAGS = ? > - which linker is being used by the compiler?, I am not sure this would be helpful, since as I described my use case is definitely not something GNU Lib supports, but for the context purposes: the system is musl based with GCC as the primary compiler. So, as you wrote in your message, I think there is no bug and the way how these two modules are currently set up is fine (unless one does something non-standard like myself). However, I would argue that it would still be nicer not to polute project's build files with duplicate entries if possible, but this is up to you of course. -- (GM)