[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #28325] Build failure: undefined reference to `grub_assert_fail'
From: |
Grégoire Sutre |
Subject: |
[bug #28325] Build failure: undefined reference to `grub_assert_fail' |
Date: |
Thu, 17 Dec 2009 22:59:20 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091123 Iceweasel/3.5.5 (like Firefox/3.5.5; Debian-3.5.5-1) |
URL:
<http://savannah.gnu.org/bugs/?28325>
Summary: Build failure: undefined reference to
`grub_assert_fail'
Project: GNU GRUB
Submitted by: gsutre
Submitted on: Thu 17 Dec 2009 10:59:19 PM GMT
Category: Compilation
Severity: Major
Priority: 5 - Normal
Item Group: Software Error
Status: None
Privacy: Public
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release:
Release: Bazaar - trunk
Reproducibility: Every Time
Planned Release: None
_______________________________________________________
Details:
Hi,
When building grub from trunk, compilation works well until the linking of
grub-fstest where I get the error:
undefined reference to `grub_assert_fail'
I'm compiling with gcc 4.1.3 (on NetBSD 5.0). The log of (./autogen.sh &&
./configure && gmake grub-fstest LDFLAGS=-lintl) is attached.
However, this error does not occur with the 1.97.1 tarball. I believe that
the reason is:
- in version 1.97.1, configure sets CFLAGS to '-g -O2', this is actually done
by the call to AC_PROG_CC, which sets CFLAGS *unless it is already set*.
- in trunk, configure sets CFLAGS (with no `-O2') before the call to
AC_PROG_CC, and hence this call does not change CFLAGS (as it is already
set).
This is confirmed by compiling manually the file kern/command.c:
$
gcc [...] -c -o grub_fstest-kern_command.o kern/command.c
$ nm grub_fstest-kern_command.o | grep assert
U grub_assert_fail
$
gcc [...] -O2 -c -o grub_fstest-kern_command.o kern/command.c
$ nm grub_fstest-kern_command.o | grep assert
$
Note that if use gcc 4.4 (which is not the default on NetBSD), the problem
disappears, i.e. it seems that by default (without optimizations) gcc 4.4 does
not include ``dead'' symbols (?).
Grégoire
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Thu 17 Dec 2009 10:59:19 PM GMT Name: log Size: 28kB By: gsutre
<http://savannah.gnu.org/bugs/download.php?file_id=19287>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?28325>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug #28325] Build failure: undefined reference to `grub_assert_fail',
Grégoire Sutre <=