Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Building PCSX2 on windows fails
#1
When building, liblzma (a third party lib) fails on Win 10, vs2017:

Code:
1>------ Rebuild All started: Project: liblzma, Configuration: Debug Win32 ------
1>x86.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\simple\x86.c': No such file or directory
1>sparc.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\simple\sparc.c': No such file or directory
1>simple_encoder.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\simple\simple_encoder.c': No such file or directory
1>simple_decoder.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\simple\simple_decoder.c': No such file or directory
1>simple_coder.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\simple\simple_coder.c': No such file or directory
1>powerpc.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\simple\powerpc.c': No such file or directory
1>ia64.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\simple\ia64.c': No such file or directory
1>armthumb.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\simple\armthumb.c': No such file or directory
1>arm.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\simple\arm.c': No such file or directory
1>price_table.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\rangecoder\price_table.c': No such file or directory
1>lz_encoder_mf.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\lz\lz_encoder_mf.c': No such file or directory
1>lz_encoder.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\lz\lz_encoder.c': No such file or directory
1>lz_decoder.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\lz\lz_decoder.c': No such file or directory
1>lzma_encoder_presets.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\lzma\lzma_encoder_presets.c': No such file or directory
1>lzma_encoder_optimum_normal.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\lzma\lzma_encoder_optimum_normal.c': No such file or directory
1>lzma_encoder_optimum_fast.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\lzma\lzma_encoder_optimum_fast.c': No such file or directory
1>lzma_encoder.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\lzma\lzma_encoder.c': No such file or directory
1>lzma_decoder.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\lzma\lzma_decoder.c': No such file or directory
1>lzma2_encoder.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\lzma\lzma2_encoder.c': No such file or directory
1>lzma2_decoder.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\lzma\lzma2_decoder.c': No such file or directory
1>Generating Code...
1>Compiling...
1>fastpos_table.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\lzma\fastpos_table.c': No such file or directory
1>delta_encoder.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\delta\delta_encoder.c': No such file or directory
1>delta_decoder.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\delta\delta_decoder.c': No such file or directory
1>delta_common.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\delta\delta_common.c': No such file or directory
1>vli_size.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\vli_size.c': No such file or directory
1>vli_encoder.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\vli_encoder.c': No such file or directory
1>vli_decoder.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\vli_decoder.c': No such file or directory
1>stream_flags_encoder.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\stream_flags_encoder.c': No such file or directory
1>stream_flags_decoder.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\stream_flags_decoder.c': No such file or directory
1>stream_flags_common.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\stream_flags_common.c': No such file or directory
1>stream_encoder_mt.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\stream_encoder_mt.c': No such file or directory
1>stream_encoder.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\stream_encoder.c': No such file or directory
1>stream_decoder.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\stream_decoder.c': No such file or directory
1>stream_buffer_encoder.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\stream_buffer_encoder.c': No such file or directory
1>stream_buffer_decoder.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\stream_buffer_decoder.c': No such file or directory
1>outqueue.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\outqueue.c': No such file or directory
1>index_hash.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\index_hash.c': No such file or directory
1>index_encoder.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\index_encoder.c': No such file or directory
1>index_decoder.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\index_decoder.c': No such file or directory
1>index.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\index.c': No such file or directory
1>Generating Code...
1>Compiling...
1>hardware_physmem.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\hardware_physmem.c': No such file or directory
1>hardware_cputhreads.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\hardware_cputhreads.c': No such file or directory
1>filter_flags_encoder.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\filter_flags_encoder.c': No such file or directory
1>filter_flags_decoder.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\filter_flags_decoder.c': No such file or directory
1>filter_encoder.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\filter_encoder.c': No such file or directory
1>filter_decoder.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\filter_decoder.c': No such file or directory
1>filter_common.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\filter_common.c': No such file or directory
1>filter_buffer_encoder.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\filter_buffer_encoder.c': No such file or directory
1>filter_buffer_decoder.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\filter_buffer_decoder.c': No such file or directory
1>easy_preset.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\easy_preset.c': No such file or directory
1>easy_encoder_memusage.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\easy_encoder_memusage.c': No such file or directory
1>easy_encoder.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\easy_encoder.c': No such file or directory
1>easy_decoder_memusage.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\easy_decoder_memusage.c': No such file or directory
1>easy_buffer_encoder.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\easy_buffer_encoder.c': No such file or directory
1>common.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\common.c': No such file or directory
1>block_util.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\block_util.c': No such file or directory
1>block_header_encoder.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\block_header_encoder.c': No such file or directory
1>block_header_decoder.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\block_header_decoder.c': No such file or directory
1>block_encoder.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\block_encoder.c': No such file or directory
1>block_decoder.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\block_decoder.c': No such file or directory
1>Generating Code...
1>Compiling...
1>block_buffer_encoder.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\block_buffer_encoder.c': No such file or directory
1>block_buffer_decoder.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\block_buffer_decoder.c': No such file or directory
1>auto_decoder.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\auto_decoder.c': No such file or directory
1>alone_encoder.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\alone_encoder.c': No such file or directory
1>alone_decoder.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\common\alone_decoder.c': No such file or directory
1>sha256.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\check\sha256.c': No such file or directory
1>crc64_table.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\check\crc64_table.c': No such file or directory
1>crc64_fast.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\check\crc64_fast.c': No such file or directory
1>crc32_table.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\check\crc32_table.c': No such file or directory
1>crc32_fast.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\check\crc32_fast.c': No such file or directory
1>check.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\liblzma\check\check.c': No such file or directory
1>tuklib_physmem.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\common\tuklib_physmem.c': No such file or directory
1>tuklib_cpucores.c
1>c1 : fatal error C1083: Cannot open source file: 'xz\src\common\tuklib_cpucores.c': No such file or directory
1>Generating Code...
1>Done building project "liblzma.vcxproj" -- FAILED.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========


