mixxxdj / buildserver

Tools for managing the Mixxx build server and build VMs.
12 stars 23 forks source link

Win: Missing DLLs in dynamic build #33

Open Tomasito665 opened 6 years ago

Tomasito665 commented 6 years ago

It looks like the Windows buildserver is not working properly for dynamic builds. Various dependencies are built in static mode, even though build_environment.bat is given the Dynamic argument. This results in unmet dependencies when compiling Mixxx.

This is my build.bat script for Mixxx: https://pastebin.com/cd1bctuX And this is the output: https://pastebin.com/RABLSfCY

I ran build_environment.bat x64 ReleaseFastbuild Dynamic, which fails to build dynamic libraries for:

For completeness, these are the output files in buildserver/lib per dependency.

*(!)  = Static version of library built instead of shared one.

.
├── build_chromaprint.bat
│   ├── chromaprint.dll
│   ├── chromaprint.lib
│   └── chromaprint.pdb
├── build_fftw3.bat
│   ├── libfftw-3.3.dll
│   ├── libfftw-3.3.lib
│   ├── libfftw-3.3.pdb
│   ├── libfftwf-3.3.dll
│   ├── libfftwf-3.3.lib
│   └── libfftwf-3.3.pdb
├── build_hss1394.bat
│   ├── libHSS1394.dll
│   ├── libHSS1394.lib
│   └── libHSS1394.pdb
├── build_libflac.bat
│   ├── libFLAC.dll
│   ├── libFLAC.lib
│   └── libFLAC.pdb
├── build_libid3tag.bat (!)
│   ├── libid3tag.lib
│   └── libid3tag.pdb
├── build_libmad.bat (!)
│   ├── libmad.lib
│   └── libmad.pdb
├── build_libogg.bat
│   ├── libogg.dll
│   ├── libogg.lib
│   └── libogg.pdb
├── build_libopus.bat (!)
│   ├── opus.lib
│   └── opus.pdb
├── build_libshout.bat (!)
│   ├── libshout.lib
│   └── libshout.pdb
├── build_libsndfile.bat (!)
│   ├── g72x.lib
│   ├── libsndfile.lib
│   └── libsndfile.pdb
├── build_libvorbis.bat
│   ├── libvorbis.dll
│   ├── libvorbisfile.dll
│   ├── libvorbisfile.lib
│   ├── libvorbisfile.pdb
│   ├── libvorbis.lib
│   └── libvorbis.pdb
├── build_openssl.bat
│   ├── libeay32.dll
│   ├── libeay32.lib
│   ├── ssleay32.dll
│   └── ssleay32.lib
├── build_portaudio.bat (!)
│   ├── portaudio.lib
│   └── portaudio.pdb
├── build_portmidi.bat (portmidi=OK, porttime=(!))
│   ├── portmidi.dll
│   ├── portmidi.lib
│   ├── portmidi.pdb
│   ├── porttime.lib
│   └── porttime.pdb
├── build_protobuf.bat (!)
│   ├── libprotobuf-lite.lib
│   └── libprotobuf-lite.pdb
├── build_pthreads.bat (!)
│   ├── pthread.lib
│   └── pthread.pdb
├── build_qt4.bat (no output files, but that's OK, libs are in Qt folder)
├── build_rubberband.bat (!)
│   ├── rubberband.lib
│   └── rubberband.pdb
├── build_sqlite3.bat (!)
│   ├── sqlite3.lib
│   └── sqlite3.pdb
├── build_taglib.bat (!)
│   ├── tag.lib
│   └── tag.pdb
└── build_zlib.bat
    ├── zdll.lib
    ├── zlibwapi.dll
    ├── zlibwapi.lib
    └── zlibwapi.pdb
Pegasus-RPG commented 6 years ago

Some of this is actually expected. Certain libraries only have static build configurations (like porttime) and others wouldn't link with Mixxx if built dynamically, so the "Dynamic" flag simply builds what it can dynamically as opposed to everything. As for taglib not producing anything, that's unexpected.

Pegasus-RPG commented 6 years ago

It's also possible some of the batch files are not correctly reading the flag. :)

Tomasito665 commented 6 years ago

Some of this is actually expected. Certain libraries only have static build configurations (like porttime) and others wouldn't link with Mixxx if built dynamically, so the "Dynamic" flag simply builds what it can dynamically as opposed to everything.

@Pegasus-RPG Ah, that explains a lot :-) Still though, many of the batch files of the (!) annotated libs expect a DLL, in the sense that there is a copy *.dll %LIB_DIR% command when done compiling. This is true for these libs:

