From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1ageza-0003RU-Ql for mharc-grub-devel@gnu.org; Thu, 17 Mar 2016 16:58:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46619) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agezY-0003Q3-Nx for grub-devel@gnu.org; Thu, 17 Mar 2016 16:58:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1agezX-0000zX-SU for grub-devel@gnu.org; Thu, 17 Mar 2016 16:58:00 -0400 Received: from wolfman.devio.us ([98.142.108.75]:38637) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agezQ-0000yJ-Cx; Thu, 17 Mar 2016 16:57:52 -0400 Received: from localhost (localhost [127.0.0.1]) by wolfman.devio.us (Postfix) with ESMTP id 65D2B201DCB; Thu, 17 Mar 2016 16:56:42 -0400 (EDT) X-Virus-Scanned: amavisd-new at devio.us Received: from wolfman.devio.us ([127.0.0.1]) by localhost (wolfman.devio.us [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aP5y_G547I_d; Thu, 17 Mar 2016 16:56:41 -0400 (EDT) Received: by wolfman.devio.us (Postfix, from userid 2589) id AA826201DEC; Thu, 17 Mar 2016 16:56:41 -0400 (EDT) Date: Thu, 17 Mar 2016 16:56:41 -0400 From: Jiri B To: Andrei Borzenkov Subject: Re: [openbsd] 2.02-beta3: build fails - getroot.c:(.text+0x2b): undefined reference to `getrawpartition' Message-ID: <20160317205641.GB32407@wolfman.devio.us> References: <20160312165742.GR17281@wolfman.devio.us> <56E45FFB.3070807@gmail.com> <20160312195423.GS17281@wolfman.devio.us> <56E4FD87.1040009@gmail.com> <20160314181957.GV17281@wolfman.devio.us> <56E706FC.4000905@gmail.com> <20160317101239.GY17281@wolfman.devio.us> <56EAD33C.2020805@gmail.com> <56EAD654.9080509@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <56EAD654.9080509@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: OpenBSD 4.x-5.x X-Received-From: 98.142.108.75 Cc: Vladimir 'phcoder' Serbinenko , The development of GNU GRUB , bug-grub@gnu.org X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Mar 2016 20:58:01 -0000 > >> [...] > >> Well, your compiler managed to create shared library instead of > >> executable file: > >> > >> bor@bor-Latitude-E5450:~$ LANG=3DC objdump -f =D0=97=D0=B0=D0=B3=D1=80= =D1=83=D0=B7=D0=BA=D0=B8/lzma_decompress.image > >> > >> =D0=97=D0=B0=D0=B3=D1=80=D1=83=D0=B7=D0=BA=D0=B8/lzma_decompress.ima= ge: file format elf32-i386 > >> architecture: i386, flags 0x00000050: > >> HAS_SYMS, DYNAMIC > >> start address 0x00008200 > >> > >> I get the same if I explicitly add -shared to linker flags. > >> > >> Could you test with > >> > >> ./configure TARGET_LDFLAGS=3D-static TARGET_LDFLAGS=3D-static caused no difference. But... While being a little bit desperate I had a look at grub 0.9.x in OpenBSD ports and there was CFLAGS=3D-ftrampolines -fno-stack-protector -fno-pie -nopie So I gave it a try and it seems better (?) $ ls -l /home/jirib/openbsd/pobj/grub-2.02-beta3/fake-amd64/usr/local/lib= /grub/i386-pc/lzma_decompress.im* -rwxr-xr-x 1 jirib wheel 3068 Mar 17 21:45 /home/jirib/openbsd/pobj/gr= ub-2.02-beta3/fake-amd64/usr/local/lib/grub/i386-pc/lzma_decompress.image= * -rw-r--r-- 1 jirib wheel 2832 Mar 17 21:45 /home/jirib/openbsd/pobj/gr= ub-2.02-beta3/fake-amd64/usr/local/lib/grub/i386-pc/lzma_decompress.img $ objdump -f /home/jirib/openbsd/pobj/grub-2.02-beta3/fake-amd64/usr/loca= l/lib/grub/i386-pc/lzma_decompress.image /home/jirib/openbsd/pobj/grub-2.02-beta3/fake-amd64/usr/local/lib/grub/i3= 86-pc/lzma_decompress.image: file format elf32-i386 architecture: i386, flags 0x00000002: EXEC_P start address 0x00008200 It is OK? grub 0.9.x in OpenBSD ports is for i386 arch only (not for 64bit one). I have no idea why, I'll ask on ports@ list some OpenBSD porters. j.