All of lore.kernel.org
 help / color / mirror / Atom feed
* 64-bit UEFI build is broken
@ 2011-11-09  5:55 Seth Goldberg
  2011-11-09  6:17 ` Seth Goldberg
  0 siblings, 1 reply; 6+ messages in thread
From: Seth Goldberg @ 2011-11-09  5:55 UTC (permalink / raw)
  To: grub-devel


  Latest trunk (Linux host, configured with "--target=x86_64 
--with-platform=efi") stops while building btrfs:

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../../grub-core -I..  -Wall -W -I../../include 
-I../include  -DGRUB_MACHINE_EFI=1 -DGRUB_MACHINE=X86_64_EFI -nostdinc 
-isystem /usr/lib/gcc/i686-linux-gnu/4.6.1/include -DGRUB_FILE=\"fs/btrfs.c\" 
-I. -I../../grub-core -I.. -I../.. -I../../include -I../include 
-I../../grub-core/lib/posix_wrap -I../../grub-core/lib/minilzo 
-DMINILZO_HAVE_CONFIG_H   ../../grub-core/fs/btrfs.c ../../grub-core/lib/crc.c 
> btrfs.marker.new || (rm -f btrfs.marker; exit 1)
In file included from ../../grub-core/lib/minilzo/lzoconf.h:75:0,
                  from ../../grub-core/lib/minilzo/minilzo.h:60,
                  from ../../grub-core/fs/btrfs.c:29:
../../grub-core/lib/minilzo/lzodefs.h:849:6: error: #error "this should not 
happen"
make[3]: *** [btrfs.marker] Error 1


   It's not expecting sizeof(ulong_t) to exceed 32-bits.

  --S


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 64-bit UEFI build is broken
  2011-11-09  5:55 64-bit UEFI build is broken Seth Goldberg
@ 2011-11-09  6:17 ` Seth Goldberg
  2011-11-09  7:26   ` Lukas Anzinger
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Seth Goldberg @ 2011-11-09  6:17 UTC (permalink / raw)
  To: The development of GNU GRUB

Hi,

   Just a followup -- it appears that the root cause is a missing "-m64" -- 
since the compilation for this platform should be done with -m64, the 
preprocessing done for .lst generation should also be done with that cflag, 
otherwise (at least in this case), the library gets confused.

  Adding 'TARGET_CPPFLAGS=-m64" to the configure line allowed the build to 
finish without errors (though I'm not sure if that's the proper fix).

  --S

Quoting Seth Goldberg, who wrote the following on Tue, 8 Nov 2011:

>
> Latest trunk (Linux host, configured with "--target=x86_64 
> --with-platform=efi") stops while building btrfs:
>
> 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../../grub-core -I..  -Wall -W -I../../include 
> -I../include  -DGRUB_MACHINE_EFI=1 -DGRUB_MACHINE=X86_64_EFI -nostdinc 
> -isystem /usr/lib/gcc/i686-linux-gnu/4.6.1/include -DGRUB_FILE=\"fs/btrfs.c\" 
> -I. -I../../grub-core -I.. -I../.. -I../../include -I../include 
> -I../../grub-core/lib/posix_wrap -I../../grub-core/lib/minilzo 
> -DMINILZO_HAVE_CONFIG_H   ../../grub-core/fs/btrfs.c 
> ../../grub-core/lib/crc.c 
>> btrfs.marker.new || (rm -f btrfs.marker; exit 1)
> In file included from ../../grub-core/lib/minilzo/lzoconf.h:75:0,
>                 from ../../grub-core/lib/minilzo/minilzo.h:60,
>                 from ../../grub-core/fs/btrfs.c:29:
> ../../grub-core/lib/minilzo/lzodefs.h:849:6: error: #error "this should not 
> happen"
> make[3]: *** [btrfs.marker] Error 1
>
>
>  It's not expecting sizeof(ulong_t) to exceed 32-bits.
>
> --S
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 64-bit UEFI build is broken
  2011-11-09  6:17 ` Seth Goldberg