Tomasito665 commented 6 years ago

It's also possible some of the batch files are not correctly reading the flag. :)

I think that's the case with taglib. I made a small tweak, which solves the problem for me: https://github.com/Tomasito665/buildserver/commit/34aa86e4c193cd05695eb23df5a33820d215b857

rryan commented 6 years ago

@Pegasus-RPG Ah, that explains a lot :-) Still though, many of the batch files of the (!) annotated libs expect a DLL, in the sense that there is a copy *.dll %LIB_DIR% command when done compiling. This is true for these libs:

... I have a vague memory of doing that by default, instead of only copying if we know it was going to produce a DLL.

Tomasito665 commented 6 years ago

As for taglib not producing anything, that's unexpected.

@Pegasus-RPG My bad! Taglib does produce something. The list is updated.

Tomasito665 commented 6 years ago

Hmm.. I just rebuilt all dependencies from scratch with build_environment.bat x64 ReleaseFastbuild Dynamic. There aren't any unmet dependencies now. Everything seems to compile fine, but I get unresolved external symbol errors from the linker.

Here's the full log: https://pastebin.com/DxdJUsVD Any idea of what the cause could be?

[LD] win64_build\mixxx-test.exe
   Creating library win64_build\mixxx-test.lib and object win64_build\mixxx-test.exp
