Gildor's Forums

Author Topic: Error while using build.sh  (Read 1274 times)
hadobas
Newbie
*
Posts: 8


View Profile
Error while using build.sh
« on: May 28, 2024, 16:18 »

Hi guys,

I spent a few days to be able to build the source code for myself. Went through hella lot of searching and reading. Now seems I'm at the last error or at least I hope it is...  Grin I see no trace of such file anywhere at all. The script should create it for itself, or I should create an empty one which will be used by the script?

When I run build.sh I get this error:

c:\UEViewer-master\UEViewer-master>bash build.sh --64
Generating makefile from UmodelTool/umodel.project ...
Export3D.cpp
make: gcc: No such file or directory
make: *** [obj/umodel-linux64.mak:876: obj/umodel-unix64/Export3D.o] Error 127
Logged
spiritovod
Global Moderator
Hero Member
*****
Posts: 2456


View Profile
Re: Error while using build.sh
« Reply #1 on: May 28, 2024, 17:24 »

@hadobas: It seems like you've missed some steps from building instruction from official github page. Make sure that Visual Studio is installed properly and build tools, mentioned in the instruction, are available globally via system path. You can also try to build from within VS, it may produce more intuitive error. For now it looks like it's trying to find msvc compiler from installed VS, but fails and revert to gcc, which doesn't present.
Logged
hadobas
Newbie
*
Posts: 8


View Profile
Re: Error while using build.sh
« Reply #2 on: May 29, 2024, 13:02 »

Hi,

Yea, seems I just set up path for user not global. Now I can create the makefile itself, but running it in vs command prompt gives me this error. As far as I know all I need to do to use SDL sdk is download it, and put it into MinGW to be able to use it. Or am I wrong about it?

c:\UEViewer-master\UEViewer-master\obj>nmake /f umodel-vc-win64.mak

Microsoft (R) Program Maintenance Utility Version 14.38.33135.0
Copyright (C) Microsoft Corporation.  All rights reserved.

NMAKE : fatal error U1073: don't know how to make './libs/SDL2/SDL2Loader.cpp'
Stop.
Logged
spiritovod
Global Moderator
Hero Member
*****
Posts: 2456


View Profile
Re: Error while using build.sh
« Reply #3 on: May 29, 2024, 16:47 »

@hadobas: You don't need to do anything except running build.sh - if all required tools are installed correctly, the result would be compiled program without additional steps. Maybe you're still missing something, like VS own build tools (toolset) with the compiler. Here is sample log of running build.sh. Building on Windows is supposed to be done from VS (though it's not mandatory), which would complain about missing components or other possible issues.
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7967



View Profile WWW
Re: Error while using build.sh
« Reply #4 on: May 29, 2024, 18:19 »

Yes, even Visual Studio integration works via build.sh. This is quite a complex script for being able to bypass it by direct run of nmake.

BTW I think nmake is intended to be run from the "root" directory of the project, not from "obj".
Logged
hadobas
Newbie
*
Posts: 8


View Profile
Re: Error while using build.sh
« Reply #5 on: May 30, 2024, 10:38 »

As you can see in the log from spiritovod if you run build.sh it put the makefile into the obj folder just like for me. Build.sh is run with no errors but after creating the makefile it just stops without any error at all. As far as I know I followed every step in the readme.md. Here is what I get running build.sh.

c:\UEViewer-master\UEViewer-master>bash build.sh --64
Visual Studio Community 2022 toolset 143 (14.38.33130) [64 bit] found at "C:\Program Files\Microsoft Visual Studio\2022\Community" ...
Generating makefile from UmodelTool/umodel.project ...
jom ./obj/umodel-vc-win64.mak
Build time: 0.0 sec

Thats why I thought I should run the makefile by myself. But it seems there is some unknown problem.

I noticed a strange thing. When I open the folder with visual studio it won't lists the .vs folder inside, neither the obj folder and .vscode folder. I don't know this is intentional or some kind of bug on my side.
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7967



View Profile WWW
Re: Error while using build.sh
« Reply #6 on: May 30, 2024, 11:45 »

Probably build tools doesn't work with VS2022. The last VS which I used with it was 2019, I think.
Logged
hadobas
Newbie
*
Posts: 8


View Profile
Re: Error while using build.sh
« Reply #7 on: May 30, 2024, 12:15 »

Is there any hope to upgrade the build tools to work with VS2022?

To be honest I need only modify two things in the code, one is mentioned in this post (first answer):
https://www.gildor.org/smf/index.php/topic,7923.new.html#new

And to disable or at least set higher the memory allocation upper limit, mentioned here:
https://www.gildor.org/smf/index.php?topic=3333.0

Maybe I can give it a try on a different pc with vs2019 if I can't find a solution or someone who build the program with these modifications.
Logged
spiritovod
Global Moderator
Hero Member
*****
Posts: 2456


View Profile
Re: Error while using build.sh
« Reply #8 on: May 30, 2024, 21:50 »

I've installed VS 2022 and building works fine with MSVC v143 as well, unless someone is using really old build tools from before Gildor has added detection for VS 2022 to vc32tools script two years ago. I guess such issue would be reported multiple times already. The only thing which I didn't test yet is building with latest Windows SDK for Win11, installed by default with VS 2022. But detection of SDK itself shouldn't be broken, as even latest one still using 10.x.x versioning.

@hadobas: Apparently you still didn't try to build from within VS, which should complain about missing components or unsupported features. Anyway, I've fixed issue with Lineage 2 in the mentioned topic, and in such cases it's recommended to submit sample packages or assets causing crashes.

Logged
hadobas
Newbie
*
Posts: 8


View Profile
Re: Error while using build.sh
« Reply #9 on: May 31, 2024, 09:55 »

Maybe there is something with win11, I fought 3 days just to install MMSQL server on it when finally found a solution. (The lovely devs in MS office using totally different sector size in Win11 which is not compatible even with the newest SQL server. Cheesy )

Btw if I load Umodel into VS2022 as it's written "open local folder..." I can't build the project since VS don't find anything to build. Maybe I still missing something. But thanks for your help guys. ^^
Logged
Jump to:  

Powered by SMF | SMF © 2006-2009, Simple Machines LLC
Leviathan design by Bloc | XHTML | CSS