Comments (23)
Thank you for reporting the errors. I'll try to fix the ones related to my commits. I think adding a default label to the switch statement should fix them.
from mesen-x.
Perfect, thanks a lot! Once these compilation issues are addressed, my plan is to contribute with a few improvements on the libretro side (namely an update to the core options, with sublabel and translation support) and then pull the latest code downstream, so that the libretro mirror is also brought up-to-date. Looking forward to it.
from mesen-x.
Hi Ryunam. I think I fixed the problems in my commits. The other one in Core/SSGAudio.h is added by @Perkka2 in this commit https://github.com/Perkka2/Mesen/commit/fdee47855aaee9a9e3ac2c95bdadaac82888532c#diff-c46f082694231ba998e7aa27838959b91b0ab758ef5dd75aad1c5aeb1b6ed315
and I don't have enough knowledge to fix it.
from mesen-x.
Thank you for working on this, much appreciated! Which specific repository and/or branch should I check to see your fixes?
from mesen-x.
The fix is commit:
https://github.com/NovaSquirrel/Mesen/commit/eb82a00ebdc318bc910665c5157e81b253effc28
And this commit is already merged into this fork so you can try compiling this fork again.
from mesen-x.
I intend to take a look at this later this week. I dont know how to test compile though since i’m not getting the issues on my setup.
from mesen-x.
In file included from ../Core/EPSMAudio.h:6,
from ../Core/BaseMapper.h:13,
from ../Core/FDS.h:4,
from ../Core/FdsSystemActionManager.h:5,
from LibretroKeyManager.h:5,
from libretro.cpp:7:
../Core/SSGAudio.h: In member function 'void SSGAudio<channels>::UpdateOutputLevel()':
../Core/SSGAudio.h:29:88: warning: fold-expressions only available with '-std=c++17' or '-std=gnu++17'
29 | (_console->GetApu()->AddExpansionAudioDelta(channels, _currentOutput - _lastOutput), ...);
|
This looks like the compiler used does not support fold-expressions. @Ryunam, can you enable this feature on your compiler? Or @Perkka2, can you rewrite that line without using fold-expressions?
from mesen-x.
@mkwong98 I'm not proficient enough to do that, I got help when initially adding support for the EPSM
feels like @Ryunam is using an old compiler and it would be better to upgrade to something newer? or if it's something disabled or outdated in the makefile
from mesen-x.
Unfortunately I don’t think it’s possible to use any different compiler or internal option for this particular case, or at the very least I lack the knowledge that would be needed to explore other options.
The build environment I am using is simply the one suggested in the official documentation for compiling both RetroArch and all Libretro cores on Windows, ie an MSYS2 / Mingw64 installation. See here for further reference:
https://docs.libretro.com/development/retroarch/compilation/windows/
So perhaps we would have to see if something can be changed in the Makefile, but again, I’m not nearly expert enough to meddle in the Makefile code…
from mesen-x.
@Ryunam Can you try changing line 328 in Libretro/Makefile from
CXXFLAGS += -D LIBRETRO $(fpic) -std=c++14
to
CXXFLAGS += -D LIBRETRO $(fpic) -std=c++17
?
from mesen-x.
Hi, sorry for not responding earlier! Other stuff got in the way and I couldn't resume work on this until now.
Unfortunately, even after applying the change that @mkwong98 suggested, I am getting tons of errors that do not show up when building from the libretro mirror here: https://github.com/libretro/Mesen
- This is the complete compilation log, describing what happens when building from this repo: https://pastebin.com/eQpPbuji
- For all due comparisons, here's what happens with the libretro mirror: https://pastebin.com/x9UztxSf
The most notable errors that I could spot - or at least, the errors that seem to be entirely absent when building from the libretro repository - are the following:
In file included from ../Core/SoundMixer.h:8,
from LibretroSoundManager.h:4,
from libretro.cpp:6:
../Core/Snapshotable.h: In instantiation of 'void Snapshotable::InternalStream(ArrayInfo<T>&) [with T = std::array<EPSMAudio::InputEntry, 24>]':
../Core/Snapshotable.h:208:18: recursively required from 'void Snapshotable::RecursiveStream(T&, T2& ...) [with T = ArrayInfo<short int>; T2 = {ArrayInfo<std::array<EPSMAudio::InputEntry, 24> >, ValueInfo<ym3438_t>, ValueInfo<double>}]'
../Core/Snapshotable.h:208:18: required from 'void Snapshotable::RecursiveStream(T&, T2& ...) [with T = ArrayInfo<short int>; T2 = {ArrayInfo<short int>, ArrayInfo<std::array<EPSMAudio::InputEntry, 24> >, ValueInfo<ym3438_t>, ValueInfo<double>}]'
../Core/Snapshotable.h:225:18: required from 'void Snapshotable::Stream(T& ...) [with T = {ArrayInfo<short int>, ArrayInfo<short int>, ArrayInfo<std::array<EPSMAudio::InputEntry, 24> >, ValueInfo<ym3438_t>, ValueInfo<double>}]'
../Core/EPSMAudio.h:174:63: required from here
../Core/Snapshotable.h:150:10: warning: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct std::array<EPSMAudio::InputEntry, 24>'; use assignment or value-initialization instead [-Wclass-memaccess]
150 | memset(info.Array, 0, sizeof(T) * info.ElementCount);
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from P:/MSYS2/mingw64/include/c++/10.3.0/tuple:39,
from P:/MSYS2/mingw64/include/c++/10.3.0/functional:54,
from P:/MSYS2/mingw64/include/c++/10.3.0/pstl/glue_algorithm_defs.h:13,
from P:/MSYS2/mingw64/include/c++/10.3.0/algorithm:74,
from libretro.cpp:4:
P:/MSYS2/mingw64/include/c++/10.3.0/array:94:12: note: 'struct std::array<EPSMAudio::InputEntry, 24>' declared here
94 | struct array
| ^~~~~
P:/MSYS2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../Core/BaseMapper.o:BaseMapper.cpp:(.text+0x92f): undefined reference to `PSG_writeReg'
P:/MSYS2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../Core/BaseMapper.o:BaseMapper.cpp:(.text+0xcb8): undefined reference to `PSG_writeReg'
P:/MSYS2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../Core/BaseMapper.o:BaseMapper.cpp:(.text+0xc861): undefined reference to `PSG_new'
P:/MSYS2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../Core/BaseMapper.o:BaseMapper.cpp:(.text+0xc892): undefined reference to `PSG_reset'
P:/MSYS2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../Core/BaseMapper.o:BaseMapper.cpp:(.text+0xc910): undefined reference to `OPN2_Reset'
P:/MSYS2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../Core/BaseMapper.o:BaseMapper.cpp:(.text+0xc917): undefined reference to `OPN2_SetChipType'
P:/MSYS2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../Core/BaseMapper.o:BaseMapper.cpp:(.text$_ZN8SSGAudioIJL12AudioChannel11ELS0_12EEE10ClockAudioEv[_ZN8SSGAudioIJL12AudioChannel11ELS0_12EEE10ClockAudioEv]+0x8c): undefined reference to `PSG_calc'
P:/MSYS2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../Core/BaseMapper.o:BaseMapper.cpp:(.text$_ZN9EPSMAudio10ClockAudioEv[_ZN9EPSMAudio10ClockAudioEv]+0x274): undefined reference to `OPN2_Clock'
P:/MSYS2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../Core/BaseMapper.o:BaseMapper.cpp:(.text$_ZN9EPSMAudio10ClockAudioEv[_ZN9EPSMAudio10ClockAudioEv]+0x2d6): undefined reference to `OPN2_Write'
P:/MSYS2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../Core/BaseMapper.o:BaseMapper.cpp:(.text$_ZN9EPSMAudio10ClockAudioEv[_ZN9EPSMAudio10ClockAudioEv]+0x3eb): undefined reference to `PSG_calc'
P:/MSYS2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../Core/BaseMapper.o:BaseMapper.cpp:(.rdata$.refptr.PSG_delete[.refptr.PSG_delete]+0x0): undefined reference to `PSG_delete'
P:/MSYS2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../Core/MapperFactory.o:MapperFactory.cpp:(.text$_ZN9Vrc7Audio10ClockAudioEv[_ZN9Vrc7Audio10ClockAudioEv]+0xc4): undefined reference to `OPLL_Clock(opll_t*, int*)'
P:/MSYS2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../Core/MapperFactory.o:MapperFactory.cpp:(.text$_ZN9Vrc7Audio10ClockAudioEv[_ZN9Vrc7Audio10ClockAudioEv]+0xf2): undefined reference to `OPLL_Write(opll_t*, unsigned int, unsigned char)'
P:/MSYS2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../Core/MapperFactory.o:MapperFactory.cpp:(.text$_ZN11SunsoftFme713WriteRegisterEth[_ZN11SunsoftFme713WriteRegisterEth]+0x68): undefined reference to `PSG_writeReg'
P:/MSYS2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../Core/MapperFactory.o:MapperFactory.cpp:(.text$_ZN8SSGAudioIJL12AudioChannel10EEE10ClockAudioEv[_ZN8SSGAudioIJL12AudioChannel10EEE10ClockAudioEv]+0xc4): undefined reference to `PSG_calc'
P:/MSYS2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../Core/MapperFactory.o:MapperFactory.cpp:(.text$_ZN11SunsoftFme710InitMapperEv[_ZN11SunsoftFme710InitMapperEv]+0x84): undefined reference to `PSG_new'
P:/MSYS2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../Core/MapperFactory.o:MapperFactory.cpp:(.text$_ZN11SunsoftFme710InitMapperEv[_ZN11SunsoftFme710InitMapperEv]+0xaf): undefined reference to `PSG_reset'
P:/MSYS2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../Core/MapperFactory.o:MapperFactory.cpp:(.text$_ZN4VRC710InitMapperEv[_ZN4VRC710InitMapperEv]+0xdb): undefined reference to `OPLL_Reset(opll_t*, unsigned int)'
P:/MSYS2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../Core/NsfMapper.o:NsfMapper.cpp:(.text+0x273d): undefined reference to `OPLL_Reset(opll_t*, unsigned int)'
P:/MSYS2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../Core/NsfMapper.o:NsfMapper.cpp:(.text+0x2ad9): undefined reference to `PSG_new'
P:/MSYS2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../Core/NsfMapper.o:NsfMapper.cpp:(.text+0x2b0a): undefined reference to `PSG_reset'
P:/MSYS2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../Core/NsfMapper.o:NsfMapper.cpp:(.text+0x2bb2): undefined reference to `PSG_new'
P:/MSYS2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../Core/NsfMapper.o:NsfMapper.cpp:(.text+0x2bdc): undefined reference to `PSG_reset'
P:/MSYS2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../Core/NsfMapper.o:NsfMapper.cpp:(.text+0x2c56): undefined reference to `OPN2_Reset'
P:/MSYS2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../Core/NsfMapper.o:NsfMapper.cpp:(.text+0x2c5d): undefined reference to `OPN2_SetChipType'
P:/MSYS2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../Core/NsfMapper.o:NsfMapper.cpp:(.text+0x111d): undefined reference to `PSG_writeReg'
P:/MSYS2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../Core/NsfMapper.o:NsfMapper.cpp:(.text$_ZN9EPSMAudio13WriteRegisterEthhhh[_ZN9EPSMAudio13WriteRegisterEthhhh]+0x2b0): undefined reference to `PSG_writeReg'
P:/MSYS2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../Core/NsfMapper.o:NsfMapper.cpp:(.text$_ZN9EPSMAudio13WriteRegisterEthhhh[_ZN9EPSMAudio13WriteRegisterEthhhh]+0x459): undefined reference to `PSG_writeReg'
P:/MSYS2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../Core/NsfMapper.o:NsfMapper.cpp:(.text$_ZN9EPSMAudio13WriteRegisterEthhhh[_ZN9EPSMAudio13WriteRegisterEthhhh]+0x87e): undefined reference to `PSG_writeReg'
collect2.exe: error: ld returned 1 exit status
make: *** [Makefile:340: mesen_libretro.dll] Error 1
A lot of these problems seem to be related to the Core/Snapshotable.h
file, but there's also a big amount of "undefined references" at the end.
from mesen-x.
I think line 171 in EPSMAudio.h is not correctly handling _inputBuffer. ArrayInfo is for array and not for std:array. Maybe change it to
ArrayInfo<InputBuffer> inputBuffer{ _inputBuffer.data(), INPUT_BUFFER_SIZE };
from mesen-x.
I think line 171 in EPSMAudio.h is not correctly handling _inputBuffer. ArrayInfo is for array and not for std:array. Maybe change it to
ArrayInfo<InputBuffer> inputBuffer{ _inputBuffer.data(), INPUT_BUFFER_SIZE };
Error (active) | E0144 | a value of type "EPSMAudio::InputEntry *" cannot be used to initialize an entity of type "EPSMAudio::InputBuffer *"
Sorry no go with that
from mesen-x.
Error (active) | E0144 | a value of type "EPSMAudio::InputEntry *" cannot be used to initialize an entity of type "EPSMAudio::InputBuffer *"
Sorry no go with that
How about this?
ArrayInfo<InputEntry> inputBuffer{ _inputBuffer.data(), INPUT_BUFFER_SIZE };
Sorry, I'm not replying from my home computer so I can't test it and I'm not too familiar with templates and other newer C++ features.
I think the cause of the error is that ArrayInfo is expecting an array and not a std::array. Passing a pointer to a std::array means it is being treated as an object inside an array. When Snapshotable.h uses memset on each item in the array, the compiler finds a std::array and it gives this warning:
'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct std::array<EPSMAudio::InputEntry, 24>'; use assignment or value-initialization instead [-Wclass-memaccess]
I guess VS does not stop on this warning and Mingw64 does and I think this warning needs to be fixed.
from mesen-x.
Ok it works well on windows atleast, though the original solution did too without any warnings.
added a pull request with this update
from mesen-x.
https://github.com/NovaSquirrel/Mesen-X/releases/tag/1.0.0 fails to build on Linux with:
/mnt/dev/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/toolchain/bin/x86_64-libreelec-linux-gnu-g++ -fPIC -pthread -shared -Wl,--version-script=./link.T -Wl,--no-undefined -omesen_libretro.so ../SevenZip/7zAlloc.o ../SevenZip/7zArcIn.o ../SevenZip/7zBuf.o ../SevenZip/7zCrc.o ../SevenZip/7zCrcOpt.o ../SevenZip/7zDec.o ../SevenZip/7zFile.o ../SevenZip/7zMemBuffer.o ../SevenZip/7zStream.o ../SevenZip/Bcj2.o ../SevenZip/Bra.o ../SevenZip/Bra86.o ../SevenZip/BraIA64.o ../SevenZip/CpuArch.o ../SevenZip/Delta.o ../SevenZip/Lzma2Dec.o ../SevenZip/LzmaDec.o ../SevenZip/Ppmd7.o ../SevenZip/Ppmd7Dec.o ../SevenZip/Precomp.o ./libretro.o ../Core/APU.o ../Core/Assembler.o ../Core/AutomaticRomTest.o ../Core/AutoSaveManager.o ../Core/BaseControlDevice.o ../Core/BaseExpansionAudio.o ../Core/BaseMapper.o ../Core/BaseRenderer.o ../Core/BaseVideoFilter.o ../Core/BatteryManager.o ../Core/BisqwitNtscFilter.o ../Core/BizhawkMovie.o ../Core/Breakpoint.o ../Core/CheatManager.o ../Core/CodeDataLogger.o ../Core/CodeRunner.o ../Core/Console.o ../Core/ControlManager.o ../Core/CPU.o ../Core/CrossFeedFilter.o ../Core/Debugger.o ../Core/DebugHud.o ../Core/DefaultVideoFilter.o ../Core/RawVideoFilter.o ../Core/DeltaModulationChannel.o ../Core/Disassembler.o ../Core/DisassemblyInfo.o ../Core/EmulationSettings.o ../Core/EventManager.o ../Core/ExpressionEvaluator.o ../Core/FceuxMovie.o ../Core/FDS.o ../Core/FdsLoader.o ../Core/GameClient.o ../Core/GameClientConnection.o ../Core/GameConnection.o ../Core/GameDatabase.o ../Core/GameServer.o ../Core/GameServerConnection.o ../Core/HdAudioDevice.o ../Core/HdNesPack.o ../Core/HdPackBuilder.o ../Core/HdPackLoader.o ../Core/HdPpu.o ../Core/HdVideoFilter.o ../Core/HistoryViewer.o ../Core/iNesLoader.o ../Core/KeyManager.o ../Core/LabelManager.o ../Core/MapperFactory.o ../Core/MemoryAccessCounter.o ../Core/MemoryDumper.o ../Core/MemoryManager.o ../Core/MesenMovie.o ../Core/MessageManager.o ../Core/MovieManager.o ../Core/MovieRecorder.o ../Core/NESHeader.o ../Core/NotificationManager.o ../Core/NsfLoader.o ../Core/NsfMapper.o ../Core/NsfPpu.o ../Core/NtscFilter.o ../Core/OggMixer.o ../Core/OggReader.o ../Core/PPU.o ../Core/PerformanceTracker.o ../Core/PgoUtilities.o ../Core/Profiler.o ../Core/RecordedRomTest.o ../Core/ReverbFilter.o ../Core/RewindData.o ../Core/RewindManager.o ../Core/RomLoader.o ../Core/RotateFilter.o ../Core/SaveStateManager.o ../Core/ScaleFilter.o ../Core/ScriptHost.o ../Core/ScriptingContext.o ../Core/ShortcutKeyHandler.o ../Core/Snapshotable.o ../Core/SoundMixer.o ../Core/stdafx.o ../Core/StereoCombFilter.o ../Core/StereoDelayFilter.o ../Core/StereoPanningFilter.o ../Core/StudyBoxLoader.o ../Core/TraceLogger.o ../Core/UnifLoader.o ../Core/VideoDecoder.o ../Core/VideoHud.o ../Core/VideoRenderer.o ../Core/VirtualFile.o ../Core/VsControlManager.o ../Core/WaveRecorder.o ../Utilities/ArchiveReader.o ../Utilities/AutoResetEvent.o ../Utilities/AviRecorder.o ../Utilities/AviWriter.o ../Utilities/blip_buf.o ../Utilities/BpsPatcher.o ../Utilities/CamstudioCodec.o ../Utilities/CRC32.o ../Utilities/FolderUtilities.o ../Utilities/GifRecorder.o ../Utilities/HexUtilities.o ../Utilities/IpsPatcher.o ../Utilities/md5.o ../Utilities/miniz.o ../Utilities/nes_ntsc.o ../Utilities/PlatformUtilities.o ../Utilities/PNGHelper.o ../Utilities/sha1.o ../Utilities/SimpleLock.o ../Utilities/Socket.o ../Utilities/stb_vorbis.o ../Utilities/stdafx.o ../Utilities/SZReader.o ../Utilities/Timer.o ../Utilities/UpsPatcher.o ../Utilities/UTF8Util.o ../Utilities/WavReader.o ../Utilities/ZipReader.o ../Utilities/ZipWriter.o ../Utilities/ZmbvCodec.o ../Utilities/HQX/hq2x.o ../Utilities/HQX/hq3x.o ../Utilities/HQX/hq4x.o ../Utilities/HQX/init.o ../Utilities/KreedSaiEagle/2xSai.o ../Utilities/KreedSaiEagle/Super2xSai.o ../Utilities/KreedSaiEagle/SuperEagle.o ../Utilities/Scale2x/scale2x.o ../Utilities/Scale2x/scale3x.o ../Utilities/Scale2x/scalebit.o ../Utilities/xBRZ/xbrz.o -march=x86-64 -m64 -Wl,--as-needed -fuse-ld=gold -lm
../Core/BaseMapper.o:BaseMapper.cpp:function BaseMapper::WriteEPSM(unsigned short, unsigned char): error: undefined reference to 'PSG_writeReg'
../Core/BaseMapper.o:BaseMapper.cpp:function BaseMapper::WriteEPSM(unsigned short, unsigned char): error: undefined reference to 'PSG_writeReg'
../Core/BaseMapper.o:BaseMapper.cpp:function BaseMapper::Initialize(RomData&): error: undefined reference to 'PSG_new'
../Core/BaseMapper.o:BaseMapper.cpp:function BaseMapper::Initialize(RomData&): error: undefined reference to 'PSG_delete'
../Core/BaseMapper.o:BaseMapper.cpp:function BaseMapper::Initialize(RomData&): error: undefined reference to 'PSG_reset'
../Core/BaseMapper.o:BaseMapper.cpp:function BaseMapper::Initialize(RomData&): error: undefined reference to 'OPN2_Reset'
../Core/BaseMapper.o:BaseMapper.cpp:function BaseMapper::Initialize(RomData&): error: undefined reference to 'OPN2_SetChipType'
../Core/BaseMapper.o:BaseMapper.cpp:function SSGAudio<(AudioChannel)11, (AudioChannel)12>::ClockAudio(): error: undefined reference to 'PSG_calc'
../Core/BaseMapper.o:BaseMapper.cpp:function EPSMAudio::ClockAudio(): error: undefined reference to 'OPN2_Clock'
../Core/BaseMapper.o:BaseMapper.cpp:function EPSMAudio::ClockAudio(): error: undefined reference to 'OPN2_Write'
../Core/BaseMapper.o:BaseMapper.cpp:function EPSMAudio::ClockAudio(): error: undefined reference to 'PSG_calc'
../Core/MapperFactory.o:MapperFactory.cpp:function Vrc7Audio::ClockAudio(): error: undefined reference to 'OPLL_Clock(opll_t*, int*)'
../Core/MapperFactory.o:MapperFactory.cpp:function Vrc7Audio::ClockAudio(): error: undefined reference to 'OPLL_Write(opll_t*, unsigned int, unsigned char)'
../Core/MapperFactory.o:MapperFactory.cpp:function SunsoftFme7::WriteRegister(unsigned short, unsigned char): error: undefined reference to 'PSG_writeReg'
../Core/MapperFactory.o:MapperFactory.cpp:function SSGAudio<(AudioChannel)10>::ClockAudio(): error: undefined reference to 'PSG_calc'
../Core/MapperFactory.o:MapperFactory.cpp:function SunsoftFme7::InitMapper(): error: undefined reference to 'PSG_new'
../Core/MapperFactory.o:MapperFactory.cpp:function SunsoftFme7::InitMapper(): error: undefined reference to 'PSG_delete'
../Core/MapperFactory.o:MapperFactory.cpp:function SunsoftFme7::InitMapper(): error: undefined reference to 'PSG_reset'
../Core/MapperFactory.o:MapperFactory.cpp:function VRC7::InitMapper(): error: undefined reference to 'OPLL_Reset(opll_t*, unsigned int)'
../Core/NsfMapper.o:NsfMapper.cpp:function NsfMapper::InitMapper(): error: undefined reference to 'OPLL_Reset(opll_t*, unsigned int)'
../Core/NsfMapper.o:NsfMapper.cpp:function NsfMapper::InitMapper(): error: undefined reference to 'PSG_new'
../Core/NsfMapper.o:NsfMapper.cpp:function NsfMapper::InitMapper(): error: undefined reference to 'PSG_delete'
../Core/NsfMapper.o:NsfMapper.cpp:function NsfMapper::InitMapper(): error: undefined reference to 'PSG_reset'
../Core/NsfMapper.o:NsfMapper.cpp:function NsfMapper::InitMapper(): error: undefined reference to 'PSG_new'
../Core/NsfMapper.o:NsfMapper.cpp:function NsfMapper::InitMapper(): error: undefined reference to 'PSG_reset'
../Core/NsfMapper.o:NsfMapper.cpp:function NsfMapper::InitMapper(): error: undefined reference to 'OPN2_Reset'
../Core/NsfMapper.o:NsfMapper.cpp:function NsfMapper::InitMapper(): error: undefined reference to 'OPN2_SetChipType'
../Core/NsfMapper.o:NsfMapper.cpp:function NsfMapper::WriteRegister(unsigned short, unsigned char): error: undefined reference to 'PSG_writeReg'
collect2: error: ld returned 1 exit status
make: *** [Makefile:340: mesen_libretro.so] Error 1
make: Leaving directory '/mnt/dev/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/mesen-1.0.0/Libretro'
FAILURE: scripts/build mesen during make_target (default)
from mesen-x.
https://github.com/NovaSquirrel/Mesen-X/releases/tag/1.0.0 fails to build on Linux with:
/mnt/dev/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/toolchain/bin/x86_64-libreelec-linux-gnu-g++ -fPIC -pthread -shared -Wl,--version-script=./link.T -Wl,--no-undefined -omesen_libretro.so ../SevenZip/7zAlloc.o ../SevenZip/7zArcIn.o ../SevenZip/7zBuf.o ../SevenZip/7zCrc.o ../SevenZip/7zCrcOpt.o ../SevenZip/7zDec.o ../SevenZip/7zFile.o ../SevenZip/7zMemBuffer.o ../SevenZip/7zStream.o ../SevenZip/Bcj2.o ../SevenZip/Bra.o ../SevenZip/Bra86.o ../SevenZip/BraIA64.o ../SevenZip/CpuArch.o ../SevenZip/Delta.o ../SevenZip/Lzma2Dec.o ../SevenZip/LzmaDec.o ../SevenZip/Ppmd7.o ../SevenZip/Ppmd7Dec.o ../SevenZip/Precomp.o ./libretro.o ../Core/APU.o ../Core/Assembler.o ../Core/AutomaticRomTest.o ../Core/AutoSaveManager.o ../Core/BaseControlDevice.o ../Core/BaseExpansionAudio.o ../Core/BaseMapper.o ../Core/BaseRenderer.o ../Core/BaseVideoFilter.o ../Core/BatteryManager.o ../Core/BisqwitNtscFilter.o ../Core/BizhawkMovie.o ../Core/Breakpoint.o ../Core/CheatManager.o ../Core/CodeDataLogger.o ../Core/CodeRunner.o ../Core/Console.o ../Core/ControlManager.o ../Core/CPU.o ../Core/CrossFeedFilter.o ../Core/Debugger.o ../Core/DebugHud.o ../Core/DefaultVideoFilter.o ../Core/RawVideoFilter.o ../Core/DeltaModulationChannel.o ../Core/Disassembler.o ../Core/DisassemblyInfo.o ../Core/EmulationSettings.o ../Core/EventManager.o ../Core/ExpressionEvaluator.o ../Core/FceuxMovie.o ../Core/FDS.o ../Core/FdsLoader.o ../Core/GameClient.o ../Core/GameClientConnection.o ../Core/GameConnection.o ../Core/GameDatabase.o ../Core/GameServer.o ../Core/GameServerConnection.o ../Core/HdAudioDevice.o ../Core/HdNesPack.o ../Core/HdPackBuilder.o ../Core/HdPackLoader.o ../Core/HdPpu.o ../Core/HdVideoFilter.o ../Core/HistoryViewer.o ../Core/iNesLoader.o ../Core/KeyManager.o ../Core/LabelManager.o ../Core/MapperFactory.o ../Core/MemoryAccessCounter.o ../Core/MemoryDumper.o ../Core/MemoryManager.o ../Core/MesenMovie.o ../Core/MessageManager.o ../Core/MovieManager.o ../Core/MovieRecorder.o ../Core/NESHeader.o ../Core/NotificationManager.o ../Core/NsfLoader.o ../Core/NsfMapper.o ../Core/NsfPpu.o ../Core/NtscFilter.o ../Core/OggMixer.o ../Core/OggReader.o ../Core/PPU.o ../Core/PerformanceTracker.o ../Core/PgoUtilities.o ../Core/Profiler.o ../Core/RecordedRomTest.o ../Core/ReverbFilter.o ../Core/RewindData.o ../Core/RewindManager.o ../Core/RomLoader.o ../Core/RotateFilter.o ../Core/SaveStateManager.o ../Core/ScaleFilter.o ../Core/ScriptHost.o ../Core/ScriptingContext.o ../Core/ShortcutKeyHandler.o ../Core/Snapshotable.o ../Core/SoundMixer.o ../Core/stdafx.o ../Core/StereoCombFilter.o ../Core/StereoDelayFilter.o ../Core/StereoPanningFilter.o ../Core/StudyBoxLoader.o ../Core/TraceLogger.o ../Core/UnifLoader.o ../Core/VideoDecoder.o ../Core/VideoHud.o ../Core/VideoRenderer.o ../Core/VirtualFile.o ../Core/VsControlManager.o ../Core/WaveRecorder.o ../Utilities/ArchiveReader.o ../Utilities/AutoResetEvent.o ../Utilities/AviRecorder.o ../Utilities/AviWriter.o ../Utilities/blip_buf.o ../Utilities/BpsPatcher.o ../Utilities/CamstudioCodec.o ../Utilities/CRC32.o ../Utilities/FolderUtilities.o ../Utilities/GifRecorder.o ../Utilities/HexUtilities.o ../Utilities/IpsPatcher.o ../Utilities/md5.o ../Utilities/miniz.o ../Utilities/nes_ntsc.o ../Utilities/PlatformUtilities.o ../Utilities/PNGHelper.o ../Utilities/sha1.o ../Utilities/SimpleLock.o ../Utilities/Socket.o ../Utilities/stb_vorbis.o ../Utilities/stdafx.o ../Utilities/SZReader.o ../Utilities/Timer.o ../Utilities/UpsPatcher.o ../Utilities/UTF8Util.o ../Utilities/WavReader.o ../Utilities/ZipReader.o ../Utilities/ZipWriter.o ../Utilities/ZmbvCodec.o ../Utilities/HQX/hq2x.o ../Utilities/HQX/hq3x.o ../Utilities/HQX/hq4x.o ../Utilities/HQX/init.o ../Utilities/KreedSaiEagle/2xSai.o ../Utilities/KreedSaiEagle/Super2xSai.o ../Utilities/KreedSaiEagle/SuperEagle.o ../Utilities/Scale2x/scale2x.o ../Utilities/Scale2x/scale3x.o ../Utilities/Scale2x/scalebit.o ../Utilities/xBRZ/xbrz.o -march=x86-64 -m64 -Wl,--as-needed -fuse-ld=gold -lm ../Core/BaseMapper.o:BaseMapper.cpp:function BaseMapper::WriteEPSM(unsigned short, unsigned char): error: undefined reference to 'PSG_writeReg' ../Core/BaseMapper.o:BaseMapper.cpp:function BaseMapper::WriteEPSM(unsigned short, unsigned char): error: undefined reference to 'PSG_writeReg' ../Core/BaseMapper.o:BaseMapper.cpp:function BaseMapper::Initialize(RomData&): error: undefined reference to 'PSG_new' ../Core/BaseMapper.o:BaseMapper.cpp:function BaseMapper::Initialize(RomData&): error: undefined reference to 'PSG_delete' ../Core/BaseMapper.o:BaseMapper.cpp:function BaseMapper::Initialize(RomData&): error: undefined reference to 'PSG_reset' ../Core/BaseMapper.o:BaseMapper.cpp:function BaseMapper::Initialize(RomData&): error: undefined reference to 'OPN2_Reset' ../Core/BaseMapper.o:BaseMapper.cpp:function BaseMapper::Initialize(RomData&): error: undefined reference to 'OPN2_SetChipType' ../Core/BaseMapper.o:BaseMapper.cpp:function SSGAudio<(AudioChannel)11, (AudioChannel)12>::ClockAudio(): error: undefined reference to 'PSG_calc' ../Core/BaseMapper.o:BaseMapper.cpp:function EPSMAudio::ClockAudio(): error: undefined reference to 'OPN2_Clock' ../Core/BaseMapper.o:BaseMapper.cpp:function EPSMAudio::ClockAudio(): error: undefined reference to 'OPN2_Write' ../Core/BaseMapper.o:BaseMapper.cpp:function EPSMAudio::ClockAudio(): error: undefined reference to 'PSG_calc' ../Core/MapperFactory.o:MapperFactory.cpp:function Vrc7Audio::ClockAudio(): error: undefined reference to 'OPLL_Clock(opll_t*, int*)' ../Core/MapperFactory.o:MapperFactory.cpp:function Vrc7Audio::ClockAudio(): error: undefined reference to 'OPLL_Write(opll_t*, unsigned int, unsigned char)' ../Core/MapperFactory.o:MapperFactory.cpp:function SunsoftFme7::WriteRegister(unsigned short, unsigned char): error: undefined reference to 'PSG_writeReg' ../Core/MapperFactory.o:MapperFactory.cpp:function SSGAudio<(AudioChannel)10>::ClockAudio(): error: undefined reference to 'PSG_calc' ../Core/MapperFactory.o:MapperFactory.cpp:function SunsoftFme7::InitMapper(): error: undefined reference to 'PSG_new' ../Core/MapperFactory.o:MapperFactory.cpp:function SunsoftFme7::InitMapper(): error: undefined reference to 'PSG_delete' ../Core/MapperFactory.o:MapperFactory.cpp:function SunsoftFme7::InitMapper(): error: undefined reference to 'PSG_reset' ../Core/MapperFactory.o:MapperFactory.cpp:function VRC7::InitMapper(): error: undefined reference to 'OPLL_Reset(opll_t*, unsigned int)' ../Core/NsfMapper.o:NsfMapper.cpp:function NsfMapper::InitMapper(): error: undefined reference to 'OPLL_Reset(opll_t*, unsigned int)' ../Core/NsfMapper.o:NsfMapper.cpp:function NsfMapper::InitMapper(): error: undefined reference to 'PSG_new' ../Core/NsfMapper.o:NsfMapper.cpp:function NsfMapper::InitMapper(): error: undefined reference to 'PSG_delete' ../Core/NsfMapper.o:NsfMapper.cpp:function NsfMapper::InitMapper(): error: undefined reference to 'PSG_reset' ../Core/NsfMapper.o:NsfMapper.cpp:function NsfMapper::InitMapper(): error: undefined reference to 'PSG_new' ../Core/NsfMapper.o:NsfMapper.cpp:function NsfMapper::InitMapper(): error: undefined reference to 'PSG_reset' ../Core/NsfMapper.o:NsfMapper.cpp:function NsfMapper::InitMapper(): error: undefined reference to 'OPN2_Reset' ../Core/NsfMapper.o:NsfMapper.cpp:function NsfMapper::InitMapper(): error: undefined reference to 'OPN2_SetChipType' ../Core/NsfMapper.o:NsfMapper.cpp:function NsfMapper::WriteRegister(unsigned short, unsigned char): error: undefined reference to 'PSG_writeReg' collect2: error: ld returned 1 exit status make: *** [Makefile:340: mesen_libretro.so] Error 1 make: Leaving directory '/mnt/dev/LibreELEC-RR/build.LibreELEC-x11.x86_64-11.0-devel/build/mesen-1.0.0/Libretro' FAILURE: scripts/build mesen during make_target (default)
This seems rather unrelated to the specific build error.
It feels like it's not including the EPSMAudio.h file or something
But you're building libretro and not mesen itself i persume
from mesen-x.
@Perkka2 well it looks like the same undefined reference to 'PSG_writeReg'
as in #46 (comment) & it's indeed the libretro core
from mesen-x.
I have no idea of how to correctly setup Mingw64 to build this, have tried a bit but cant really get it to even do a decent try.
I've created an Ubuntu 18.04 VM and were able to build libretro without issues. and building mesen from visual studio also works well.
I dont know what more to do currently.
from mesen-x.
I've opened a new issue #62
from mesen-x.
I have Mingw64 working on my PC. There is another error with InputEntry. Initialization within the struct definition makes the struct non-trivial which still causes problems with memset. Remove those will fix that problem. And the undefined reference errors is caused by new cpp files not added to Makefile.common. Those are emu2149.cpp, ym3438.cpp and opll.cpp. I'll post a pull request to fix those.
from mesen-x.
@mkwong98 Awesome!
from mesen-x.
the best option here is either to wait for official mingw64 to release updated gcc or just switch over to an environment that supports latest gcc, like Arch.
im on Arch so cross-compiling is not an issue. BUT i had to use this on github CI to build a windows target that required std=c++17:
btw, this is a duplicate of #95
from mesen-x.
Related Issues (20)
- [Feature Request] RetroAchievements implementation
- [Feature Request] Dark Theme HOT 6
- [Bug] Fast Forwarding doesn't work on Version 1.01
- [Request] Submit Mesen-X to Flathub
- VRC5 Mapper support
- Issue with Dualshock 4
- Emulator Mesen(NES) setup problem "SteamDeck" HOT 1
- [Enhancement] Does it possible to make option for sound... HOT 1
- Linux Mono - Errors & memory leaks in debug-related windows
- NSF ripping tips for Mesen-X?
- Unable to set persistent rom file associations on Linux HOT 2
- Add support for Family Noraebang (K-663A)
- Mesen-X Libretro Port HOT 4
- Experienced with the "NES+FDS" ROMs that are Headered and Unheadered HOT 1
- slow down when opening ppu viewer or anything (arch linux) HOT 3
- [Bug] N163 Sound RAM initialisation does not follow RAM initialisation settings HOT 5
- ESPM significantly slows down emulation
- Merge Mesen2 and Mesen-X? HOT 2
- [Feature Request] CRT scanlines filter HOT 1
- Implement Akerasoft Mapper 474 for NES NROM-383 and NROM-368
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mesen-x.