From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: grub-devel@gnu.org
Subject: Re: Can't compile efi-amd64 on x86
Date: Thu, 03 Nov 2011 15:25:04 +0100 [thread overview]
Message-ID: <4EB2A440.3060204@gmail.com> (raw)
In-Reply-To: <CACB1AeuOUKjaHpp8nxkthp3ugqNE2mZ=BNAU+Pb87qcSuRctbg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3351 bytes --]
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":
>
> ###
> lukas@vm:~/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
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]
prev parent reply other threads:[~2011-11-03 14:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-28 9:39 Can't compile efi-amd64 on x86 Lukas Anzinger
2011-11-03 14:25 ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
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=4EB2A440.3060204@gmail.com \
--to=phcoder@gmail.com \
--cc=grub-devel@gnu.org \
/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.