@ 2011-11-09  7:26   ` Lukas Anzinger
  2011-11-09  9:00   ` Vladimir 'φ-coder/phcoder' Serbinenko
  2011-11-09  9:09   ` Vladimir 'φ-coder/phcoder' Serbinenko
  2 siblings, 0 replies; 6+ messages in thread
From: Lukas Anzinger @ 2011-11-09  7:26 UTC (permalink / raw)
  To: The development of GNU GRUB

I also encountered the same problem when I tried to build Debian
packages out of trunk.

http://lists.gnu.org/archive/html/grub-devel/2011-10/msg00048.html

Answer from Vladimir:
http://lists.gnu.org/archive/html/grub-devel/2011-11/msg00016.html

I have not tried the suggested workaround from Vladimir yet, though.

Regards,

Lukas

On Wed, Nov 9, 2011 at 07:17, Seth Goldberg <seth.goldberg@oracle.com> wrote:
> Hi,
>
>  Just a followup -- it appears that the root cause is a missing "-m64" --
> since the compilation for this platform should be done with -m64, the
> preprocessing done for .lst generation should also be done with that cflag,
> otherwise (at least in this case), the library gets confused.
>
>  Adding 'TARGET_CPPFLAGS=-m64" to the configure line allowed the build to
> finish without errors (though I'm not sure if that's the proper fix).
>
>  --S
>
> Quoting Seth Goldberg, who wrote the following on Tue, 8 Nov 2011:
>
>>
>> Latest trunk (Linux host, configured with "--target=x86_64
>> --with-platform=efi") stops while building btrfs:
>>
>> 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../../grub-core -I..  -Wall -W -I../../include
>> -I../include  -DGRUB_MACHINE_EFI=1 -DGRUB_MACHINE=X86_64_EFI -nostdinc
>> -isystem /usr/lib/gcc/i686-linux-gnu/4.6.1/include
>> -DGRUB_FILE=\"fs/btrfs.c\" -I. -I../../grub-core -I.. -I../..
>> -I../../include -I../include -I../../grub-core/lib/posix_wrap
>> -I../../grub-core/lib/minilzo -DMINILZO_HAVE_CONFIG_H
>> ../../grub-core/fs/btrfs.c ../../grub-core/lib/crc.c
>>>
>>> btrfs.marker.new || (rm -f btrfs.marker; exit 1)
>>
>> In file included from ../../grub-core/lib/minilzo/lzoconf.h:75:0,
>>                from ../../grub-core/lib/minilzo/minilzo.h:60,
>>                from ../../grub-core/fs/btrfs.c:29:
>> ../../grub-core/lib/minilzo/lzodefs.h:849:6: error: #error "this should
>> not happen"
>> make[3]: *** [btrfs.marker] Error 1
>>
>>
>>  It's not expecting sizeof(ulong_t) to exceed 32-bits.
>>
>> --S
>>
>> _______________________________________________
>> Grub-devel mailing list
>> Grub-devel@gnu.org
>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 64-bit UEFI build is broken
  2011-11-09  6:17 ` Seth Goldberg
  2011-11-09  7:26   ` Lukas Anzinger
@ 2011-11-09  9:00   ` Vladimir 'φ-coder/phcoder' Serbinenko
  2011-11-09  9:09   ` Vladimir 'φ-coder/phcoder' Serbinenko
  2 siblings, 0 replies; 6+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2011-11-09  9:00 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 2636 bytes --]

On 09.11.2011 07:17, Seth Goldberg wrote:
> Hi,
>
>   Just a followup -- it appears that the root cause is a missing
> "-m64" -- since the compilation for this platform should be done with
> -m64, the preprocessing done for .lst generation should also be done
> with that cflag, otherwise (at least in this case), the library gets
> confused.
>
>  Adding 'TARGET_CPPFLAGS=-m64" to the configure line allowed the build
> to finish without errors (though I'm not sure if that's the proper fix).
>  
You're right. This is the problem.
>
>  --S
>
> Quoting Seth Goldberg, who wrote the following on Tue, 8 Nov 2011:
>
>>
>> Latest trunk (Linux host, configured with "--target=x86_64
>> --with-platform=efi") stops while building btrfs:
>>
>> 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../../grub-core -I..  -Wall -W -I../../include
>> -I../include  -DGRUB_MACHINE_EFI=1 -DGRUB_MACHINE=X86_64_EFI
>> -nostdinc -isystem /usr/lib/gcc/i686-linux-gnu/4.6.1/include
>> -DGRUB_FILE=\"fs/btrfs.c\" -I. -I../../grub-core -I.. -I../..
>> -I../../include -I../include -I../../grub-core/lib/posix_wrap
>> -I../../grub-core/lib/minilzo -DMINILZO_HAVE_CONFIG_H  
>> ../../grub-core/fs/btrfs.c ../../grub-core/lib/crc.c
>>> btrfs.marker.new || (rm -f btrfs.marker; exit 1)
>> In file included from ../../grub-core/lib/minilzo/lzoconf.h:75:0,
>>                 from ../../grub-core/lib/minilzo/minilzo.h:60,
>>                 from ../../grub-core/fs/btrfs.c:29:
>> ../../grub-core/lib/minilzo/lzodefs.h:849:6: error: #error "this
>> should not happen"
>> make[3]: *** [btrfs.marker] Error 1
>>
>>
>>  It's not expecting sizeof(ulong_t) to exceed 32-bits.
>>
>> --S
>>
>> _______________________________________________
>> Grub-devel mailing list
>> Grub-devel@gnu.org
>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>
>
> _______________________________________________
> 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] 6+ messages in thread

* Re: 64-bit UEFI build is broken
  2011-11-09  6:17 ` Seth Goldberg
  2011-11-09  7:26   ` Lukas Anzinger
  2011-11-09  9:00   ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2011-11-09  9:09   ` Vladimir 'φ-coder/phcoder' Serbinenko
  2011-11-09 18:33     ` Seth Goldberg
  2 siblings, 1 reply; 6+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2011-11-09  9:09 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 3268 bytes --]

On 09.11.2011 07:17, Seth Goldberg wrote:
> Hi,
>
>   Just a followup -- it appears that the root cause is a missing
> "-m64" -- since the compilation for this platform should be done with
> -m64, the preprocessing done for .lst generation should also be done
> with that cflag, otherwise (at least in this case), the library gets
> confused.
>
>  Adding 'TARGET_CPPFLAGS=-m64" to the configure line allowed the build
> to finish without errors (though I'm not sure if that's the proper fix).
Please try following patch:
=== modified file 'configure.ac'
--- configure.ac    2011-11-08 11:38:30 +0000
+++ configure.ac    2011-11-09 09:08:28 +0000
@@ -464,6 +464,7 @@
   # Force 32-bit mode.
   TARGET_CFLAGS="$TARGET_CFLAGS -m32"
   TARGET_CCASFLAGS="$TARGET_CCASFLAGS -m32"
+  TARGET_CPPFLAGS="$TARGET_CPPFLAGS -m32"
   TARGET_LDFLAGS="$TARGET_LDFLAGS -m32"
   TARGET_MODULE_FORMAT="elf32"
 fi
@@ -472,6 +473,7 @@
   # Force 64-bit mode.
   TARGET_CFLAGS="$TARGET_CFLAGS -m64"
   TARGET_CCASFLAGS="$TARGET_CCASFLAGS -m64"
+  TARGET_CPPFLAGS="$TARGET_CPPFLAGS -m64"
   TARGET_LDFLAGS="$TARGET_LDFLAGS -m64"
   TARGET_MODULE_FORMAT="elf64"
 fi


>
>  --S
>
> Quoting Seth Goldberg, who wrote the following on Tue, 8 Nov 2011:
>
>>
>> Latest trunk (Linux host, configured with "--target=x86_64
>> --with-platform=efi") stops while building btrfs:
>>
>> 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../../grub-core -I..  -Wall -W -I../../include
>> -I../include  -DGRUB_MACHINE_EFI=1 -DGRUB_MACHINE=X86_64_EFI
>> -nostdinc -isystem /usr/lib/gcc/i686-linux-gnu/4.6.1/include
>> -DGRUB_FILE=\"fs/btrfs.c\" -I. -I../../grub-core -I.. -I../..
>> -I../../include -I../include -I../../grub-core/lib/posix_wrap
>> -I../../grub-core/lib/minilzo -DMINILZO_HAVE_CONFIG_H  
>> ../../grub-core/fs/btrfs.c ../../grub-core/lib/crc.c
>>> btrfs.marker.new || (rm -f btrfs.marker; exit 1)
>> In file included from ../../grub-core/lib/minilzo/lzoconf.h:75:0,
>>                 from ../../grub-core/lib/minilzo/minilzo.h:60,
>>                 from ../../grub-core/fs/btrfs.c:29:
>> ../../grub-core/lib/minilzo/lzodefs.h:849:6: error: #error "this
>> should not happen"
>> make[3]: *** [btrfs.marker] Error 1
>>
>>
>>  It's not expecting sizeof(ulong_t) to exceed 32-bits.
>>
>> --S
>>
>> _______________________________________________
>> Grub-devel mailing list
>> Grub-devel@gnu.org
>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>
>
> _______________________________________________
> 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] 6+ messages in thread

* Re: 64-bit UEFI build is broken
  2011-11-09  9:09   ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2011-11-09 18:33     ` Seth Goldberg
  0 siblings, 0 replies; 6+ messages in thread
