X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type:content-transfer-encoding; q=dns; s=default; b=ce1dYTKUE1nQXLyL05/UthDDCQifZGuO/dYMaqeV0v8 balwGlKM+HON7HGo9iB8+nSGpRob8v0Aa+u6OF2btRB0j67rY+/yRwjEpy7nTE5e 7f6+aaMIuVw81u/WmtKb7X5yifN7lppE+SB24ySNvsKZEtnXZryVaGQp40G5yJqk = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type:content-transfer-encoding; s=default; bh=e9EZjdko6loWC2F6Q2UPz1B9RME=; b=UR3ScCmYVVB6j5G7r wa3VYlNdAvQ1xfXP/0Jy2sBy6BZNGAt31Oif8WTyoBh3RGAQwS7QwA5KmfVYrGgB qWCGkBnL11Rwd4AsqtcYsyibEmfiQl9Rfdzx3n/JY5SGnUyTNXYJ6TKs6XkfVHsD E/Qz7tmbwO2OIzGTOiUPDQu3mI= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1857 X-HELO: mail-qk1-f173.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-transfer-encoding; bh=I2GttWkShAZWucvmdCbcYZJWBwKWSzQeSETS3n4UXcg=; b=WytlAN1/5tziivo8r+3UoCSzd0JsCqYoNA9DS3lSnJQT+6Pg5Tmpqjqiizl4PcT6Ik 3Abr72m9dRpdYLTnP/gCCC107rKpLQFYigb+1BhLGJhfV/eZum/lUe7tv7/8bVVvYS7O U37DN/w8YbMSBNS3WQYx60te1DdKBeqDOYUUiPC1QK4eHP/aWMCH3LonUpZrd9pvgc0h PUD3ZBYXAzIlaxSRqY/m7H0+CZbDSquJJOcLA7EPfi21ullhKZQe6ZDD/tgarG0E15Me G3E3Ub5OFb42K7i6M36Rfsi8dAwdCsvjghEU5wita/8aV64glC1dNzgRKehDJs0kBG7S oWTw== MIME-Version: 1.0 In-Reply-To: References: From: Csaba Raduly Date: Thu, 27 Sep 2018 18:53:48 +0200 Message-ID: Subject: Re: make failing in custom code To: cygwin list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id w8RGs2FA011318 Hi, On Thu, Sep 27, 2018 at 4:31 PM, Tapas Mishra wrote: > Hi, > I am trying to do a project when I do a make on project code > in cygwin environment I get following error > > gcc -Wall -g -c main.c -o main.o > main.c: In function ‘main’: > main.c:50:8: warning: unused variable ‘physmem’ [-Wunused-variable] > char *physmem = page_table_get_physmem(pt); > ^~~~~~~ > gcc -Wall -g -c page_table.c -o page_table.o > page_table.c: In function ‘page_table_set_entry’: > page_table.c:125:2: warning: implicit declaration of function > ‘remap_file_pages’ [-Wimplicit-function-declaration] > remap_file_pages(pt->virtmem+page*PAGE_SIZE,PAGE_SIZE,0,frame,0); > ^~~~~~~~~~~~~~~~ > gcc -Wall -g -c disk.c -o disk.o > gcc -Wall -g -c program.c -o program.o > gcc main.o page_table.o disk.o program.o -o virtmem > page_table.o: In function `page_table_set_entry': > /home/DEEL/cs602/try1/page_table.c:125: undefined reference to > `remap_file_pages' > /home/DEEL/cs602/try1/page_table.c:125:(.text+0x491): relocation > truncated to fit: R_X86_64_PC32 against undefined symbol > `remap_file_pages' > collect2: error: ld returned 1 exit status > make: *** [makefile:2: virtmem] Error 1 > > I compiled the same code on a linux instance hosted on amazon cloud > and it compiled successfully. So this brought me to a conclusion some > files are missing in cygwin and hence I reached here. remap_file_pages is a Linux system call: http://man7.org/linux/man-pages/man2/remap_file_pages.2.html It is not implemented on Cygwin. Csaba -- You can get very substantial performance improvements by not doing the right thing. - Scott Meyers, An Effective C++11/14 Sampler So if you're looking for a completely portable, 100% standards-conformat way to get the wrong information: this is what you want. - Scott Meyers (C++TDaWYK) -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple