March 28, 2024, 18:12
bigger smaller reset     1020px Wide width Full width Reset   * *

Gildor's Forums

  Homepage Facebook Read news on Twitter Youtube channel Github page
Welcome, Guest. Please login or register.
Did you miss your activation email?

« previous next »
Print
Author Topic: Building the code  (Read 10449 times)
Gildor
Administrator
Hero Member
*****
Posts: 7978



View Profile WWW
« on: September 24, 2014, 12:57 »

I've added build instructions to README.md. You may check them online on GitHub: https://github.com/gildor2/UModel/blob/master/README.md

These instructions are not finished yet - some topics doesn't contain any information and just have headers.
« Last Edit: July 10, 2015, 21:15 by Gildor » Logged
subtleone
Newbie
*
Posts: 6


View Profile
« Reply #1 on: August 12, 2017, 13:59 »

I've put in an honest attempt at trying to build from source because of 'Memory:bad allocation size' error trying to export lollipop chainsaw packs. Most export fine, others not(static mesh+textures). I was thinking maybe a 64 bit umodel might fix it. So I work through the build from source process but run into this problem:

https://stackoverflow.com/questions/31455926/windows-sdk-setup-failure

Basically, to install Windows SDK 7, I need an older version of NET. But I can't install old version because my current version(NET 4.6) won't allow it. It'd be a pain to uninstall/reinstall without knowing if this will fix anything. So here I make the request for a 64 bit umodel. Or should I trial and error other Visual C++ version or some other idea?

Thanks for these great tools.
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7978



View Profile WWW
« Reply #2 on: August 12, 2017, 14:14 »

Yeah, Win7 SDK is problematic to install. I've updated BuildTools.zip (https://github.com/gildor2/UModel/releases/tag/64-bit-port) to use Win10 SDK when Win7 SDK is not available. Please try this.
Logged
subtleone
Newbie
*
Posts: 6


View Profile
« Reply #3 on: August 13, 2017, 01:50 »

Thanks for a fast response. I see you also add VS 2015 support so I will try this. There is also a standalone Visual C++ 2015 compiler. Any advantage with using the full VS 2015?

Regards.
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7978



View Profile WWW
« Reply #4 on: August 13, 2017, 09:38 »

I tried building UModel with 2010, 2013 and 2015, everything works.
Logged
subtleone
Newbie
*
Posts: 6


View Profile
« Reply #5 on: August 14, 2017, 06:04 »

I thought I'd only have to follow instructions and type command lines but this is more involved than I thought.  Grin

I read up on genmake without understanding much except that it makes making makefiles easier. And I'd have to install Perl. Haven't even looked into how to use nmake yet. I guess it finally gets compiled at this stage. Makes my brain hurt lol. I appreciate you for taking the time to answer. Working with UE4, I may have to compile for myself and with a better grasp of programming, I can revisit this.
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7978



View Profile WWW
« Reply #6 on: August 14, 2017, 09:44 »

Usually "instruction following" is enough. You won't need to install Perl - simply unpack BuildTools.zip, put it under PATH (using system's environment or batch file) and run build.sh. You won't need to know about genmake etc.
Logged
subtleone
Newbie
*
Posts: 6


View Profile
« Reply #7 on: August 19, 2017, 04:42 »

Found some time and gave it another go.

Systems variable path:
B:\BuildTools\bin

Folder structure:
B:
---BuildTools
---Libs
---UModel-64-bit-port

[spoiler]
Code:
b:\UModel-64-bit-port>bash build.sh
Generating makefile from UmodelTool/umodel.project ...
Gathering dependency info ...
Makefile generated.
Using Visual C++ 14 (2015) [32 bit] found at "C:/Program Files (x86)/microsoft v
isual studio 14.0/vc" ...
CALLING jom makefile-vc-win32
Export3D.cpp
Exporters/Export3D.cpp: fatal error C1041: cannot open program database 'b:\UMod
el-64-bit-port\obj\umodel-win32\vc140.pdb'; if multiple CL.EXE write to the same
 .PDB file, please use /FS
jom: B:\UModel-64-bit-port\makefile-vc-win32 [.\obj\umodel-win32\Export3D.obj] E
rror 2
Exporters.cpp
ExportMaterial.cpp
Exporters/ExportMaterial.cpp: fatal error C1041: cannot open program database 'b
:\UModel-64-bit-port\obj\umodel-win32\vc140.pdb'; if multiple CL.EXE write to th
e same .PDB file, please use /FS
ExportMd5.cpp
Exporters/ExportMd5.cpp: fatal error C1041: cannot open program database 'b:\UMo
del-64-bit-port\obj\umodel-win32\vc140.pdb'; if multiple CL.EXE write to the sam
e .PDB file, please use /FS
jom: B:\UModel-64-bit-port\makefile-vc-win32 [.\obj\umodel-win32\ExportMd5.obj]
Error 2
b:\UModel-64-bit-port\Core\CoreGL.h(5): fatal error C1083: Cannot open include f
ile: 'GL/gl.h': No such file or directory
jom: B:\UModel-64-bit-port\makefile-vc-win32 [.\obj\umodel-win32\ExportMaterial.
obj] Error 2
jom: B:\UModel-64-bit-port\makefile-vc-win32 [.\obj\umodel-win32\Exporters.obj]
Error 2
Build time: 0.3 sec
[/spoiler]