svn_readme.txt mentions that:

Code:
Most of these libs in /3rdparty have been tailored slightly from the original
forms downloaded from the net.  So if you want to upgrade to a new version you
will need to do a proper diff merge.  Likewise, if you modify anything in a
3rdparty library you should be sure to tag the modification with your sig or
a "pcsx2" or something.  Thirdly, you can use Svn Log to check for modifications,
however folder renames or svn homesite changes may not have all relevant history
necessary to make an accurate merge.

Where can I find these sources (PCSX2 builds but not the audio and GSdx projects)? I tried building with xz-5.2.4-windows libraries but the build still fails.
Reply

Sponsored links

#2
Grab the xz repo from here https://github.com/PCSX2/xz/tree/3d566cd...058dfaf33c

then copy the src folder it in to your 3rd party\xz folder. For some reason the link that we have there doesn't really work properly, it didn't for me either.
[Image: ref_sig_anim.gif]
Like our Facebook Page and visit our Facebook Group!
Reply
#3
Photo 
Thanks, now it builds successfully but some components still can't be selected; the GS SPU2 are grayed out:

[Image: WUhMwN5.png]
Reply
#4
Did you do a build, or a rebuild? Might need to do the latter?
Mobo: ASUS Prime Z370-A
CPU: Intel i7-8700K (3.7 GHz)
RAM: G.Skill TridentZ RGB Series, 2x8 GB DDR4 (3000 MHz)
GPU: EVGA GeForce GTX 1070Ti FTW2 (8 GB)

Oh yeah Red Pandas are cool too.

Reply
#5
SPU2 needs DirectX SDK.
CPU: I3-4160 3.6GHZ
Motherboard: Asrock B85M - DGS
RAM: Hyper X Savage 2x8GB 1.6GHZ cl9
GPU: Asus AMD Radeon R7 360 OC 2GB GDDR5
OS: Windows 7 Ultimate SP1 64bit
Reply
#6
(05-11-2018, 10:42 PM)lightningterror Wrote: SPU2 needs DirectX SDK.
I'm setting it up now. Does GSdx require any external packages?
Reply
#7
(05-11-2018, 11:45 PM)JaredM Wrote: I'm setting it up now. Does GSdx require any external packages?

Nope, just the DXSDK. Make sure you set the environment variable up for the DXSDK_DIR
[Image: ref_sig_anim.gif]
Like our Facebook Page and visit our Facebook Group!
Reply
#8
(05-11-2018, 11:45 PM)JaredM Wrote: I'm setting it up now. Does GSdx require any external packages?

if you still have problems, retarget the project because pcsx2 uses a very specific windows sdk version.
Reply
#9
(05-12-2018, 01:24 AM)refraction Wrote: Nope, just the DXSDK. Make sure you set the environment variable up for the DXSDK_DIR