mixxxapplication.obj : error LNK2001: unresolved external symbol __imp_GetMessageExtraInfo
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) const google::protobuf::MessageLite::`vftable'" (__imp_??_7MessageLite@protobuf@google@@6B@)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __cdecl google::protobuf::io::CodedOutputStream::WriteVarint32(unsigned int)" (__imp_?WriteVarint32@CodedOutputStream@io@protobuf@google@@QEAAXI@Z)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __cdecl google::protobuf::io::CodedOutputStream::WriteRaw(void const *,int)" (__imp_?WriteRaw@CodedOutputStream@io@protobuf@google@@QEAAXPEBXH@Z)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl google::protobuf::io::CodedOutputStream::~CodedOutputStream(void)" (__imp_??1CodedOutputStream@io@protobuf@google@@QEAA@XZ)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl google::protobuf::io::CodedOutputStream::CodedOutputStream(class google::protobuf::io::ZeroCopyOutputStream *)" (__imp_??0CodedOutputStream@io@protobuf@google@@QEAA@PEAVZeroCopyOutputStream@123@@Z)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl google::protobuf::io::StringOutputStream::~StringOutputStream(void)" (__imp_??1StringOutputStream@io@protobuf@google@@UEAA@XZ)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl google::protobuf::io::StringOutputStream::StringOutputStream(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *)" (__imp_??0StringOutputStream@io@protobuf@google@@QEAA@PEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __cdecl google::protobuf::io::CodedInputStream::PopLimit(int)" (__imp_?PopLimit@CodedInputStream@io@protobuf@google@@QEAAXH@Z)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __cdecl google::protobuf::io::CodedInputStream::PushLimit(int)" (__imp_?PushLimit@CodedInputStream@io@protobuf@google@@QEAAHH@Z)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) void __cdecl google::protobuf::internal::VerifyVersion(int,int,char const *)" (__imp_?VerifyVersion@internal@protobuf@google@@YAXHHPEBD@Z)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) void __cdecl google::protobuf::internal::OnShutdown(void (__cdecl*)(void))" (__imp_?OnShutdown@internal@protobuf@google@@YAXP6AXXZ@Z)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __cdecl google::protobuf::internal::LogFinisher::operator=(class google::protobuf::internal::LogMessage &)" (__imp_??4LogFinisher@internal@protobuf@google@@QEAAXAEAVLogMessage@123@@Z)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) protected: void __cdecl google::protobuf::internal::RepeatedPtrFieldBase::Swap(class google::protobuf::internal::RepeatedPtrFieldBase *)" (__imp_?Swap@RepeatedPtrFieldBase@internal@protobuf@google@@IEAAXPEAV1234@@Z)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) protected: void __cdecl google::protobuf::internal::RepeatedPtrFieldBase::Reserve(int)" (__imp_?Reserve@RepeatedPtrFieldBase@internal@protobuf@google@@IEAAXH@Z)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class google::protobuf::internal::LogMessage & __cdecl google::protobuf::internal::LogMessage::operator<<(char const *)" (__imp_??6LogMessage@internal@protobuf@google@@QEAAAEAV0123@PEBD@Z)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl google::protobuf::internal::LogMessage::~LogMessage(void)" (__imp_??1LogMessage@internal@protobuf@google@@QEAA@XZ)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl google::protobuf::internal::LogMessage::LogMessage(enum google::protobuf::LogLevel,char const *,int)" (__imp_??0LogMessage@internal@protobuf@google@@QEAA@W4LogLevel@23@PEBDH@Z)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static void __cdecl google::protobuf::internal::WireFormatLite::WriteMessage(int,class google::protobuf::MessageLite const &,class google::protobuf::io::CodedOutputStream *)" (__imp_?WriteMessage@WireFormatLite@internal@protobuf@google@@SAXHAEBVMessageLite@34@PEAVCodedOutputStream@io@34@@Z)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static void __cdecl google::protobuf::internal::WireFormatLite::WriteEnum(int,int,class google::protobuf::io::CodedOutputStream *)" (__imp_?WriteEnum@WireFormatLite@internal@protobuf@google@@SAXHHPEAVCodedOutputStream@io@34@@Z)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static void __cdecl google::protobuf::internal::WireFormatLite::WriteBool(int,bool,class google::protobuf::io::CodedOutputStream *)" (__imp_?WriteBool@WireFormatLite@internal@protobuf@google@@SAXH_NPEAVCodedOutputStream@io@34@@Z)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static void __cdecl google::protobuf::internal::WireFormatLite::WriteDouble(int,double,class google::protobuf::io::CodedOutputStream *)" (__imp_?WriteDouble@WireFormatLite@internal@protobuf@google@@SAXHNPEAVCodedOutputStream@io@34@@Z)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static void __cdecl google::protobuf::internal::WireFormatLite::WriteInt32(int,int,class google::protobuf::io::CodedOutputStream *)" (__imp_?WriteInt32@WireFormatLite@internal@protobuf@google@@SAXHHPEAVCodedOutputStream@io@34@@Z)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static bool __cdecl google::protobuf::internal::WireFormatLite::SkipField(class google::protobuf::io::CodedInputStream *,unsigned int,class google::protobuf::io::CodedOutputStream *)" (__imp_?SkipField@WireFormatLite@internal@protobuf@google@@SA_NPEAVCodedInputStream@io@34@IPEAVCodedOutputStream@634@@Z)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual unsigned char * __cdecl google::protobuf::MessageLite::SerializeWithCachedSizesToArray(unsigned char *)const " (__imp_?SerializeWithCachedSizesToArray@MessageLite@protobuf@google@@UEBAPEAEPEAE@Z)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl google::protobuf::MessageLite::InitializationErrorString(void)const " (__imp_?InitializationErrorString@MessageLite@protobuf@google@@UEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl google::protobuf::MessageLite::~MessageLite(void)" (__imp_??1MessageLite@protobuf@google@@UEAA@XZ)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static int __cdecl google::protobuf::internal::WireFormatLite::LengthDelimitedSize(int)" (__imp_?LengthDelimitedSize@WireFormatLite@internal@protobuf@google@@SAHH@Z)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static int __cdecl google::protobuf::internal::WireFormatLite::EnumSize(int)" (__imp_?EnumSize@WireFormatLite@internal@protobuf@google@@SAHH@Z)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static int __cdecl google::protobuf::internal::WireFormatLite::Int32Size(int)" (__imp_?Int32Size@WireFormatLite@internal@protobuf@google@@SAHH@Z)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static double __cdecl google::protobuf::internal::WireFormatLite::DecodeDouble(unsigned __int64)" (__imp_?DecodeDouble@WireFormatLite@internal@protobuf@google@@SAN_K@Z)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static int __cdecl google::protobuf::internal::WireFormatLite::GetTagFieldNumber(unsigned int)" (__imp_?GetTagFieldNumber@WireFormatLite@internal@protobuf@google@@SAHI@Z)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static enum google::protobuf::internal::WireFormatLite::WireType __cdecl google::protobuf::internal::WireFormatLite::GetTagWireType(unsigned int)" (__imp_?GetTagWireType@WireFormatLite@internal@protobuf@google@@SA?AW4WireType@1234@I@Z)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: int __cdecl google::protobuf::io::CodedInputStream::BufferSize(void)const " (__imp_?BufferSize@CodedInputStream@io@protobuf@google@@AEBAHXZ)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __cdecl google::protobuf::io::CodedInputStream::DecrementRecursionDepth(void)" (__imp_?DecrementRecursionDepth@CodedInputStream@io@protobuf@google@@QEAAXXZ)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __cdecl google::protobuf::io::CodedInputStream::IncrementRecursionDepth(void)" (__imp_?IncrementRecursionDepth@CodedInputStream@io@protobuf@google@@QEAA_NXZ)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) private: void __cdecl google::protobuf::io::CodedInputStream::Advance(int)" (__imp_?Advance@CodedInputStream@io@protobuf@google@@AEAAXH@Z)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __cdecl google::protobuf::io::CodedInputStream::ExpectAtEnd(void)" (__imp_?ExpectAtEnd@CodedInputStream@io@protobuf@google@@QEAA_NXZ)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __cdecl google::protobuf::io::CodedInputStream::ExpectTag(unsigned int)" (__imp_?ExpectTag@CodedInputStream@io@protobuf@google@@QEAA_NI@Z)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __cdecl google::protobuf::io::CodedInputStream::ConsumedEntireMessage(void)" (__imp_?ConsumedEntireMessage@CodedInputStream@io@protobuf@google@@QEAA_NXZ)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: struct std::pair<unsigned int,bool> __cdecl google::protobuf::io::CodedInputStream::ReadTagWithCutoff(unsigned int)" (__imp_?ReadTagWithCutoff@CodedInputStream@io@protobuf@google@@QEAA?AU?$pair@I_N@std@@I@Z)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __cdecl google::protobuf::io::CodedInputStream::ReadLittleEndian64(unsigned __int64 *)" (__imp_?ReadLittleEndian64@CodedInputStream@io@protobuf@google@@QEAA_NPEA_K@Z)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __cdecl google::protobuf::io::CodedInputStream::ReadVarint64(unsigned __int64 *)" (__imp_?ReadVarint64@CodedInputStream@io@protobuf@google@@QEAA_NPEA_K@Z)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __cdecl google::protobuf::io::CodedInputStream::ReadVarint32(unsigned int *)" (__imp_?ReadVarint32@CodedInputStream@io@protobuf@google@@QEAA_NPEAI@Z)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) protected: int __cdecl google::protobuf::internal::RepeatedPtrFieldBase::size(void)const " (__imp_?size@RepeatedPtrFieldBase@internal@protobuf@google@@IEBAHXZ)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) protected: __cdecl google::protobuf::internal::RepeatedPtrFieldBase::RepeatedPtrFieldBase(void)" (__imp_??0RepeatedPtrFieldBase@internal@protobuf@google@@IEAA@XZ)
beats.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl google::protobuf::MessageLite::MessageLite(void)" (__imp_??0MessageLite@protobuf@google@@QEAA@XZ)
headers.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const * const google::protobuf::internal::empty_string_" (__imp_?empty_string_@internal@protobuf@google@@3PEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@EB)
headers.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static void __cdecl google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class google::protobuf::io::CodedOutputStream *)" (__imp_?WriteStringMaybeAliased@WireFormatLite@internal@protobuf@google@@SAXHAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEAVCodedOutputStream@io@34@@Z)
headers.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static bool __cdecl google::protobuf::internal::WireFormatLite::ReadString(class google::protobuf::io::CodedInputStream *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *)" (__imp_?ReadString@WireFormatLite@internal@protobuf@google@@SA_NPEAVCodedInputStream@io@34@PEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
headers.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static int __cdecl google::protobuf::internal::WireFormatLite::StringSize(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_?StringSize@WireFormatLite@internal@protobuf@google@@SAHAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
headers.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const & __cdecl google::protobuf::internal::GetEmptyString(void)" (__imp_?GetEmptyString@internal@protobuf@google@@YAAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
headers.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const & __cdecl google::protobuf::internal::GetEmptyStringAlreadyInited(void)" (__imp_?GetEmptyStringAlreadyInited@internal@protobuf@google@@YAAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
waveform.pb.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __cdecl google::protobuf::io::CodedInputStream::BytesUntilLimit(void)const " (__imp_?BytesUntilLimit@CodedInputStream@io@protobuf@google@@QEBAHXZ)
beatgrid.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __cdecl google::protobuf::MessageLite::SerializeToString(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *)const " (__imp_?SerializeToString@MessageLite@protobuf@google@@QEBA_NPEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
beatgrid.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __cdecl google::protobuf::MessageLite::ParseFromArray(void const *,int)" (__imp_?ParseFromArray@MessageLite@protobuf@google@@QEAA_NPEBXH@Z)
wtracktableviewheader.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __cdecl google::protobuf::MessageLite::SerializeToArray(void *,int)const " (__imp_?SerializeToArray@MessageLite@protobuf@google@@QEBA_NPEAXH@Z)
portaudio.lib(pa_win_ds.obj) : error LNK2001: unresolved external symbol __imp_GetDesktopWindow
portaudio.lib(pa_asio.obj) : error LNK2001: unresolved external symbol __imp_GetDesktopWindow
portaudio.lib(pa_win_wdmks.obj) : error LNK2001: unresolved external symbol __imp_RegCloseKey
portaudio.lib(asiolist.obj) : error LNK2001: unresolved external symbol __imp_RegCloseKey
portaudio.lib(pa_win_wdmks.obj) : error LNK2001: unresolved external symbol __imp_RegQueryValueExW
portaudio.lib(asiolist.obj) : error LNK2001: unresolved external symbol __imp_CharLowerBuffA
portaudio.lib(asiolist.obj) : error LNK2001: unresolved external symbol __imp_RegEnumKeyA
portaudio.lib(asiolist.obj) : error LNK2001: unresolved external symbol __imp_RegOpenKeyA
portaudio.lib(asiolist.obj) : error LNK2001: unresolved external symbol __imp_RegOpenKeyExA
portaudio.lib(asiolist.obj) : error LNK2001: unresolved external symbol __imp_RegQueryValueExA
libsndfile.lib(g72x.obj) : error LNK2001: unresolved external symbol g72x_reader_init
libsndfile.lib(g72x.obj) : error LNK2001: unresolved external symbol g72x_writer_init
libsndfile.lib(g72x.obj) : error LNK2001: unresolved external symbol g72x_decode_block
libsndfile.lib(g72x.obj) : error LNK2001: unresolved external symbol g72x_encode_block
rubberband.lib(FFT.obj) : error LNK2001: unresolved external symbol __imp_fftw_execute
rubberband.lib(FFT.obj) : error LNK2001: unresolved external symbol __imp_fftw_plan_dft_r2c_1d
rubberband.lib(FFT.obj) : error LNK2001: unresolved external symbol __imp_fftw_plan_dft_c2r_1d
rubberband.lib(FFT.obj) : error LNK2001: unresolved external symbol __imp_fftw_destroy_plan
rubberband.lib(FFT.obj) : error LNK2001: unresolved external symbol __imp_fftw_export_wisdom_to_file
rubberband.lib(FFT.obj) : error LNK2001: unresolved external symbol __imp_fftw_import_wisdom_from_file
rubberband.lib(FFT.obj) : error LNK2001: unresolved external symbol __imp_fftw_malloc
rubberband.lib(FFT.obj) : error LNK2001: unresolved external symbol __imp_fftw_free
libshout.lib(sock.obj) : error LNK2001: unresolved external symbol __imp_accept
libshout.lib(sock.obj) : error LNK2001: unresolved external symbol __imp_bind
libshout.lib(sock.obj) : error LNK2001: unresolved external symbol __imp_closesocket
libshout.lib(sock.obj) : error LNK2001: unresolved external symbol __imp_connect
libshout.lib(sock.obj) : error LNK2001: unresolved external symbol __imp_ioctlsocket
libshout.lib(sock.obj) : error LNK2001: unresolved external symbol __imp_getsockopt
libshout.lib(sock.obj) : error LNK2001: unresolved external symbol __imp_htons
libshout.lib(sock.obj) : error LNK2001: unresolved external symbol __imp_inet_addr
libshout.lib(sock.obj) : error LNK2001: unresolved external symbol __imp_inet_ntoa
libshout.lib(resolver.obj) : error LNK2001: unresolved external symbol __imp_inet_ntoa
libshout.lib(sock.obj) : error LNK2001: unresolved external symbol __imp_listen
libshout.lib(sock.obj) : error LNK2001: unresolved external symbol __imp_recv
libshout.lib(util.obj) : error LNK2001: unresolved external symbol __imp_recv
libshout.lib(sock.obj) : error LNK2001: unresolved external symbol __imp_select
libshout.lib(sock.obj) : error LNK2001: unresolved external symbol __imp_send
libshout.lib(sock.obj) : error LNK2001: unresolved external symbol __imp_setsockopt
libshout.lib(sock.obj) : error LNK2001: unresolved external symbol __imp_socket
libshout.lib(sock.obj) : error LNK2001: unresolved external symbol __imp_gethostname
libshout.lib(sock.obj) : error LNK2001: unresolved external symbol __imp_WSAStartup
libshout.lib(sock.obj) : error LNK2001: unresolved external symbol __imp_WSACleanup
libshout.lib(sock.obj) : error LNK2001: unresolved external symbol __imp_WSASetLastError
libshout.lib(sock.obj) : error LNK2001: unresolved external symbol __imp_WSAGetLastError
libshout.lib(proto_roaraudio.obj) : error LNK2001: unresolved external symbol __imp_htonl
libshout.lib(resolver.obj) : error LNK2001: unresolved external symbol __imp_gethostbyaddr
libshout.lib(resolver.obj) : error LNK2001: unresolved external symbol __imp_gethostbyname
win64_build\mixxx-test.exe : fatal error LNK1120: 100 unresolved externals
scons: *** [win64_build\mixxx-test.exe] Error 1120
scons: building terminated because of errors.
Pegasus-RPG commented 6 years ago

The __declspec dllimport stuff usually means a dynamic library is trying to be linked statically or vice-versa, I forget exactly. (If you built dynamic dependencies, are you also building Mixxx dynamically?) Otherwise, troubleshooting this takes a lot of trial and error.

Pegasus-RPG commented 6 years ago

Oh, that output may just be for mixxx-test.exe. Do you see mixxx.exe in the build folder?

Tomasito665 commented 6 years ago

When building Mixxx I set both staticlibs and staticqt to false. This is my build batch script:

@echo off
SETLOCAL
REM Clean up after old builds.
del /q /f *.exe
rmdir /s /q dist32
rmdir /s /q dist64

REM XP Compatibility requires the v7.1A SDK
REM No quotes needed here!
set MSSDK_DIR=C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1A

REM this can be either release or debug. For development you want to use debug
set BUILD_TYPE=release

REM This determines if you build a 32bit or 64bit version of mixxx.
REM 32bit = i386, 64bit = amd64
set ARCHITECTURE=amd64

REM set this to the folder where you built the dependencies
set WINLIB_PATH="C:\dev\mixxxdj\buildserver\x64_release-fastbuild_dynamic"
SET BIN_DIR=%WINLIB_PATH%\bin
set QT_VERSION=4.8.7
SET QTDIR="C:\dev\mixxxdj\buildserver\x64_release-fastbuild_dynamic\build\qt-everywhere-opensource-src-4.8.7"

if "%ARCHITECTURE%" == "i386" (
  set TARGET_MACHINE=x86
  set VCVARS_ARCH=x86
) else (
  set TARGET_MACHINE=amd64
  set VCVARS_ARCH=x86_amd64
)

REM Adjust to your environment
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %VCVARS_ARCH%

rem /MP Use all CPU cores.
rem /FS force synchronous PDB writes (prevents PDB corruption with /MP)
rem /EHsc Do not handle SEH in try / except blocks.
rem /Zc:threadSafeInit- disable C++11 magic static support (Bug #1653368)
set CL=/MP /FS /EHsc /Zc:threadSafeInit-

set PATH=%BIN_DIR%;%PATH%
REM Set the -j value to the number of CPU cores (not HT "virtual" cores but physical cores) you have
scons -j1 toolchain=msvs winlib=%WINLIB_PATH% build=%BUILD_TYPE% staticlibs=0 staticqt=0 verbose=0 machine=%TARGET_MACHINE% qtdir=%QTDIR% hss1394=1 mediafoundation=1 opus=1 localecompare=1 optimize=portable virtualize=0 test=1 qt_sqlite_plugin=0 mssdk_dir="%MSSDK_DIR%" build_number_in_title_bar=0 bundle_pdbs=1
ENDLOCAL

There's no mixxx.exe in the build directory. I think the build fails before building that.

Tomasito665 commented 6 years ago

Oh and I also tried to build just mixxx.exe by setting test=0. This is the output:

link /nologo /MACHINE:X64 /DEBUG /LTCG:NOSTATUS /OPT:REF /OPT:ICF /MANIFEST /nodefaultlib:LIBCMT.lib /nodefaultlib:LIBCMTd.lib /manifest /dll /out:win64_build\plugins\win64_build\mediafoundation\soundsourcemediafoundation.dll /implib:win64_build\plugins\win64_build\mediafoundation\soundsourcemediafoundation.lib /LIBPATH:C:\dev\mixxxdj\buildserver\x64_release-fastbuild_dynamic /LIBPATH:C:\dev\mixxxdj\buildserver\x64_release-fastbuild_dynamic\lib /LIBPATH:C:\dev\mixxxdj\buildserver\x64_release-fastbuild_dynamic\build\qt-everywhere-opensource-src-4.8.7\lib shell32.lib portaudio.lib porttime.lib portmidi.lib qtmain.lib QtCore4.lib QtGui4.lib QtOpenGL4.lib QtXml4.lib QtSvg4.lib QtSql4.lib QtScript4.lib QtNetwork4.lib QtTest4.lib QtScriptTools4.lib opengl32.lib libsndfile.lib libFLAC.lib libvorbisfile.lib libvorbis.lib libogg.lib opengl32.lib glu32.lib tag.lib libprotobuf-lite.lib chromaprint.lib rubberband.lib libmad.lib libid3tag.lib Ole32.lib Mfuuid.lib Mfplat.lib Mfreadwrite.lib libhss1394.lib setupapi.lib libshout.lib opusfile.lib sqlite3.lib win64_build\plugins\win64_build\mediafoundation\soundsourcemediafoundation.obj win64_build\plugins\win64_build\mediafoundation\sources\audiosource.obj win64_build\plugins\win64_build\mediafoundation\sources\soundsource.obj win64_build\plugins\win64_build\mediafoundation\sources\soundsourceplugin.obj win64_build\plugins\win64_build\mediafoundation\track\bpm.obj win64_build\plugins\win64_build\mediafoundation\track\replaygain.obj win64_build\plugins\win64_build\mediafoundation\track\trackmetadata.obj win64_build\plugins\win64_build\mediafoundation\track\trackmetadatataglib.obj win64_build\plugins\win64_build\mediafoundation\track\tracknumbers.obj win64_build\plugins\win64_build\mediafoundation\util\audiosignal.obj win64_build\plugins\win64_build\mediafoundation\util\logger.obj win64_build\plugins\win64_build\mediafoundation\util\sample.obj win64_build\plugins\win64_build\mediafoundation\util\samplebuffer.obj win64_build\plugins\win64_build\mediafoundation\util\singularsamplebuffer.obj
link @c:\users\jordi\appdata\local\temp\tmpxgqimf.lnk
   Creating library win64_build\plugins\win64_build\mediafoundation\soundsourcemediafoundation.lib and object win64_build\plugins\win64_build\mediafoundation\soundsourcemediafoundation.exp
portaudio.lib(pa_win_wdmks.obj) : error LNK2001: unresolved external symbol __imp_RegCloseKey
portaudio.lib(asiolist.obj) : error LNK2001: unresolved external symbol __imp_RegCloseKey
portaudio.lib(pa_win_wdmks.obj) : error LNK2001: unresolved external symbol __imp_RegQueryValueExW
portaudio.lib(pa_win_ds.obj) : error LNK2001: unresolved external symbol __imp_GetDesktopWindow
portaudio.lib(pa_asio.obj) : error LNK2001: unresolved external symbol __imp_GetDesktopWindow
portaudio.lib(asiolist.obj) : error LNK2001: unresolved external symbol __imp_CharLowerBuffA
portaudio.lib(asiolist.obj) : error LNK2001: unresolved external symbol __imp_RegEnumKeyA
portaudio.lib(asiolist.obj) : error LNK2001: unresolved external symbol __imp_RegOpenKeyA
portaudio.lib(asiolist.obj) : error LNK2001: unresolved external symbol __imp_RegOpenKeyExA
portaudio.lib(asiolist.obj) : error LNK2001: unresolved external symbol __imp_RegQueryValueExA
win64_build\plugins\win64_build\mediafoundation\soundsourcemediafoundation.dll : fatal error LNK1120: 8 unresolved externals
scons: *** [win64_build\plugins\win64_build\mediafoundation\soundsourcemediafoundation.dll] Error 1120
scons: building terminated because of errors.

Full log: https://pastebin.com/sFC14Ryk

Tomasito665 commented 6 years ago

It looks like these functions:

are defined in the Windows libraries User32 and Advapi32. These are only added by scons when the static_qt is false, here: https://github.com/mixxxdj/mixxx/blob/master/build/depends.py#L373

@rryan is that correct? Shouldn't these libs be always added, both for static_qt and non-static_qt builds?

Pegasus-RPG commented 6 years ago

It looks like the Scons script needs to be adjusted to add those as dependencies for Portaudio as well.

Tomasito665 commented 6 years ago

I could take this up, if that's useful? As soon as everything's working I could do two PRs, one for the buildserver and one for Mixxx.

Pegasus-RPG commented 6 years ago

Sure, if you're willing, that would save us a bunch of time. FYI, we found that adding advapi32 and user32 are only needed for static builds. There are already sections in our Scons scripts for each dependency where there's an if static block that adds whatever extra libraries are needed for that particular library to the linker list, so you should just need to extend that. (What's strange is that you shouldn't need to do that for a dynamic build, so again I wonder if flags are being passed correctly.) If you're switching flags, you may need to delete your .sconsign.dblite and .sconf.temp files to clear Scons' configuration and start fresh. (It's possible previous flags are still hanging around.)

Tomasito665 commented 6 years ago

Ok I made some progress. I got Mixxx to compile in dynamic mode, but it crashes on startup (also with the safeMode flag). This is what I found so far.

Protobuf

The buildserver only builds the protobuf library in static mode but yet depends.py expects the dynamic version given not static_dependencies and adds the PROTOBUF_USE_DLLS preprocessor definition. This causes the unresolved external symbol "__declspec(dllimport ... errors.

We can solve this by either building both static and dynamic versions of protobuf or by removing the preprocessor definition from the scons script.

Portaudio

The buildserver only builds the portaudio library in static mode but yet depends.py expects the dynamic version given not static_dependencies. It only links to advapi32 in static dependencies mode, but it should always link to advapi32, because portaudio is always static. This causes the unresolved external symbol errors.

Also, portaudio needs both advapi32 and user32, but yet the portaudio dependence block only adds advapi32. In static_dependencies mode this is not a problem because it's already added by the Qt dependence block, but I think it's better to explicitly add it to portaudio as well.

We can solve this by either building both static and dynamic versions of portaudio or by always doing the env.CheckLib for advapi32 and user32, regardless of static_dependencies.

Rubberband

This is a sneaky one. Rubberband depends on fftw, just like chromaprint. However, we only check for fftw in the chromaprint dependence block. Rubberband does not complain because fftw is already added here. The thing, though, is that chromaprint only adds fftw if static_dependencies and that's ok for chromaprint, but rubberband -- since we only build rubberband in static mode -- always needs fftw. So, when building in dynamic mode, fftw is not added and rubberband complains. So, we have to add the fftw check to the rubberband dependence block as well in the scons script.


What I did

I did three things to solve these problems and get Mixxx to compile.

Mixxx crashes on startup (progress bar hangs at about 30%). It looks like there are problems loading soundsourcemediafoundation. This is the console output.

λ mixxx.exe --safeMode
Warning [Main]: SoundSourcePluginLibrary - Failed to dynamically load plugin library "C:/dev/mixxxdj/mixxx/dist64/plugins/soundsource/soundsourcemediafoundation.exp" : "Cannot load library C:/dev/mixxxdj/mixxx/dist64/plugins/soundsource/soundsourcemediafoundation.exp: "
 Warning [Main]: SoundSourceProxy - Failed to load SoundSource plugin "C:/dev/mixxxdj/mixxx/dist64/plugins/soundsource/soundsourcemediafoundation.exp"
 Warning [Main]: SoundSourcePluginLibrary - Failed to dynamically load plugin library "C:/dev/mixxxdj/mixxx/dist64/plugins/soundsource/soundsourcemediafoundation.lib" : "Cannot load library C:/dev/mixxxdj/mixxx/dist64/plugins/soundsource/soundsourcemediafoundation.lib: "
 Warning [Main]: SoundSourceProxy - Failed to load SoundSource plugin "C:/dev/mixxxdj/mixxx/dist64/plugins/soundsource/soundsourcemediafoundation.lib"
 Warning [Main]: SoundSourcePluginLibrary - Failed to dynamically load plugin library "C:/dev/mixxxdj/mixxx/dist64/plugins/soundsource/soundsourcemediafoundation.pdb" : "Cannot load library C:/dev/mixxxdj/mixxx/dist64/plugins/soundsource/soundsourcemediafoundation.pdb: "
 Warning [Main]: SoundSourceProxy - Failed to load SoundSource plugin "C:/dev/mixxxdj/mixxx/dist64/plugins/soundsource/soundsourcemediafoundation.pdb"
 Warning [Main]: QFileInfo::absolutePath: Constructed with empty filename
 Warning [Main]: ControlDoublePrivate::getControl returning NULL for ( "[Samplers]" , "show_samplers" )
 Warning [Main]: ControlDoublePrivate::getControl returning NULL for ( "[Microphone]" , "show_microphone" )
 Warning [Main]: ControlDoublePrivate::getControl returning NULL for ( "[VinylControl]" , "show_vinylcontrol" )
 Warning [Main]: ControlDoublePrivate::getControl returning NULL for ( "[PreviewDeck]" , "show_previewdeck" )
 Warning [Main]: ControlDoublePrivate::getControl returning NULL for ( "[EffectRack1]" , "show" )
 Warning [Main]: ControlDoublePrivate::getControl returning NULL for ( "[Library]" , "show_coverart" )
 Warning [Main]: ControlDoublePrivate::getControl returning NULL for ( "[Master]" , "maximize_library" )

Edit 1 It freezes during the call to m_pDbConnectionPool->createThreadLocalConnection();. Here, to be more precise.

Edit 2 I tested it both in debug and release with respectively Debug and DebugFastbuild dependencies. The problem happens with both builds.