* Can't compile efi-amd64 on x86
@ 2011-10-28 9:39 Lukas Anzinger
2011-11-03 14:25 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 1 reply; 2+ messages in thread
From: Lukas Anzinger @ 2011-10-28 9:39 UTC (permalink / raw)
To: grub-devel
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
$ 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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Can't compile efi-amd64 on x86
2011-10-28 9:39 Can't compile efi-amd64 on x86 Lukas Anzinger
@ 2011-11-03 14:25 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 0 replies; 2+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2011-11-03 14:25 UTC (permalink / raw)
To: grub-devel
[-- 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 --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-11-03 14:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-28 9:39 Can't compile efi-amd64 on x86 Lukas Anzinger
2011-11-03 14:25 ` Vladimir 'φ-coder/phcoder' Serbinenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).