From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 090651F461 for ; Tue, 14 May 2019 04:32:45 +0000 (UTC) Received: from localhost ([127.0.0.1]:38950 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQP7J-0002SG-BD for normalperson@yhbt.net; Tue, 14 May 2019 00:32:41 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56805) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQP7D-0002Ru-1q for bug-gnulib@gnu.org; Tue, 14 May 2019 00:32:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hQP7B-00024N-Mj for bug-gnulib@gnu.org; Tue, 14 May 2019 00:32:35 -0400 Received: from mo6-p00-ob.smtp.rzone.de ([2a01:238:20a:202:5300::9]:26347) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hQMMD-0003x8-4g for bug-gnulib@gnu.org; Mon, 13 May 2019 21:35:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1557797732; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=b1x43WlS1WV68OLERnNnc8I9YcpjUHqSoqb24NoXVy8=; b=Ms/3uzwqgOO6CwXtT21apEw7MiWp6cQ4Ub2JvFQCLjf8tFK4L64kUfv1k5fUKwizNk UdqhMxflX5rVJ7YBwLcEFxiJ1DJoZJyIgaoAGPUSUFOnqyaOpIsN3MSuNx8kN4b9HpqH 4i8GYD/AOaZ9sfGsMpgn9myIPDxJxwY/yjjQKBuZydubHZUVRpWrbYfRa3gwo/3FuYzm K6pRqF18uH06Y2OPRiPcg6p6DmkLqoyYqT0ZCaRRpHhxV2uts0dg30ZlqvzNArrgiL2z hqg8AGXEKXxnhJkOWk67CpTXz2a38b0FKuyWzrHkxyOHYN4linvlQQC6e3WozFbMOuWa mAyA== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOGaf0y5RW" X-RZG-CLASS-ID: mo00 Received: from bruno.haible.de by smtp.strato.de (RZmta 44.18 DYNA|AUTH) with ESMTPSA id m03afev4E1ZNa2a (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Tue, 14 May 2019 03:35:23 +0200 (CEST) From: Bruno Haible To: bug-gnulib@gnu.org Subject: Re: getgroups.c failes to compile Date: Tue, 14 May 2019 03:35:22 +0200 Message-ID: <2260855.Gdx5C7bdKa@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-145-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <851aa96e-c6e9-e368-385c-460b8264b151@akhlaghi.org> References: <851aa96e-c6e9-e368-385c-460b8264b151@akhlaghi.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a01:238:20a:202:5300::9 X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mohammad Akhlaghi , Elham Saremi Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" Hi, Mohammad Akhlaghi wrote: > Recently in a build of Gnuastro 0.9 (which uses Gnulib=20 > `v0.1-2539-gd6af24178'), we confronted a crash during the build of=20 > Gnulib's `getgroups.c' (error summary is in P.S.). A log of the command "make" would be more useful than a log of the command "make -j8", because the latter intermingles the output of different compilations running in parallel. For example, here it looks like the error messages are coming from the compilation of getopt1.c: > /bin/sh ../../libtool --tag=3DCC --mode=3Dcompile /usr/bin/gcc=20 > -DHAVE_CONFIG_H -I. -I../.. -I/usr/local/include -Wall -O3 -pthread=20 > -MT getopt1.lo -MD -MP -MF $depbase.Tpo -c -o getopt1.lo getopt1.c &&\ > mv -f $depbase.Tpo $depbase.Plo > In file included from getgroups.c:22:0: > getgroups.c:33:1: error: conflicting types for =E2=80=98rpl_getgroups=E2= =80=99 > getgroups (int n _GL_UNUSED, GETGROUPS_T *groups _GL_UNUSED) > ^ > ./unistd.h:1216:1: note: previous declaration of =E2=80=98rpl_getgroups= =E2=80=99 was here > _GL_FUNCDECL_RPL (getgroups, int, (int n, gid_t *groups)); > ^ > Makefile:2208: recipe for target 'getgroups.lo' failed > As further information, I am also attaching several outputs of the=20 > configuration and build which will hopefully provide much more detailed=20 > information on the host system and build environment. The two=20 > `redirect-*.txt' files are the full outputs of the `./configure' These logs are more interesting: > checking for working getgroups... no On glibc systems, getgroups is expected to work. So, the cause is already to be found during the autoconfiguration. > configure:23138: checking type of array argument to getgroups > configure:23172: /usr/bin/gcc -o conftest -Wall -O3 -pthread -I/usr/loca= l/include -L/usr/local/lib conftest.c -ltiff -llzma -ljpeg -lwcs -lcfitsio = =2Dlz -lgsl -lgslcblas -lm >&5 > configure:23172: $? =3D 0 > configure:23172: ./conftest > ./conftest: error while loading shared libraries: libwcs.so.6: cannot ope= n shared object file: No such file or directory > configure:23172: $? =3D 127 > configure: program exited with status 127 The error comes from the fact that you have a -L option, the directory in t= his option was actually used to locate a shared library (libwcs.so.6 in this ca= se), but the runtime linker cannot find this shared library. There are two easy workarounds: (a) set the environment variable LD_LIBRARY_PATH=3D/usr/local/lib before the configuration, (b) pass LDFLAGS=3D"-L/usr/local/lib -Wl,-rpath,/usr/local/lib". In the case (a) the binaries that you build will only work when LD_LIBRARY_PATH=3D/usr/local/lib is still set. In the case (b) the binaries will work without this environment variable. Bruno