grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't compile efi-amd64 on x86


From: Vladimir 'φ-coder/phcoder' Serbinenko
Subject: Re: Can't compile efi-amd64 on x86
Date: Thu, 03 Nov 2011 15:25:04 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20111010 Iceowl/1.0b2 Icedove/3.1.15

On 28.10.2011 11:39, Lukas Anzinger wrote:
> Hi,
>
> I branched the latest revision from the Bazaar repository and wanted
> to compile it for EFI-amd64:
>
> ###
> $ ./configure --prefix=/usr --includedir=\${prefix}/include
> --mandir=\${prefix}/share/man --infodir=\${prefix}/share/info
> --sysconfdir=/etc --localstatedir=/var
> --libexecdir=\${prefix}/lib/grub2 --disable-maintainer-mode
> --disable-dependency-tracking --enable-grub-mkfont --with-platform=efi
> --target=amd64-pe
Target is wrong. It should be x86_64 or x86_64-elf. GRUB is compiled to
ELF and only mkimage translates it to PE.
> $ make
> [...]
> In file included from ./lib/minilzo/lzoconf.h:75:0,
>                  from ./lib/minilzo/minilzo.h:60,
>                  from fs/btrfs.c:29:
> ./lib/minilzo/lzodefs.h:849:6: error: #error "this should not happen"
> ###
>
> The line 849 from lzodefs.h:
>
> ###
> 841 #if (LZO_ARCH_I386)
> 842 #  if (UINT_MAX != LZO_0xffffL) && defined(__i386_int16__)
> 843 #    error "this should not happen"
> 844 #  endif
> 845 #  if (UINT_MAX != LZO_0xffffffffL) && !defined(__i386_int16__)
> 846 #    error "this should not happen"
> 847 #  endif
> 848 #  if (ULONG_MAX != LZO_0xffffffffL)
> 849 #    error "this should not happen"
> 850 #  endif
> 851 #endif
> ###
>
> So it looks like LZO_ARCH_I386 is defined although it shouldn't be
> since I want to compile an efi-amd64 version. The configure command
> works with the latest official release 1.99 (as well as ~rc2):
> everything compiles correctly. I think it's due to the change of the
> LZO library.
>
> I can also reproduce the problem if I want to compile the file "manually":
>
> ###
> address@hidden:~/grub/grub-core# gcc -E -DGRUB_LST_GENERATOR
> -Dgrub_fs_register=FS_LIST_MARKER
> -Dgrub_video_register=VIDEO_LIST_MARKER
> -Dgrub_parttool_register=PARTTOOL_LIST_MARKER
> -Dgrub_partition_map_register=PARTMAP_LIST_MARKER
> '-Dgrub_term_register_input(...)=INPUT_TERMINAL_LIST_MARKER(__VA_ARGS__)'
> '-Dgrub_term_register_output(...)=OUTPUT_TERMINAL_LIST_MARKER(__VA_ARGS__)'
> '-Dgrub_register_command(...)=COMMAND_LIST_MARKER(__VA_ARGS__)'
> '-Dgrub_register_extcmd(...)=EXTCOMMAND_LIST_MARKER(__VA_ARGS__)'
> '-Dgrub_register_command_p1(...)=P1COMMAND_LIST_MARKER(__VA_ARGS__)'
> -DHAVE_CONFIG_H -I. -I..  -Wall -W -I../include -I../include
> -DGRUB_MACHINE_EFI=1 -DGRUB_MACHINE=X86_64_EFI -nostdinc -isystem
> /usr/lib/gcc/i486-linux-gnu/4.6/include -DGRUB_FILE=\"fs/btrfs.c\" -I.
> -I. -I.. -I.. -I../include -I../include   -I./lib/posix_wrap
> -I./lib/minilzo -DMINILZO_HAVE_CONFIG_H   fs/btrfs.c lib/crc.c
>> /dev/null
> In file included from ./lib/minilzo/lzoconf.h:75:0,
>                  from ./lib/minilzo/minilzo.h:60,
>                  from fs/btrfs.c:29:
> ./lib/minilzo/lzodefs.h:849:6: error: #error "this should not happen"
> ###
>
> If I add "-m64" to the gcc call, it compiles correctly. This looks
> like an error in the build system to me, however, I don't have any
> experience with GNU autotools.
>
> Maybe somebody can take a look at it.
>
> Regards,
>
> Lukas
>
> _______________________________________________
> Grub-devel mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/grub-devel
>


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]