After some tinkering I got to the point where xaudio2.dll is needed to compile:

Code:
27>CpuPanel.cpp
28>d:\projects\pcsx2\plugins\spu2-x\src\windows\SndOut_XAudio2.inl(269): error C2065: 'XAUDIO2_DLL': undeclared identifier
28>d:\projects\pcsx2\plugins\spu2-x\src\windows\SndOut_XAudio2.inl(271): error C2146: syntax error: missing ')' before identifier 'XAUDIO2_DLL_A'
28>d:\projects\pcsx2\plugins\spu2-x\src\windows\SndOut_XAudio2.inl(271): error C2146: syntax error: missing ';' before identifier 'XAUDIO2_DLL_A'
28>d:\projects\pcsx2\plugins\spu2-x\src\windows\SndOut_XAudio2.inl(271): error C2065: 'XAUDIO2_DLL_A': undeclared identifier
28>d:\projects\pcsx2\plugins\spu2-x\src\windows\SndOut_XAudio2.inl(271): error C2143: syntax error: missing ';' before 'string'
28>d:\projects\pcsx2\plugins\spu2-x\src\windows\SndOut_XAudio2.inl(271): error C2059: syntax error: ')'
28>SndOut_waveOut.cpp
27>BiosSelectorPanel.cpp


The steps needed to get to this point are (using cygwin on win 10 x64):


Code:
$ git clone https://github.com/PCSX2/pcsx2.git
$ cd pcsx2/3rdparty
$ rm -rf xz
$ git clone <latest branch of xz tailored for pcsx2> (see posts above)


Then some .sln files need to be changed;

in PCSX2_suite.sln, change 

Code:
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblzma", "3rdparty\liblzma.vcxproj", "{12728250-16EC-4DC6-94D7-E21DD88947F8}"

EndProject

to

Code:
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblzma", "3rdparty\xz\windows\vs2017\liblzma.vcxproj", "{12728250-16EC-4DC6-94D7-E21DD88947F8}"

EndProject

and in GSdx.vcproj change


Code:
    <ProjectReference Include="..\..\3rdparty\xz\liblzma.vcxproj">

      <Project>{12728250-16ec-4dc6-94d7-e21dd88947f8}</Project>


to

Code:
    <ProjectReference Include="..\..\3rdparty\xz\windows\vs2017\liblzma.vcxproj">

      <Project>{12728250-16ec-4dc6-94d7-e21dd88947f8}</Project>
Edit:

Got it to build after commenting out:

Code:
#if _WIN32_WINNT >= 0x602
            //xAudio2DLL = LoadLibraryEx(XAUDIO2_DLL, nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32);
            //if (xAudio2DLL == nullptr)
            //    throw std::runtime_error("Could not load " XAUDIO2_DLL_A ". Error code:" + std::to_string(GetLastError()));

            //pXAudio2Create = reinterpret_cast<decltype(&XAudio2Create)>(GetProcAddress(xAudio2DLL, "XAudio2Create"));
            //if (pXAudio2Create == nullptr)
            //    throw std::runtime_error("XAudio2Create not found. Error code: " + std::to_string(GetLastError()));

            //if (FAILED(hr = pXAudio2Create(&pXAudio2, 0, XAUDIO2_DEFAULT_PROCESSOR)))
            //    throw Exception::XAudio2Error(hr, "Failed to init XAudio2 engine. Error Details:");
#else

in SndOut_XAudio2.ini and pointing vs to the include directories of directx (after installing DXSDK_Jun10.exe).
More info on how to switch between different versions of directX can be found here
Reply
#10
It shouldn't be that difficult.

To get the PCSX2 source code and submodules:
Code:
git clone --recurse-submodules https://github.com/PCSX2/pcsx2.git
Or
Code:
git clone https://github.com/PCSX2/pcsx2.git
cd pcsx2
git submodule update --init --recursive

To setup the DirectX SDK, either
1) install it and hope everything has been done for you
Or
2) extract the files to a folder, then set up an environment variable called DXSDK_DIR that points to the SDK folder (i.e. "D:\Programs\DXSDK\", note that the final backslash is necessary). I did it this way (PCSX2 only needs to use 5 of the header files so I didn't feel like installing the whole thing).
Reply




Users browsing this thread: 1 Guest(s)