Modify

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#7269 closed defect (fixed)

grub not building for x86

Reported by: Dennis Bartsch Owned by: nico
Priority: high Milestone: Backfire 10.03.1
Component: base system Version: Trunk
Keywords: Cc:

Description

when building openwrt on ubuntu lucid x86-64 grub won't build. googling a bit I found out that adding "-fno-stack-protector" to CFLAGS of the grub package solved the compile errors.

Attachments (0)

Change History (6)

comment:3 Changed 7 years ago by nico

  • Owner changed from developers to nico
  • Status changed from new to accepted

I'm working on a fix...

comment:4 Changed 7 years ago by framer99

if it's any help, last night I started having a similar problem on fedora12 x86_64.

grub configure fails to compile this conftest.c:

/* confdefs.h.  */

 #define PACKAGE_NAME "GRUB"
 #define PACKAGE_TARNAME "grub"
 #define PACKAGE_VERSION "0.97"
 #define PACKAGE_STRING "GRUB 0.97"
 #define PACKAGE_BUGREPORT "bug-grub@gnu.org"
 #define PACKAGE "grub"
 #define VERSION "0.97"
 /* end confdefs.h.  */

 int
 main ()
 {

   ;
   return 0;
 }

with gcc command line
gcc -march=i486 -m32 -static conftest.c

Just trying to build conftest.c natively with:
gcc -static conftest.c
fails to find -lc (looking for .a static version)
Turns out I needed to install glibc-static package, but there is only a x86_64 bit version
so gcc -static -m32 doesn't work yet.

I've built trunk many time on this machine a couple weeks so I'm not sure what started this problem.

comment:5 Changed 7 years ago by anonymous

just to update things, i found the 32 bit glibc-static on a fedora mirror, for some reason yum didn't know about it( tried clean all/update a few times).

grub now builds ok.

maybe this was just a yum/rpm problem on my end but "it used to work" and it quit last night.

comment:6 Changed 7 years ago by nico

  • Resolution set to fixed
  • Status changed from accepted to closed

Fixed with recent grub changes in both trunk & backfire

comment:7 follow-up: Changed 7 years ago by anonymous

to use an x86_64 machine to make x86_32 firmawre, on debian do:
aptitude install gcc-multilib

comment:8 in reply to: ↑ 7 Changed 7 years ago by Bart Swinnen <bartswinnen@…>

Replying to anonymous:

to use an x86_64 machine to make x86_32 firmawre, on debian do:
aptitude install gcc-multilib

Can that gcc--multilib issue be checked by openwrt scripts? It's exactly what I needed to build GRUB.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.