From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2659 Path: news.gmane.org!not-for-mail From: Alexander Stadler Newsgroups: gmane.linux.lib.musl.general Subject: Re: unknown type name 'loff_t' Date: Thu, 24 Jan 2013 19:57:28 +0100 Message-ID: <51018418.70705@univie.ac.at> References: <51001EF6.8040502@univie.ac.at> <20130123173754.GU20323@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1359053851 2455 80.91.229.3 (24 Jan 2013 18:57:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 24 Jan 2013 18:57:31 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2660-gllmg-musl=m.gmane.org@lists.openwall.com Thu Jan 24 19:57:49 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1TyRzf-0002lr-1g for gllmg-musl@plane.gmane.org; Thu, 24 Jan 2013 19:57:47 +0100 Original-Received: (qmail 3089 invoked by uid 550); 24 Jan 2013 18:57:28 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 2037 invoked from network); 24 Jan 2013 18:57:23 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=univie.ac.at; s=rev2; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:References:Subject:To:MIME-Version:From:Date:Message-ID; bh=vAkIJKU88hZPhVfrLqCDkXKjGUozzwBevmPkK/R+aMk=; b=KpJaIaCdtlx6qdkN+NEBOFbcd++4rDD4oQZL7ZZCdzJSaECtuWHoV9yr9adVAXZsA74QEeO1FjfC/96VYkneZ1oNCAMGOq6WAY+81TgEVnytVVHYdDAQZweFadBsITzI2R7yN1Gozz/MmL9ZhAJnehO9HC+M/H8cj4Pg455L7dE=; User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20 In-Reply-To: <20130123173754.GU20323@brightrain.aerifal.cx> X-Univie-Virus-Scan: scanned by ClamAV on joan.univie.ac.at Xref: news.gmane.org gmane.linux.lib.musl.general:2659 Archived-At: Am 23.01.2013 18:37, schrieb Rich Felker: > On Wed, Jan 23, 2013 at 06:33:42PM +0100, Alexander Stadler wrote: >> Thanks for your fast responses. >> >> The other error I'm currently running into is >> >> make[4]: Entering directory `/space/build-trunk/trunk/build_dir/target-mips_r2_musl-0.9.8/uboot-envtools-2012.04.01' >> mips-openwrt-linux-musl-gcc -Wall -Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves -mno-branch-likely -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -I/space/build-trunk/trunk/staging_dir/target-mips_r2_musl-0.9.8/usr/include -I/space/build-trunk/trunk/staging_dir/target-mips_r2_musl-0.9.8/include -I/space/build-trunk/trunk/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_musl-0.9.8/usr/include -I/space/build-trunk/trunk/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_musl-0.9.8/include crc32.c fw_env.c fw_env_main.c -o fw_printenv >> fw_env.c:643:55: error: unknown type name 'loff_t' >> fw_env.c: In function 'flash_read_buf': >> fw_env.c:680:2: error: unknown type name 'loff_t' >> fw_env.c:713:3: warning: implicit declaration of function 'flash_bad_block' [-Wimplicit-function-declaration] >> fw_env.c: In function 'flash_write_buf': >> fw_env.c:777:2: error: unknown type name 'loff_t' >> make[4]: *** [fw_printenv] Error 1 >> make[4]: Leaving directory `/space/build-trunk/trunk/build_dir/target-mips_r2_musl-0.9.8/uboot-envtools-2012.04.01' > > Where is loff_t being used? It's probably the wrong type to use. The > only APIs loff_t is to be used with are under _GNU_SOURCE, so if you > don't need -D_GNU_SOURCE to get the functions, it's doubtful that > loff_t should be used. These functions are in fcntl.h, and it will > #define loff_t off_t when _GNU_SOURCE is defined, so either > -D_GNU_SOURCE or -Dloff_t=off_t would be a workaround, but I think the > issue should be investigated to determine if there's code that needs > to be fixed or if there are other circumstances under which loff_t > should be exposed by musl. > > Rich It's used in http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=blob;f=tools/env/fw_env.c;h=37b60b80a7624566d9ecefdd04c0658134bd654d;hb=HEAD where (you were absolutely right) a #include exists. And -D_GNU_SOURCE helped. Thank you! Happy about that, unfortunately there will come up much more things I think, as seconds later the next undeclared error popped up.. (when compiling mtd mips-openwrt-linux-musl-gcc -Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves -mno-branch-likely -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -Dtarget_ar71xx=1 -Wall -DFIS_SUPPORT=1 -I/space/build-trunk/trunk/staging_dir/target-mips_r2_musl-0.9.8/usr/include -I/space/build-trunk/trunk/staging_dir/target-mips_r2_musl-0.9.8/include -I/space/build-trunk/trunk/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_musl-0.9.8/usr/include -I/space/build-trunk/trunk/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_musl-0.9.8/include -Wall -c -o fis.o fis.c fis.c: In function 'fis_open': fis.c:80:64: error: 'MAP_LOCKED' undeclared (first use in this function) fis.c:80:64: note: each undeclared identifier is reported only once for each function it appears in So I wonder why uClibc? seems to include these things. But there are so many mman.h's and the one referenced from fis.c (sys/mman.h) seems not to have the define, but otheres have.. . How could a proper procedure look like to include these things, and on which side of the code this should go is what I currently don't understand at all. I just don't want to bother you if its bad behaviour of Uclibc which enabled this things to work. But than propably an generic workaround could be found. ) Alex