From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1aeoI2-0003Ph-Iw for mharc-grub-devel@gnu.org; Sat, 12 Mar 2016 13:29:26 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42861) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeoHz-0003PC-6G for grub-devel@gnu.org; Sat, 12 Mar 2016 13:29:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aeoHv-0002Zq-6C for grub-devel@gnu.org; Sat, 12 Mar 2016 13:29:23 -0500 Received: from mail-lb0-x232.google.com ([2a00:1450:4010:c04::232]:34396) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeoHu-0002ZZ-O3; Sat, 12 Mar 2016 13:29:19 -0500 Received: by mail-lb0-x232.google.com with SMTP id xr8so188258971lbb.1; Sat, 12 Mar 2016 10:29:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to; bh=Lt0tgtJr/CI6JpLH5VdRkFonj9BH1sfRvMHYjZ0wg/Q=; b=hgXJLPH19c9xHYKj0fYsX7bHwxeSZIMke6t0wd7XcIpC2VjDTNyCvRR1MnUmVjg9Yi guyoNN/YUhaTFQzUPCagqsABzR764kMOOd3P0uXiebCsaA7FczMrQtm/eWrfgXZtgyNp LV+0nq15vjqstU6y6fCLsE82+SA2GSZHl60wdcH/aHXs2kWvR/b3aXQFuFHsfLYPNme+ W8SQzifiXAPT4UrxqUyLwF6WYnPkRQJGH9UzlJ+NoVEpl6a3OjZwz/fm4eGGMwFtVrEF LdbIbAQCUUdkE5gOiBHfMOW0issTC41YmRn0OsbufXca9F0FKDWSsIW5G1J4OKW3RHgu 4rFw== 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:from:message-id:date :user-agent:mime-version:in-reply-to; bh=Lt0tgtJr/CI6JpLH5VdRkFonj9BH1sfRvMHYjZ0wg/Q=; b=C6AGAtEg9yMKcXgFdu/w1ZbJlVSTYioYoEq8n9wprjx7oggVpJevHF2UCL6IjCVPXR mZS/eaNOjDkN7cFD/7R19CZfmeljYiuYoSCov3GGx10sMw2VPQzc34POlB0KMQhEJnWG 7wA65OPYv5rwg9FdYzR4QGhodcX/Ulfb8SnyYxB2ddvry3KTX0CaBo5KjGax8NpoV7Jl lNpQmzLpnQ/eCQKHl9xajaMQH4sxGxDiOxFbJ3h/eQTi74oeuzcXAHlL0SFapYYDF8Uw 09ju1S/tNDGiqVLiDyXMJ23bAuiNjjZb+MPT0ZT+4CRqfpsARWK3vyRdGXCUljI/wMmL ZjnQ== X-Gm-Message-State: AD7BkJLs+r6AgKC4Gfju1DYt90/3o3Z27C3vtpvKHWtiQVT8Fih3UVVBwgzt8HfPa6mrNQ== X-Received: by 10.112.128.225 with SMTP id nr1mr5085390lbb.101.1457807357356; Sat, 12 Mar 2016 10:29:17 -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 h6sm2322858lbv.43.2016.03.12.10.29.15 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 12 Mar 2016 10:29:16 -0800 (PST) Subject: Re: [openbsd] 2.02-beta3: build fails - getroot.c:(.text+0x2b): undefined reference to `getrawpartition' To: Jiri B , bug-grub@gnu.org, The development of GNU GRUB References: <20160312165742.GR17281@wolfman.devio.us> From: Andrei Borzenkov X-Enigmail-Draft-Status: N1110 Message-ID: <56E45FFB.3070807@gmail.com> Date: Sat, 12 Mar 2016 21:29:15 +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: <20160312165742.GR17281@wolfman.devio.us> Content-Type: multipart/mixed; boundary="------------080608030707030705050306" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c04::232 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: Sat, 12 Mar 2016 18:29:24 -0000 This is a multi-part message in MIME format. --------------080608030707030705050306 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 12.03.2016 19:57, Jiri B пишет: > Hi, > > I'm trying to build grub-2.02-beta3 on OpenBSD 5.9 amd64 and build > fails: > > 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 -Wno- 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? > Plus, autogen.sh uses GNU options of find command, till now > I solved that this way: > > --- autogen.sh.orig Sat Mar 12 17:02:35 2016 > +++ autogen.sh Sat Mar 12 17:03:05 2016 > @ -8,7 +8,7 @@ set -e > export LC_COLLATE=C > unset LC_ALL > > -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? > echo "Importing unicode..." > > 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? > 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? > Howto reproduce: > 1. OpenBSD 5.9 amd64 (snapshot; I have one cca month old) > 2. get grub-2.02-beta3 > 3. autoconf-2.62, automake-1.10, python-2.7, gcc-4.9 > 4. (replace 'ipath' with 'path' in autogen.sh, see above) > 5. put PYTHON in env pointing to python2.7 > 6. build > > Thanks for help. > > j. > > _______________________________________________ > Bug-grub mailing list > Bug-grub@gnu.org > https://lists.gnu.org/mailman/listinfo/bug-grub > --------------080608030707030705050306 Content-Type: text/x-patch; name="libutil.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="libutil.patch" From: Andrei Borzenkov Subject: [PATCH] Makefile.util.def: add $LIBINTL to grub-macbless flags Fixes compilation on Open BSD. Reported by Jiri B --- Makefile.util.def | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 =3D { ldadd =3D libgrubgcry.a; ldadd =3D libgrubkern.a; ldadd =3D grub-core/gnulib/libgnu.a; - ldadd =3D '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM= )'; + ldadd =3D '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR= ) $(LIBGEOM)'; }; =20 data =3D { --=20 tg: (3c3e96d..) u/bsd-libutil (depends on: master) --------------080608030707030705050306--