Slice Posted February 20, 2020 Share Posted February 20, 2020 3 hours ago, Slice said: I committed cbuild.bat to make VS compilation and one example to resolve __typeof__. As well I disabled warning 4804 in Base.h. That's all in the moment. About compilation I install fresh Python3.8.1 for all users (run as administrator) and clean environment variables. I have to say that new BaseTools is not working. The working one is old provided with Clover. Can we make *HandleType = static_cast<UINT32*>(AllocatePool(*HandleCount * sizeof(UINT32))); for all compilers? type python in the command line and see the result. see also edksetup.bat Link to comment Share on other sites More sharing options...
Jief_Machak Posted February 20, 2020 Author Share Posted February 20, 2020 15 minutes ago, Slice said: VOID AddListElement(IN OUT VOID ***ListPtr, IN OUT UINTN *ElementCount, IN VOID *NewElement) in the lib.cpp is looks wrong. Should be switch to list.cpp? Are talking about the fact I had to cast, line 2150 of menu.cpp ? That has to be improved. But the best to do it will be when I'll import my template class that'll solve the const problem we have here. Link to comment Share on other sites More sharing options...
Slice Posted February 20, 2020 Share Posted February 20, 2020 There is a new problem d:\projects\clover\rEFIt_UEFI\refit\lib.cpp(345): error C2102: для "&" требуется левостороннее значение d:\projects\clover\rEFIt_UEFI\refit\lib.cpp(358): error C2102: для "&" требуется левостороннее значение d:\projects\clover\rEFIt_UEFI\refit\lib.cpp(360): error C2102: для "&" требуется левостороннее значение it means "required lvalue" Link to comment Share on other sites More sharing options...
Jief_Machak Posted February 20, 2020 Author Share Posted February 20, 2020 15 minutes ago, Slice said: type python in the command line and see the result. see also edksetup.bat Python path configuration: PYTHONHOME = 'd:\Program File\Python38' PYTHONPATH = (not set) program name = 'python' isolated = 0 environment = 1 user site = 1 import site = 1 sys._base_executable = 'C:\\Users\\jief\\AppData\\Local\\Programs\\Python\\Python38\\python.exe' sys.base_prefix = 'd:\\Program File\\Python38' sys.base_exec_prefix = 'd:\\Program File\\Python38' sys.executable = 'C:\\Users\\jief\\AppData\\Local\\Programs\\Python\\Python38\\python.exe' sys.prefix = 'd:\\Program File\\Python38' sys.exec_prefix = 'd:\\Program File\\Python38' sys.path = [ 'C:\\Users\\jief\\AppData\\Local\\Programs\\Python\\Python38\\python38.zip', 'd:\\Program File\\Python38\\DLLs', 'd:\\Program File\\Python38\\lib', 'C:\\Users\\jief\\AppData\\Local\\Programs\\Python\\Python38', ] Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding Python runtime state: core initialized ModuleNotFoundError: No module named 'encodings' Current thread 0x00000278 (most recent call first): <no Python frame> Link to comment Share on other sites More sharing options...
Slice Posted February 20, 2020 Share Posted February 20, 2020 "C:\\Users\\jief\\AppData\\Local\\" it means you installed python for one user while you must install it for all users. Uninstall it and install again running installer as administrator. Link to comment Share on other sites More sharing options...
Jief_Machak Posted February 20, 2020 Author Share Posted February 20, 2020 15 minutes ago, Slice said: There is a new problem d:\projects\clover\rEFIt_UEFI\refit\lib.cpp(345): error C2102: для "&" требуется левостороннее значение d:\projects\clover\rEFIt_UEFI\refit\lib.cpp(358): error C2102: для "&" требуется левостороннее значение d:\projects\clover\rEFIt_UEFI\refit\lib.cpp(360): error C2102: для "&" требуется левостороннее значение it means "required lvalue" Yes, "&" require an lvalue, but line 345,358,360 of lib.cc, there is no "&" Link to comment Share on other sites More sharing options...
Slice Posted February 20, 2020 Share Posted February 20, 2020 Just now, Jief_Machak said: Yes, "&" require an lvalue, but line 345,358,360 of lib.cc, there is no "&" I see. But VS found these errors. Link to comment Share on other sites More sharing options...
Jief_Machak Posted February 20, 2020 Author Share Posted February 20, 2020 Just now, Slice said: I see. But VS found these errors. Help me being to build, and I'll have a look. What is this : "py -3" is not installed or added to environment variables Link to comment Share on other sites More sharing options...
Slice Posted February 20, 2020 Share Posted February 20, 2020 type cbuild.bat again. The PATH is defined now. Link to comment Share on other sites More sharing options...
Jief_Machak Posted February 20, 2020 Author Share Posted February 20, 2020 still "'build' is not recognized as an internal or external command, operable program or batch file." Link to comment Share on other sites More sharing options...
Slice Posted February 20, 2020 Share Posted February 20, 2020 see cbuild.bat contains D:\Program File\Python38 is it your path? 25 minutes ago, Slice said: There is a new problem d:\projects\clover\rEFIt_UEFI\refit\lib.cpp(345): error C2102: для "&" требуется левостороннее значение d:\projects\clover\rEFIt_UEFI\refit\lib.cpp(358): error C2102: для "&" требуется левостороннее значение d:\projects\clover\rEFIt_UEFI\refit\lib.cpp(360): error C2102: для "&" требуется левостороннее значение it means "required lvalue" The error resolved as **ListPtr = AllocatePool(sizeof(VOID *) * AllocateCount); Double **! Link to comment Share on other sites More sharing options...
Slice Posted February 20, 2020 Share Posted February 20, 2020 9 minutes ago, Jief_Machak said: still "'build' is not recognized as an internal or external command, operable program or batch file." also it is good to close Command Window and open it again. Link to comment Share on other sites More sharing options...
Jief_Machak Posted February 20, 2020 Author Share Posted February 20, 2020 16 minutes ago, Slice said: The error resolved as **ListPtr = AllocatePool(sizeof(VOID *) * AllocateCount); Double **! Original code has *ListPtr = AllocatePool(sizeof(VOID *) * AllocateCount); Don't know if it was a bug. I can suppose it was not because Clover was working ! so "**ListPtr = AllocatePool(sizeof(VOID *) * AllocateCount);" should be wrong. Link to comment Share on other sites More sharing options...
Slice Posted February 20, 2020 Share Posted February 20, 2020 I think void* and void** are the same for C but different for C++. Link to comment Share on other sites More sharing options...
Jief_Machak Posted February 20, 2020 Author Share Posted February 20, 2020 Why the hell do I have 'd:\Program File\Python38' as a path ? D: is the DVD !!!! Link to comment Share on other sites More sharing options...
Slice Posted February 20, 2020 Share Posted February 20, 2020 Just now, Jief_Machak said: Why the hell do I have 'd:\Program File\Python38' as a path ? D: is the DVD !!!! See cbuild.bat Link to comment Share on other sites More sharing options...
Jief_Machak Posted February 20, 2020 Author Share Posted February 20, 2020 3 minutes ago, Slice said: I think void* and void** are the same for C but different for C++. No no. They are supposed to be the same. Link to comment Share on other sites More sharing options...
apianti Posted February 20, 2020 Share Posted February 20, 2020 (edited) 1 hour ago, Jief_Machak said: Original code has *ListPtr = AllocatePool(sizeof(VOID *) * AllocateCount); Don't know if it was a bug. I can suppose it was not because Clover was working ! so "**ListPtr = AllocatePool(sizeof(VOID *) * AllocateCount);" should be wrong. The original is correct. ListPtr is VOID **, so it is being dereferenced and set to a new allocated VOID *. Most likely it is a type conversion error if this is vs build and you need to put proper typecasting. EDIT: Because ListPtr is actually ** to some other type. EDIT2: Oh yeah, sizeof(VOID *) == sizeof(VOID **) must be true. Edited February 20, 2020 by apianti Link to comment Share on other sites More sharing options...
Jief_Machak Posted February 20, 2020 Author Share Posted February 20, 2020 15 minutes ago, Slice said: See cbuild.bat Am I supposed to build BaseTools ? How do I do that ? Link to comment Share on other sites More sharing options...
apianti Posted February 20, 2020 Share Posted February 20, 2020 Just now, Jief_Machak said: Am I supposed to build BaseTools ? How do I do that ? edksetup.bat Rebuild Link to comment Share on other sites More sharing options...
Slice Posted February 20, 2020 Share Posted February 20, 2020 I pushed new changes to compile with VS. The work is not finished. Take a pause with VS to tomorrow. Link to comment Share on other sites More sharing options...
Jief_Machak Posted February 20, 2020 Author Share Posted February 20, 2020 (edited) You should cancel this commit "more type casting fixes" and commit it in a branch. Remove typeof for explicit cast, removing some CONST... I think it's not best/right thing to do... Edited February 20, 2020 by Jief_Machak Link to comment Share on other sites More sharing options...
Jief_Machak Posted February 20, 2020 Author Share Posted February 20, 2020 I can do it for you without have to redo everything... Link to comment Share on other sites More sharing options...
apianti Posted February 20, 2020 Share Posted February 20, 2020 2 hours ago, Slice said: There is a new problem d:\projects\clover\rEFIt_UEFI\refit\lib.cpp(345): error C2102: для "&" требуется левостороннее значение d:\projects\clover\rEFIt_UEFI\refit\lib.cpp(358): error C2102: для "&" требуется левостороннее значение d:\projects\clover\rEFIt_UEFI\refit\lib.cpp(360): error C2102: для "&" требуется левостороннее значение it means "required lvalue" It's funny how the structure of Russian is compared to English, lol. That technically says something like `for "&" requires left side value`. I know as much as a Russian third grader.... lol. What are you taking the address of that is NOT a lvalue? A constant? Link to comment Share on other sites More sharing options...
Slice Posted February 20, 2020 Share Posted February 20, 2020 1 hour ago, Jief_Machak said: You should cancel this commit "more type casting fixes" and commit it in a branch. Remove typeof for explicit cast, removing some CONST... I think it's not best/right thing to do... I don't want to redo, I want move forward to resolve compilers issues and then to rewrite codes to real cpp. Link to comment Share on other sites More sharing options...
Recommended Posts