From: Seth Goldberg @ 2011-11-09 18:33 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1375 bytes --]

Hi,

Quoting Vladimir 'φ-coder/phcoder' Serbinenko, who wrote the following on...:

> On 09.11.2011 07:17, Seth Goldberg wrote:
>> Hi,
>>
>>   Just a followup -- it appears that the root cause is a missing
>> "-m64" -- since the compilation for this platform should be done with
>> -m64, the preprocessing done for .lst generation should also be done
>> with that cflag, otherwise (at least in this case), the library gets
>> confused.
>>
>>  Adding 'TARGET_CPPFLAGS=-m64" to the configure line allowed the build
>> to finish without errors (though I'm not sure if that's the proper fix).
> Please try following patch:
> === modified file 'configure.ac'
> --- configure.ac    2011-11-08 11:38:30 +0000
> +++ configure.ac    2011-11-09 09:08:28 +0000
> @@ -464,6 +464,7 @@
>   # Force 32-bit mode.
>   TARGET_CFLAGS="$TARGET_CFLAGS -m32"
>   TARGET_CCASFLAGS="$TARGET_CCASFLAGS -m32"
> +  TARGET_CPPFLAGS="$TARGET_CPPFLAGS -m32"
>   TARGET_LDFLAGS="$TARGET_LDFLAGS -m32"
>   TARGET_MODULE_FORMAT="elf32"
> fi
> @@ -472,6 +473,7 @@
>   # Force 64-bit mode.
>   TARGET_CFLAGS="$TARGET_CFLAGS -m64"
>   TARGET_CCASFLAGS="$TARGET_CCASFLAGS -m64"
> +  TARGET_CPPFLAGS="$TARGET_CPPFLAGS -m64"
>   TARGET_LDFLAGS="$TARGET_LDFLAGS -m64"
>   TARGET_MODULE_FORMAT="elf64"
> fi


   That fixed the error.  I vote for a commit :).

  Thanks,
  --S

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-11-09 18:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-09  5:55 64-bit UEFI build is broken Seth Goldberg
2011-11-09  6:17 ` Seth Goldberg
2011-11-09  7:26   ` Lukas Anzinger
2011-11-09  9:00   ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-11-09  9:09   ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-11-09 18:33     ` Seth Goldberg

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.