I noticed it's using 32bit even though I explicitly chose native x64 build tools from Run menu and run as admin. All the generated files are there. If running in 32bit is the problem, I think I need to enable 64bit using Vcvarsall.bat:

https://docs.microsoft.com/en-us/cpp/build/how-to-enable-a-64-bit-visual-cpp-toolset-on-the-command-line

But
Code:
vcvarsall amd64
does nothing for me. Unless you see a easy solution, the problem is on my end but I hope this helps other newbies. I'll eventually get Visual Studio full package because that's what it looks like in the tutorials I watched on how to compile UE4. Hopefully by then, I'll be able to solve this problem too.
« Last Edit: August 19, 2017, 04:59 by subtleone » Logged
Gildor
Administrator
Hero Member
*****
Posts: 7978



View Profile WWW
« Reply #8 on: August 19, 2017, 11:21 »

Quote
Exporters/Export3D.cpp: fatal error C1041: cannot open program database 'b:\UMod
el-64-bit-port\obj\umodel-win32\vc140.pdb'; if multiple CL.EXE write to the same
 .PDB file, please use /FS
This is strange - this problem was fixed a long time ago. It looks like you're using very old version of UModel's code base. It was fixed here:
https://github.com/gildor2/UModel/commit/6a17bae7b875ef1ebe27445aa9ec83200a6508f8

Quote
I noticed it's using 32bit even though I explicitly chose native x64 build tools from Run menu and run as admin. All the generated files are there. If running in 32bit is the problem, I think I need to enable 64bit using Vcvarsall.bat:

https://docs.microsoft.com/en-us/cpp/build/how-to-enable-a-64-bit-visual-cpp-toolset-on-the-command-line
64-bit tools should be selected by modifying build.sh file. I'm not using vc_varts.bat, "build.sh" and "vc32tools" are doing everything.
Logged
subtleone
Newbie
*
Posts: 6


View Profile
« Reply #9 on: August 20, 2017, 04:49 »


This is strange - this problem was fixed a long time ago. It looks like you're using very old version of UModel's code base. It was fixed here:
https://github.com/gildor2/UModel/commit/6a17bae7b875ef1ebe27445aa9ec83200a6508f8

I'm using the file you linked to from your Reply #2 (https://github.com/gildor2/UModel/releases/tag/64-bit-port). I only started using github a few days ago but comparing to Master, the build tool releases are out of date.


Using UModel-master from Master branch,
build.sh edit: PLATFORM="vc-win64"
Code:
b:\UModel-master>bash build.sh
../Shaders.h does not exists, creating ...
Generating makefile from UmodelTool/umodel.project ...
Gathering dependency info ...
Makefile generated.
Using Visual C++ 14 (2015) [64 bit] found at "C:/Program Files (x86)/microsoft visual studio 14.0/vc" ...
CALLING jom makefile-vc-win64
Export3D.cpp
ExportMaterial.cpp
Exporters.cpp
b:\UModel-master\Core\CoreGL.h(8): fatal error C1083: Cannot open include file:'GL/gl.h': No such file or directory
b:\UModel-master\Core\CoreGL.h(8): fatal error C1083: Cannot open include file:'GL/gl.h': No such file or directory
b:\UModel-master\Core\CoreGL.h(8): fatal error C1083: Cannot open include file:'GL/gl.h': No such file or directory
jom: B:\UModel-master\makefile-vc-win64 [.\obj\umodel-win64\ExportMaterial.obj]
Error 2
ExportMd5.cpp
b:\UModel-master\Core\CoreGL.h(8): fatal error C1083: Cannot open include file:'GL/gl.h': No such file or directory
jom: B:\UModel-master\makefile-vc-win64 [.\obj\umodel-win64\Exporters.obj] Error 2
jom: B:\UModel-master\makefile-vc-win64 [.\obj\umodel-win64\ExportMd5.obj] Error 2
jom: B:\UModel-master\makefile-vc-win64 [.\obj\umodel-win64\Export3D.obj] Error 2
Build time: 0.3 sec

---

