DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 4A4APeOB1354022 Authentication-Results: delorie.com; dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=mJAc9j6v X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A8FA6385802C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1730715938; bh=dObURRO1oKrauzyyH2LK8HgUp2FGcSpvCbErZsL0FCU=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=mJAc9j6vKilNdrkDuoUGRNWueEL8G2VrsM1jaGz3QiDPXZoxD7aLsZRP03Ur9XPPC 4BHyC8RZmeFBqD5aqL5zmZEKzEvyPDK+NPhVeynEM22ZbZ3HX5xrnyxbv8yshVUnVu KqQmQ8MkDZIVbQHMksDzAWLd2sQ4BlYBAqo4gSe0= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 79CEB3858D29 Date: Mon, 4 Nov 2024 11:24:41 +0100 To: "Named T. Relay" Subject: Re: libresolv does not provide __ns_initparse, resulting in LD undefined reference Message-ID: Mail-Followup-To: "Named T. Relay" , "cygwin AT cygwin DOT com" References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Corinna Vinschen via Cygwin Reply-To: cygwin AT cygwin DOT com Cc: Corinna Vinschen , "cygwin AT cygwin DOT com" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" On Oct 29 22:35, Named T. Relay via Cygwin wrote: > Hello, > > Today i installed cygwin to compile a windows .exe out of a Linux source program. > While G++ on Linux compiles it correctly into a binary, on cygwin i got an issue during linking: > > $ g++ -O2 -Wall -Isrc -o bin/sealtool src/sign-verify.cpp -lcrypto -lssl -lcurl -lresolv > /usr/lib/gcc/x86_64-pc-cygwin/12/../../../../x86_64-pc-cygwin/bin/ld: /tmp/ccA3GExv.o:sign-verify.cp:(.text+0x437): undefined reference to `__ns_initparse' > /usr/lib/gcc/x86_64-pc-cygwin/12/../../../../x86_64-pc-cygwin/bin/ld: /tmp/ccA3GExv.o:sign-verify.cp:(.text+0x49a): undefined reference to `__ns_parserr' > collect2: error: ld returned 1 exit status > > >From looking at the nm results, the provided libresolv library does not include these symbols. > (But my linux distro's version of libresolv DOES have them!) > > Does anyone know why these symbols are missing? They have never been implemented in Cygwin itself. Cygwin only has a piece of source called minires, a simple resolver lib depending on the underlying Windows resolver, providing the res_FOO symbols from resolv.h. The nameserver symbols from nameser.h are not part of the Cywin core lib. Maybe you have more luck with the (unmaintained) bind libs? Corinna -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple