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:from:date:message-id:subject:to :content-type:content-transfer-encoding; q=dns; s=default; b=gg1 Rq+f7DHOvspraW+Hkbu3cHUGOjTnLIgsCg/pMdz0Lvwq61C6GUNNg4PS4VDSOlBW 071QmSU7t8XCdGWQl+tsEzf42Vh1KuqY0OvoMmsUuWHZcJtrN7WjuR3Kgq9LUUOe mO2BkKYq16TLDzo6XOaYoqo0ysbS+I4ObW8aiFYY= 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:from:date:message-id:subject:to :content-type:content-transfer-encoding; s=default; bh=5CSdPuvMJ by8qv/qsBIBBMu5uwQ=; b=DRPJMbCg5iQKCQNssleRujP22g5BF6vR08/Ax41Rb s846KXoBIqveeJ2+l//mkFSid35RIwPNh7E1LucgWcZCskbS7b7Iy5LuAibNASnZ QvG+gqLw7OkUUalGxOV7lSBqZPKG0WW2DamaFfgg1kn5mkUV6mFEKckqNUjsEfcr OU= 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=-5.3 required=5.0 tests=BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,GIT_PATCH_2,RCVD_IN_BL_SPAMCOP_NET,SPF_PASS autolearn=ham version=3.3.2 spammy=amazon, deel X-HELO: mail-oi1-f196.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=FWdmU/85/Rg9YwNEzepoxFwnl6YjYCfi5oPojXMrPZ4=; b=Ij3AOBG4gvYR1tJMJT5QKpOFrTaOeIsLyIZr7oVxCklbwSynkjpZ4YeF1/Y5PCzDgU 3Vjl7s1uDlwS34mIcnmmpCM12VOD54BgQKarb7MWApL+7xsk5AwD97hWaX59xRm8lCeZ eHtVIRIhjAAop7HGU1wpzxk6buzgIBqPBxGSyM4x7QBwT4HpjB6wlTqXyKGvBxrb5yPR XllTRBcU8siDAFJ6DxCcNp4tc3Jvpt/MBPJZj1VdppZintIBhhLzP8ZwIffSYvBfzhtk 8Q8znfGr0C6KOuYQ7jxGZZhpy3dpXHZYTJBHFtvUCguMyrq7NxRxyN916C06FWVTvSP9 A7Ug== MIME-Version: 1.0 From: Tapas Mishra Date: Thu, 27 Sep 2018 20:01:25 +0530 Message-ID: Subject: make failing in custom code To: cygwin AT cygwin DOT com Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id w8REVjt3002758 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. so let me know what could be missing. If it is possible to know from above error The code is mostly signal handling virtual memory implementation in userspace level and handling of block files etc no where it deals with kernel etc. So I hope it should work in cygwin environment. The code on which make is executing can be read/seen here disk.c https://pastebin.com/uywHhbKZ disk.h https://pastebin.com/cXKkDifg main.c https://pastebin.com/z7xakvz5 page_table.c https://pastebin.com/WpVgB9Fh page_table.h https://pastebin.com/Lur8uJXN program.c https://pastebin.com/5giXardt program.h https://pastebin.com/eiyfSNem makefile https://pastebin.com/Axi9gtFa ------- Thanks -- 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