grub-fstest build issue in grub2-r2071 +
Hi all,
I have built grub2-r2065 and it works nicely for me so far for linux boots (love the graphics!!). However, beginning with r2071, I am unable to build it with the "--enable-grub-fstest" option due to several undefined refs:
# ---------------------------------------------------------------------------------------------------------
# Fix grub_fstest-normal_misc.o unresolve ref error:
# In function `grub_normal_print_device_info': # /build/grub2-r2077-jps_src/grub2-r2077/normal/misc.c:74: undefined reference to `grub_unixtime2datetime' # /build/grub2-r2077-jps_src/grub2-r2077/normal/misc.c:75: undefined reference to `grub_get_weekday_name' # grub_fstest-commands_ls.o: In function `print_files_long': # /build/grub2-r2077-jps_src/grub2-r2077/commands/ls.c:149: undefined reference to `grub_unixtime2datetime' # /build/grub2-r2077-jps_src/grub2-r2077/commands/ls.c:151: undefined reference to `grub_get_weekday_name' # collect2: ld returned 1 exit status # make: *** [grub-fstest] Error 1
# ----------------------------------------------------------------------------------------------------------
# conf/common.rmk is used by configure to generate conf/common.mk, so modify the former.
To handle this (I'm now building r2101), I add normal/datetime to the grub-fstest build specs, as follows:
# -----------------------------------------------------------------------------------------------------------------
# Only add normal/datetime.c if not present:
sed '/grub-fstest.c_DEPENDENCIES/,/For /{s:normal/datetime.c:jps:}' \
conf/common.rmk |grep -q jps ||
sed -i 's:^grub_fstest_SOURCES =:& normal/datetime.c:' conf/common.rmk
# ------------------------------------------------------------------------------------------------------------------
Has anyone come across this ? Actually, I'm not even sure what fstest is used for, so I could simply remove the option when I do configure...
John
Quoted 6 lines · John Stanley
Hi all,
I have built grub2-r2065 and it works nicely for me so far for linux boots (love the graphics!!). However, beginning with r2071, I am unable to build it with the "--enable-grub-fstest" option due to several undefined refs:
It started in r2067.
Quoted 2 lines
To handle this (I'm now building r2101), I add normal/datetime to the grub-fstest build specs,
Fixed in subversion. Thank you!
Signature · 2 lines
Regards, Pavel Roskin
Hi Again,
Thanks, r2104 builds with --enable-grub-fstest now, but a new problem, not present in r2101 has surfaced: the command grub-probe now aborts on my system with xfs filesystems. Therefore, I cannot run grub-install (even with --modules=xfs). With rev's 2101, 2087, 2077, 2071, and 2065 grub-probe ran without error. Here's my hd config:
#device mount-point fs type options dump fsck /dev/hda1 swap swap defaults 0 0 /dev/hda2 / xfs defaults 1 1
and here's the output of grub-probe (r2104):
# grub-probe -v --target=fs --device /dev/hda2 grub-probe: info: the size of hd0 is 156301488 grub-probe: info: the size of hd0 is 156301488 grub-probe: info: the size of hd0 is 156301488 grub-probe: info: the size of hd0 is 156301488 grub-probe: info: the size of hd0 is 156301488 grub-probe: info: the size of hd0 is 156301488 grub-probe: info: the size of hd0 is 156301488 grub-probe: info: the size of hd1 is 156301488 grub-probe: info: the size of hd1 is 156301488 grub-probe: info: the size of hd1 is 156301488 grub-probe: info: the size of hd1 is 156301488 grub-probe: info: the size of hd0 is 156301488 grub-probe: info: the size of hd0 is 156301488 grub-probe: info: the size of hd0 is 156301488 grub-probe: info: the size of hd0 is 156301488 grub-probe: info: the size of hd0 is 156301488 grub-probe: info: the size of hd0 is 156301488 grub-probe: info: the size of hd0 is 156301488 grub-probe: info: the size of hd1 is 156301488 grub-probe: info: the size of hd1 is 156301488 grub-probe: info: the size of hd1 is 156301488 grub-probe: info: the size of hd1 is 156301488 grub-probe: info: /dev/hda2 starts from 2056320 grub-probe: info: opening the device hd0 grub-probe: info: the size of hd0 is 156301488 Aborted
thanks again,
John
Quoted 16 lines · Pavel Roskin
Quoted 4 lines · John Stanley
Hi all,
I have built grub2-r2065 and it works nicely for me so far for linux boots (love the graphics!!). However, beginning with r2071, I am unable to build it with the "--enable-grub-fstest" option due to several undefined refs:
It started in r2067.
Quoted 2 lines
To handle this (I'm now building r2101), I add normal/datetime to the grub-fstest build specs,
Fixed in subversion. Thank you!
An update: I looked at the change between r2077 and r2104 and it looks like the relevant code is util/hostdisk.c; I've attached a patch that appears to fix the problem.
John
Hi Again,
Thanks, r2104 builds with --enable-grub-fstest now, but a new problem, not present in r2101 has surfaced: the command grub-probe now aborts on my system with xfs filesystems. Therefore, I cannot run grub-install (even with --modules=xfs). With rev's 2101, 2087, 2077, 2071, and 2065 grub-probe ran without error. Here's my hd config:
#device mount-point fs type options dump fsck /dev/hda1 swap swap defaults 0 0 /dev/hda2 / xfs defaults 1 1
and here's the output of grub-probe (r2104):
# grub-probe -v --target=fs --device /dev/hda2 grub-probe: info: the size of hd0 is 156301488 grub-probe: info: the size of hd0 is 156301488 grub-probe: info: the size of hd0 is 156301488 grub-probe: info: the size of hd0 is 156301488 grub-probe: info: the size of hd0 is 156301488 grub-probe: info: the size of hd0 is 156301488 grub-probe: info: the size of hd0 is 156301488 grub-probe: info: the size of hd1 is 156301488 grub-probe: info: the size of hd1 is 156301488 grub-probe: info: the size of hd1 is 156301488 grub-probe: info: the size of hd1 is 156301488 grub-probe: info: the size of hd0 is 156301488 grub-probe: info: the size of hd0 is 156301488 grub-probe: info: the size of hd0 is 156301488 grub-probe: info: the size of hd0 is 156301488 grub-probe: info: the size of hd0 is 156301488 grub-probe: info: the size of hd0 is 156301488 grub-probe: info: the size of hd0 is 156301488 grub-probe: info: the size of hd1 is 156301488 grub-probe: info: the size of hd1 is 156301488 grub-probe: info: the size of hd1 is 156301488 grub-probe: info: the size of hd1 is 156301488 grub-probe: info: /dev/hda2 starts from 2056320 grub-probe: info: opening the device hd0 grub-probe: info: the size of hd0 is 156301488 Aborted
thanks again,
John
Quoted 7 lines · Pavel Roskin
Quoted 4 lines · John Stanley
Hi all,
I have built grub2-r2065 and it works nicely for me so far for linux boots (love the graphics!!). However, beginning with r2071, I am unable to build it with the "--enable-grub-fstest" option due to several undefined refs:
Quoted 9 lines
It started in r2067.
Quoted 2 lines
To handle this (I'm now building r2101), I add normal/datetime to the grub-fstest build specs,
Fixed in subversion. Thank you!
_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
*** grub2-r2104.orig/util/hostdisk.c 2009-04-13 23:06:08.000000000 -0400
--- grub2-r2104/util/hostdisk.c 2009-04-14 04:57:48.736246452 -0400
***************
*** 625,636 ****
int len = strlen(map[drive].drive);
char *p;! if (dos_part >= 0)
! len += 1 + ((dos_part + 1) / 10);
if (bsd_part >= 0)
len += 2;! p = xmalloc (len);
sprintf (p, "%s", map[drive].drive);
if (dos_part >= 0)
--- 625,644 ----
int len = strlen(map[drive].drive);
char *p;! if (dos_part >= 0) {
! // Add in char length of dos_part+1
! int tmp = dos_part + 1;
! ++len;
! while ( (tmp /= 10) ) len++;
! }
if (bsd_part >= 0)
len += 2;! // Length to alloc is: char length of map[drive].drive, plus
! // char length of (dos_part+1) or of bsd_part, plus
! // 2 for the comma and a null/end of string (\0)
! p = xmalloc (len+2);
!
sprintf (p, "%s", map[drive].drive);
if (dos_part >= 0)From: John Stanley <[email protected]>
Date: Tue, 14 Apr 2009 05:17:44 -0400
Quoted 3 lines
An update: I looked at the change between r2077 and r2104 and it looks like the relevant code is
util/hostdisk.c; I've attached a patch that appears to fix the problem.
Sorry about that bug.
I did test that patch, I wonder why it worked for me :-)
From: David Miller <[email protected]>
Date: Tue, 14 Apr 2009 01:53:00 -0700 (PDT)
Quoted 10 lines
From: John Stanley <[email protected]>
Date: Tue, 14 Apr 2009 05:17:44 -0400Quoted 3 lines
An update: I looked at the change between r2077 and r2104 and it looks like the relevant code is
util/hostdisk.c; I've attached a patch that appears to fix the problem.Sorry about that bug.
I did test that patch, I wonder why it worked for me :-)
I commited your fix with some minor coding style fixes.
Thanks!