delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2022/04/29/07:29:46

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 242AF385780C
Authentication-Results: sourceware.org; dmarc=none (p=none dis=none)
header.from=dronecode.org.uk
Authentication-Results: sourceware.org; spf=none smtp.mailfrom=dronecode.org.uk
Authentication-Results: btinternet.com;
auth=pass (PLAIN) smtp.auth=jonturney AT btinternet DOT com;
bimi=skipped
X-SNCR-Rigid: 613A91242095D6A8
X-Originating-IP: [86.139.167.41]
X-OWM-Source-IP: 86.139.167.41 (GB)
X-OWM-Env-Sender: jonturney AT btinternet DOT com
X-VadeSecure-score: verdict=clean score=0/300, class=clean
X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgedvfedrudelgdeflecutefuodetggdotefrodftvfcurfhrohhfihhlvgemuceutffkvffkuffjvffgnffgvefqofdpqfgfvfenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepkfffgggfuffvfhfhjggtgfesthejredttdefjeenucfhrhhomheplfhonhcuvfhurhhnvgihuceojhhonhdrthhurhhnvgihsegurhhonhgvtghouggvrdhorhhgrdhukheqnecuggftrfgrthhtvghrnhepheduueevueejueejgeeufeehtddtkeevtdduieelfeetteeffeejjedukeefgffgnecuffhomhgrihhnpegthihgfihinhdrtghomhenucfkphepkeeirddufeelrdduieejrdegudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopegludelvddrudeikedruddruddthegnpdhinhgvthepkeeirddufeelrdduieejrdeguddpmhgrihhlfhhrohhmpehjohhnrdhtuhhrnhgvhiesughrohhnvggtohguvgdrohhrghdruhhkpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepsggvnhdrvhhorhhisheshhhpvgdrtghomhdprhgtphhtthhopegthihgfihinhestgihghifihhnrdgtohhm
X-RazorGate-Vade-Verdict: clean 0
X-RazorGate-Vade-Classification: clean
Message-ID: <11dd5fe0-605b-0e47-7eac-4d57ee86ad2d@dronecode.org.uk>
Date: Fri, 29 Apr 2022 12:29:24 +0100
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.8.1
Subject: Re: Link of ONC RPC client fails with: undefined references
To: "Voris, Ben" <ben DOT voris AT hpe DOT com>,
The Cygwin Mailing List <cygwin AT cygwin DOT com>
References: <MW4PR84MB1684AB8277B440A6E3CD2345FEFC9 AT MW4PR84MB1684 DOT NAMPRD84 DOT PROD DOT OUTLOOK DOT COM>
From: Jon Turney <jon DOT turney AT dronecode DOT org DOT uk>
In-Reply-To: <MW4PR84MB1684AB8277B440A6E3CD2345FEFC9@MW4PR84MB1684.NAMPRD84.PROD.OUTLOOK.COM>
X-Spam-Status: No, score=-1194.5 required=5.0 tests=BAYES_00, FORGED_SPF_HELO,
KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_DNSWL_NONE,
SPF_HELO_PASS, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

On 29/04/2022 04:06, Voris, Ben wrote:
> I have simple ONC RPC client and server that build on Ubuntu with rpcgen "(Ubuntu GLIBC 2.31-0ubuntu9.7) 2.31" (under "5.10.102.1-microsoft-standard-WSL2") but fails to build on Cygwin ("3.3.4(0.341/5/3) 2022-01-31 19:35 x86_64 Cygwin") with rpcgen "(rpcsvc-proto) 1.4".
> 
> Naively, it appears that Ubuntu has a much newer version (2.31) than Cygwin (1.4). Is this the problem?
> 
> gzip'ed cygcheck output and the test program and makefile are attached.
> 
> Output of "make all"
[...]
> gcc -ltirpc -o objs/date_client objs/date_client.o objs/date_clnt.o
> /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: objs/date_client.o: in function `date_prog_1':
> /home/BVoris/git/ONC-rpc-test/src/date_client.c:15: undefined reference to `clnt_create'
> /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /home/BVoris/git/ONC-rpc-test/src/date_client.c:17: undefined reference to `clnt_pcreateerror'
> /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /home/BVoris/git/ONC-rpc-test/src/date_client.c:33: undefined reference to `clnt_perror'
> /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: objs/date_clnt.o:date_clnt.c:(.rdata$.refptr.xdr_wrapstring[.refptr.xdr_wrapstring]+0x0): undefined reference to `xdr_wrapstring'

I suspect the problem here is due to the position of '-ltirpc' in the 
compiler command line. Moving it to after the .o files might help.
See https://cygwin.com/faq.html#faq.programming.linker for details why.


-- 
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019