Missing bl.h but found in MSVCRT
Also edited common.project file: OLDCRT     = 0
Code:
b:\UModel-master>bash build.sh
Generating makefile from UmodelTool/umodel.project ...
Gathering dependency info ...
Makefile generated.
Using Visual C++ 14 (2015) [64 bit] found at "C:/Program Files (x86)/microsoft visual studio 14.0/vc" ...
CALLING jom makefile-vc-win64
CoreWin32.cpp
GlWindow.cpp
b:\UModel-master\libs\includewin32\SDL2/SDL_syswm.h(58): fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
Core/CoreWin32.cpp(8): fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
jom: B:\UModel-master\makefile-vc-win64 [.\obj\umodel-win64\CoreWin32.obj] Error 2
Math3D.cpp
Memory.cpp
jom: B:\UModel-master\makefile-vc-win64 [.\obj\umodel-win64\GlWindow.obj] Error 2
Build time: 0.2 sec
« Last Edit: August 20, 2017, 04:52 by subtleone » Logged
Gildor
Administrator
Hero Member
*****
Posts: 7978



View Profile WWW
« Reply #10 on: August 20, 2017, 10:51 »

Which Windows SDKs you have installed? Do you have Windows 10 SDK? You're using VS2015. UModel had some troubles with it, so OLDCRT must be set to 0. And it can't work with any SDK but Windows 10's one. So I'm using older VS to compile the build. But I see that build script can't find SDK at all. It looks like you have "Program Files/Windows Kits/10" folder, so build script won't show an error. But content of these folders is bad. Just check "Windows Kits/10/Include/<latest version>/um" folder. Does it have windows.h and gl/gl.h files?
Logged
subtleone
Newbie
*
Posts: 6


View Profile
« Reply #11 on: August 21, 2017, 00:29 »

The guide doesn't make mention of Windows SDK so I didn't think anything about it. I'm using the standalone Visual C++ 2015 compiler found here:

http://landinghub.visualstudio.com/visual-cpp-build-tools

The file does install features from Windows 10 SDK and Windows 8.1 SDK.
-Windows Kit
---10 (There is no /um folder, no windows.h or gl.h files found. 485 MB size)
---8.1 (Found /um folder, found windows.h and gl.h. 525 MB size)

Seems like only certain components were installed and not a full package. Found nothing about Windows SDK in programs list or registry.

Related note: I just looked at UModel compatibility list and Lollipop Chainsaw doesn't have Stat support, despite another user claiming he extracted everything. So a 64bit UModel probably won't solve anything. I think I will hold off installing a full SDK for the time being. Want me to trying using the files from Windows 8.1 SDK?
« Last Edit: August 21, 2017, 00:40 by subtleone » Logged
Gildor
Administrator
Hero Member
*****
Posts: 7978



View Profile WWW
« Reply #12 on: August 21, 2017, 00:46 »

Related note: I just looked at UModel compatibility list and Lollipop Chainsaw doesn't have Stat support, despite another user claiming he extracted everything.
I don't know. Most games in compatibility table added after user's reports, without trying anything by me. Sometimes people saying "everything works" without trying static meshes at all (or trying statics without skeletals etc).
Quote
So a 64bit UModel probably won't solve anything. I think I will hold off installing a full SDK for the time being. Want me to trying using the files from Windows 8.1 SDK?
vc32tools knows nothing about 8.1 SDK. Ideally you should build with 7.1 SDK. I've added Win10 SDK only because VS 2015 fails to compile with 7.1 SDK, i.e. 10 is required.
Logged
SailingJia
Newbie
*
Posts: 2


View Profile
« Reply #13 on: November 15, 2017, 11:16 »

i try to build code with vs 2012, but i got these error, how can i fix it? thanks for the help.

D:\Paks\UModel-64-bit-port>bash build.sh
../Shaders.h does not exists, creating ...
Generating makefile from UmodelTool/umodel.project ...
ERROR: cannot open include file "./../Libs/msvcrt/msvcrt.project"
Using Visual C++ 11 (2012) [32 bit] found at "C:/Program Files (x86)/microsoft v
isual studio 11.0/vc" ...
Found Win32 SDK at "C:/Program Files/Microsoft SDKs/Windows/v6.0A" ...
CALLING jom makefile-vc-win32
Error: ERROR: [GENMAKE ERROR] cannot open include file "./../Libs/msvcrt/msvcrt.
project" in D:\Paks\UModel-64-bit-port\makefile-vc-win32 line 2
Build time: 0.4 sec
Logged
SailingJia
Newbie
*
Posts: 2


View Profile
« Reply #14 on: November 15, 2017, 11:31 »

ok, i got it work, delete line 30~34 in common.project.
Logged
Print 
« previous next »
Jump to:  

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