From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1aeymY-0001TX-1h for mharc-grub-devel@gnu.org; Sun, 13 Mar 2016 00:41:38 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53642) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeymV-0001TH-1f for grub-devel@gnu.org; Sun, 13 Mar 2016 00:41:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aeymQ-0006eQ-TY for grub-devel@gnu.org; Sun, 13 Mar 2016 00:41:34 -0500 Received: from mail-lb0-x229.google.com ([2a00:1450:4010:c04::229]:35824) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeymQ-0006eJ-Gp; Sun, 13 Mar 2016 00:41:30 -0500 Received: by mail-lb0-x229.google.com with SMTP id bc4so201685992lbc.2; Sat, 12 Mar 2016 21:41:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=So7eXmVBKTwJ5blTc1RqjRUBTzS9ZX7ocbQI4ToWJcc=; b=WWT7P8dVTuITU6aNyy8wNCPvadoteNq0krV/kviHxJCHIskszwJps9x8UZgITfp892 joiPCn2bueEB53iNCLNVsD13QFivV2Q3NMLKcFm/kO0ZamxdTfm7L8Sj7cFVYiUh2MFg 94AAfBF919NIIvaIBU8Z3fDTLVVcmwHaKK8uj+mDCQPub7LQL0fgzWLe+e46kC9aBQhC 7ERtFcAiwXXFNPPp3iKsocc9Nhg++flTiM7M77v+OPBvD++7djhM5Z3hY4OOSBb0Gr6a cwPE6R8zog9xSJZpSFIEZQ9wYl7q8E+/bBTBar6d+S6lpqy4i0M9OMvE9DsTu3D2n3ci 9x7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=So7eXmVBKTwJ5blTc1RqjRUBTzS9ZX7ocbQI4ToWJcc=; b=RFkBKAHH/S2U1GZ4baaw7Iz+08RdAQH9aVzHYuNoOVdpYpMSAwEsCoZdJjLb5G1arE o6+3mmgCcfDMKC4cbrdW+od/kYsJPNHS1fYHn/fIGI74wbVvlz9sfp2zrZ6E5JitYvt9 VCTQlhT41fQlMlGPO1kJgCMESE/VttBTqemO8xw4Sc7PXyXkMnvSJadRxEexqNR8vsN0 Sovp6RXn/JpDT03/vcvzsHSjHdlSV5upASQYA710l2TKmxTSf/gfMOjDygBndWj6bjyc 1kqPdgE6dyEaPFaigpv470logl51K963b6RUBA2mzgktfhFRtYsxgYix/Tvfl5WPsWX3 kkug== X-Gm-Message-State: AD7BkJKjTqMR5535LfRVItNpR9VzHWdzWXM7wQQiJFVs2CNdpTbml7AtzXRtJeKYz4jsXw== X-Received: by 10.112.129.169 with SMTP id nx9mr5770620lbb.96.1457847689591; Sat, 12 Mar 2016 21:41:29 -0800 (PST) Received: from [192.168.1.42] (ppp109-252-76-159.pppoe.spdop.ru. [109.252.76.159]) by smtp.gmail.com with ESMTPSA id ub6sm2665937lbb.17.2016.03.12.21.41.27 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 12 Mar 2016 21:41:28 -0800 (PST) Subject: Re: [openbsd] 2.02-beta3: build fails - getroot.c:(.text+0x2b): undefined reference to `getrawpartition' To: Jiri B References: <20160312165742.GR17281@wolfman.devio.us> <56E45FFB.3070807@gmail.com> <20160312195423.GS17281@wolfman.devio.us> From: Andrei Borzenkov X-Enigmail-Draft-Status: N1110 Message-ID: <56E4FD87.1040009@gmail.com> Date: Sun, 13 Mar 2016 08:41:27 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <20160312195423.GS17281@wolfman.devio.us> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c04::229 Cc: bug-grub@gnu.org, The development of GNU GRUB 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: Sun, 13 Mar 2016 05:41:36 -0000 12.03.2016 22:54, Jiri B пишет: > On Sat, Mar 12, 2016 at 09:29:15PM +0300, Andrei Borzenkov wrote: >>> cc -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wwrite-strings -Wnested-externs -Wstrict-prototypes -Wcast-align -Wextra -Wattributes -Wendif-labels -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmissing-field-initializers -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast -Wstrict-aliasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign -Wmissing-include-dirs -Wmissing-prototypes -Wmissing-declarations -Wformat=2 -Wno-undef -Wno-sign-compare -Wno-unused -Wno-unused-parameter -Wno-redundant-decls -Wn o >> - >> unreachable-code -Wno-conversion -O2 -pipe -o grub-macbless util/grub_macbless-grub-macbless.o grub-core/osdep/grub_macbless-init.o grub-core/kern/emu/grub_macbless-argp_common.o libgrubmods.a libgrubgcry.a libgrubkern.a grub-core/gnulib/libgnu.a /usr/local/lib/libintl.so.6.0 -L/usr/local/lib /usr/local/lib/libiconv.so.6.0 -lc -Wl,-rpath,/usr/local/lib >>> libgrubkern.a(libgrubkern_a-hostdisk.o): In function `read_device_map': >>> hostdisk.c:(.text+0x7ab): warning: warning: strcpy() is almost always misused, please use strlcpy() >>> libgrubkern.a(libgrubkern_a-misc.o): In function `grub_util_get_path': >>> misc.c:(.text+0x12a): warning: warning: sprintf() is often misused, please use snprintf() >>> libgrubkern.a(libgrubkern_a-getroot.o): In function `grub_util_part_to_disk': >>> getroot.c:(.text+0x2b): undefined reference to `getrawpartition' >>> >> >> Does attached patch help? >> >> diff --git a/Makefile.util.def b/Makefile.util.def >> index ed9b4c6..f9caccb 100644 >> --- a/Makefile.util.def >> +++ b/Makefile.util.def >> @@ -416,7 +416,7 @@ program = { >> ldadd = libgrubgcry.a; >> ldadd = libgrubkern.a; >> ldadd = grub-core/gnulib/libgnu.a; >> - ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)'; >> + ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)'; >> }; >> >> data = { > > Thank you, your diff makes compilation pass. > Good, pushed. Thanks for testing. > Well, I see something went wrong now with compressing a file: > > $ tar tzvf /home/jirib/openbsd/packages/amd64/all/grub-2.02-beta3.tgz | grep lzma_decompress > -r-xr-xr-x 1 root bin 3904 Jan 1 1970 lib/grub/i386-pc/lzma_decompress.image > -r--r--r-- 1 root bin 134480024 Jan 1 1970 lib/grub/i386-pc/lzma_decompress.img > > It should not be 128MB, right? :) > No. Something went wrong with section addresses/offsets. Please test 2.02~beta2 - do you observe the same problem? Please upload lzma_decompress.image. Where obcopy comes from (obcopy --version)? What assembler is used? > I uploaded whole build log here: http://devio.us/~jirib/grub.txt (2.3MB) > >>> -find . -iname '*.[ch]' ! -ipath './grub-core/lib/libgcrypt-grub/*' ! -ipath './build-aux/*' ! -ipath './grub-core/lib/libgcrypt/src/misc.c' ! -ipath './grub-core/lib/libgcrypt/src/global.c' ! -ipath './grub-core/lib/libgcrypt/src/secmem.c' ! -ipath './util/grub-gen-widthspec.c' ! -ipath './util/grub-gen-asciih.c' |sort > po/POTFILES.in >>> +find . -iname '*.[ch]' ! -path './grub-core/lib/libgcrypt-grub/*' ! -path './build-aux/*' ! -path './grub-core/lib/libgcrypt/src/misc.c' ! -path './grub-core/lib/libgcrypt/src/global.c' ! -path './grub-core/lib/libgcrypt/src/secmem.c' ! -path './util/grub-gen-widthspec.c' ! -path './util/grub-gen-asciih.c' |sort > po/POTFILES.in >>> find util -iname '*.in' ! -name Makefile.in |sort > po/POTFILES-shell.in >>> >> >> Hmm ... we support building on Windows which is case insensitive. What >> are other options to compare full path name case insenstive? > > I can live with patching it. OpenBSD find doesn't have 'ipath' and IIUC > it's not POSIX requiremement, so I doubt it will be implemented. > Why did you need it initially? Normally it is needed only when building from GIT; tarball comes with generated files. >>> Another thing - 'INSTALL' file says >= autoconf 2.60 is needed but >>> it is >= 2.62 otherwise there is: >>> >>> "error: possibly undefined macro: AS_ECHO" >>> >> >> Indeed. According to git log, AS_ECHO appeared first in 2.61a. What >> version you have? > > IIUC it was firstly available in "normal" autoconf release in 2.62. > This does not answer my question - what autoconf version your system ships with (i.e. - do we need to change configure.ac or simply update INSTALL)? >>> IIRC there's also a difference between NetBSD and OpenBSD regarding >>> to disks. NetBSD uses eg. /dev/rwd0c for NetBSD part, /dev/rwd0d for >>> whole disk, OpenBSD uses 'c' for whole disk and 'd' has no special >>> reason. >>> >> >> If I understand it correctly, getrawpartition() is supposed to handle it >> (i.e. return entire disk partition number). What exactly does not work? > > The above comment was just comment. Not sure if there's real issue in > grub code based on those NetBSD/OpenBSD differences. > OK, please test after lzma_decompress issue is solved and report problems.