grub4dos icon indicating copy to clipboard operation
grub4dos copied to clipboard

Can't compile branch 046a_ahci_nvme

Open mcluskyism opened this issue 3 years ago • 12 comments

Hello, I am sure I am missing something obvious My environment is: Windows 10 64bit PC - MinGW 32bit with gcc.exe (GCC) 4.6.2 Following this tutorial I get undefined reference errors at the stage CCLD pre_stage2.exec.exe from pre_stage2_exec-asm.o to stage2/asm.S Into latter one I find #include "shared.h" (stage2/shared.h) which seems to me to contain the needed definitions What's going wrong? P.S. same with pristine source of master branch Log attached build.txt Thank you

mcluskyism avatar Jul 16 '22 14:07 mcluskyism

Are you sure that windows 10 64bit PC can use MinGW 32bit? Try compiling with 32bit virtual machine.

yaya2007 avatar Jul 16 '22 21:07 yaya2007

Hello @yaya2007 sorry for the delay and thanks for the reply. The laptop on which I compile is corporate, I cannot have Admin rights, so I cannot install any virtual machine manager, but only portable applications like MinGW 32bit (very old version mingw-get-inst-20120426 ). So you suspect the problem is due to the different bitness? Could you suggest another GitHub repository, to try a build and see if the problem is actually due to different processor architectures? Or maybe I need to pass some specific parameter to gcc? (which is 32bit) Thanks for your attention

mcluskyism avatar Jul 18 '22 15:07 mcluskyism

Read the log attached build Txt, like the source file asm S is wrong, such as: \grub4dos\stage2/asm. S:5688: undefined reference to prime_ end' And my prime_ End'at 5694

Take a look at asm S is the head: #define ASM_ FILE #define repair_ memory_ holes 1 //Is there any? #include "filesys.h" #include "shared.h" #define ABS(x) ((x) - EXT_ C(main) + 0x8200)

. file "asm.S" . text

yaya2007 avatar Jul 19 '22 01:07 yaya2007

Hello @yaya2007 hello to everyone involved, if it helps, I have cloned the sources with git clone --depth 1 --branch 046a_ahci_nvme https://github.com/chenall/grub4dos.git I have (in the MinGW's $PATH) git version 2.37.1.windows.1 portable 32bit edition. Did I do something wrong? Thank you

mcluskyism avatar Jul 19 '22 15:07 mcluskyism

Take a look at asm S is the head, Whether there are the following two sentences, if not, add them.

#define ASM_ FILE #define repair_ memory_ holes 1

yaya2007 avatar Jul 19 '22 21:07 yaya2007

Cannot download

yaya2007 avatar Jul 21 '22 05:07 yaya2007

Forbidden (#403) Error, this is a private paste or is pending moderation. If this paste belongs to you, please login to Pastebin to view it.

yaya2007 avatar Jul 21 '22 12:07 yaya2007

You can put asm S sent here.

yaya2007 avatar Jul 21 '22 13:07 yaya2007

asm.rar.txt

yaya2007 avatar Jul 22 '22 04:07 yaya2007

I uploaded asm S is the grub4dos for UEFI version, which is invalid. Download your asm S version, which is consistent with my comparison. Therefore, the problem lies in the compilation environment. I'm not good at this. I can't help you. Sorry.

yaya2007 avatar Jul 23 '22 07:07 yaya2007

In shared.h extern unsigned long minimum_ mem_ hi_ in_ map; Add below

extern unsigned longprime_ end; extern unsigned long new_ end;

have a try

yaya2007 avatar Jul 24 '22 00:07 yaya2007

Hi everyone, sorry if I look dull. I added the two strings extern unsigned long prime_end; and extern unsigned long new_end; after extern unsigned long minimum_mem_hi_in_map; into stage2/shared.h shared.7z.txt but that's not enough, I am attaching the log buillog2.txt Same errors with QEMU, virtual guest WinXP Pro SP3 32bit, same MinGW 32bit toolchain, same source with edited shared.h ... at this point I don't think it's a bitness problem, please see the log QEMUbuildlog.txt Could you please recommend a toolchain, already tested, and which produces a compilation without errors? P.S. I deleted some of my previous comments, too much cluttering

mcluskyism avatar Jul 26 '22 21:07 mcluskyism

Won't fix but please see https://github.com/chenall/grub4dos/issues/398

mcluskyism avatar Mar 02 '23 17:03 mcluskyism