From: Andrei Borzenkov <arvidjaar@gmail.com>
To: Jiri B <jirib@devio.us>,
bug-grub@gnu.org,
The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: [openbsd] 2.02-beta3: build fails - getroot.c:(.text+0x2b): undefined reference to `getrawpartition'
Date: Sat, 12 Mar 2016 21:29:15 +0300 [thread overview]
Message-ID: <56E45FFB.3070807@gmail.com> (raw)
In-Reply-To: <20160312165742.GR17281@wolfman.devio.us>
[-- Attachment #1: Type: text/plain, Size: 4262 bytes --]
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
>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: libutil.patch --]
[-- Type: text/x-patch; name="libutil.patch", Size: 774 bytes --]
From: Andrei Borzenkov <arvidjaar@gmail.com>
Subject: [PATCH] Makefile.util.def: add $LIBINTL to grub-macbless flags
Fixes compilation on Open BSD.
Reported by Jiri B <jirib@devio.us>
---
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 = {
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 = {
--
tg: (3c3e96d..) u/bsd-libutil (depends on: master)
next parent reply other threads:[~2016-03-12 18:29 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20160312165742.GR17281@wolfman.devio.us>
2016-03-12 18:29 ` Andrei Borzenkov [this message]
2016-03-12 19:54 ` [openbsd] 2.02-beta3: build fails - getroot.c:(.text+0x2b): undefined reference to `getrawpartition' Jiri B
2016-03-13 5:41 ` Andrei Borzenkov
2016-03-14 18:19 ` Jiri B
2016-03-14 18:46 ` Andrei Borzenkov
2016-03-17 10:12 ` Jiri B
2016-03-17 15:54 ` Andrei Borzenkov
2016-03-17 16:04 ` Vladimir 'phcoder' Serbinenko
2016-03-17 16:07 ` Andrei Borzenkov
2016-03-17 20:56 ` Jiri B
2016-03-18 3:26 ` Andrei Borzenkov
2016-03-18 13:01 ` Jiri B
2016-03-18 16:53 ` Andrei Borzenkov
2016-03-18 19:48 ` Vladimir 'phcoder' Serbinenko
2016-03-22 10:31 ` Jiri B
2016-03-22 17:48 ` Andrei Borzenkov
2016-03-24 3:55 ` Andrei Borzenkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56E45FFB.3070807@gmail.com \
--to=arvidjaar@gmail.com \
--cc=bug-grub@gnu.org \
--cc=grub-devel@gnu.org \
--cc=jirib@devio.us \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.