zynaddsubfx / zyn-fusion-build

Build Scripts For Zyn-Fusion
Do What The F*ck You Want To Public License
122 stars 39 forks source link

Mingw64 build failing at linking #118

Open ampetrosillo opened 3 months ago

ampetrosillo commented 3 months ago

I'm trying to build Zyn from source, and although I had to manually install mxml and liblo, it does seem to compile fine (with a few warnings):

make[4]: Entering directory '/home/ampet/zyn-fusion-build/deps/liblo/src'
  CC       liblo_la-address.lo
address.c: In function 'lo_inaddr_find_iface':
address.c:641:18: warning: implicit declaration of function 'inet_pton'; did you mean 'inet_ntoa'? [-Wimplicit-function-declaration]
  641 |         int rc = inet_pton(fam, ip, &a);
      |                  ^~~~~~~~~
      |                  inet_ntoa
  CC       liblo_la-send.lo
  CC       liblo_la-message.lo
message.c: In function 'lo_message_add_varargs_internal':
message.c:263:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  263 |     if (((unsigned long)i & 0xFFFFFFFFUL)
      |          ^
message.c:264:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  264 |         != ((unsigned long)LO_MARKER_A & 0xFFFFFFFFUL))
      |             ^
message.c:275:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  275 |     if (((unsigned long)i & 0xFFFFFFFFUL)
      |          ^
message.c:276:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  276 |         != ((unsigned long)LO_MARKER_B & 0xFFFFFFFFUL))
      |             ^
message.c: In function 'lo_arg_pp_internal':
message.c:1067:9: warning: 'val64.i' may be used uninitialized [-Wmaybe-uninitialized]
 1067 |         printf("%" PRINTF_LL "d", (long long int) val64.i);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
message.c:1012:16: note: 'val64.i' was declared here
 1012 |     lo_pcast64 val64;
      |                ^~~~~
  CC       liblo_la-server.lo
server.c: In function 'lo_server_join_multicast_group':
server.c:649:13: warning: implicit declaration of function 'inet_pton'; did you mean 'inet_ntoa'? [-Wimplicit-function-declaration]
  649 |         if (inet_pton(AF_INET, group, &mreq.imr_multiaddr) == 0) {
      |             ^~~~~~~~~
      |             inet_ntoa
server.c: In function 'lo_server_new_with_proto_internal':
server.c:579:13: warning: 'strncpy' specified bound 1024 equals destination size [-Wstringop-truncation]
  579 |             strncpy(hostname, he->h_name, sizeof(hostname));
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  CC       liblo_la-method.lo
  CC       liblo_la-blob.lo
  CC       liblo_la-bundle.lo
  CC       liblo_la-timetag.lo
  CC       liblo_la-pattern_match.lo
  CC       liblo_la-server_thread.lo
  CCLD     liblo.la
libtool: link: warning: undefined symbols not allowed in x86_64-w64-mingw32 shared libraries`

`Compiling mxml-file.c
mxml-file.c: In function 'mxml_fd_read':
mxml-file.c:1021:19: warning: implicit declaration of function 'read'; did you mean 'fread'? [-Wimplicit-function-declaration]
 1021 |   while ((bytes = read(buf->fd, buf->buffer, sizeof(buf->buffer))) < 0)
      |                   ^~~~
      |                   fread
mxml-file.c: In function 'mxml_fd_write':
mxml-file.c:1073:18: warning: implicit declaration of function 'write'; did you mean 'fwrite'? [-Wimplicit-function-declaration]
 1073 |     if ((bytes = write(buf->fd, ptr, buf->current - ptr)) < 0)
      |                  ^~~~~
      |                  fwrite`

[ 50%] Building CXX object src/CMakeFiles/zynaddsubfx_core.dir/Misc/BankDb.cpp.obj
D:/msys64/home/ampet/zyn-fusion-build/src/zynaddsubfx/src/Misc/BankDb.cpp: In member function 'zyn::BankEntry zyn::BankDb::processXiz(std::string, std::string,
bmap&) const':
D:/msys64/home/ampet/zyn-fusion-build/src/zynaddsubfx/src/Misc/BankDb.cpp:233:17: warning: unused variable 'st' [-Wunused-variable]
  233 |     struct stat st;
      |                 ^~
D:/msys64/home/ampet/zyn-fusion-build/src/zynaddsubfx/src/Misc/BankDb.cpp:246:9: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
  246 |     int ret = 0;
      |         ^~~

[ 51%] Building CXX object src/CMakeFiles/zynaddsubfx_core.dir/Misc/Part.cpp.obj
D:/msys64/home/ampet/zyn-fusion-build/src/zynaddsubfx/src/Misc/Part.cpp: In lambda function:
D:/msys64/home/ampet/zyn-fusion-build/src/zynaddsubfx/src/Misc/Part.cpp:198:41: warning: unknown conversion type character 'F' in format [-Wformat=]
  198 |                 strftime (filename,23,"%F_%R.xiz",timeinfo);
      |                                         ^
D:/msys64/home/ampet/zyn-fusion-build/src/zynaddsubfx/src/Misc/Part.cpp:198:44: warning: unknown conversion type character 'R' in format [-Wformat=]
  198 |                 strftime (filename,23,"%F_%R.xiz",timeinfo);
      |                                            ^

[ 72%] Building CXX object src/CMakeFiles/zynaddsubfx.dir/main.cpp.obj
D:/msys64/home/ampet/zyn-fusion-build/src/zynaddsubfx/src/main.cpp: In function 'void WinMidiInProc(HMIDIIN, UINT, DWORD, DWORD, DWORD)':
D:/msys64/home/ampet/zyn-fusion-build/src/zynaddsubfx/src/main.cpp:164:13: warning: unused variable 'tmp' [-Wunused-variable]
  164 |         int tmp=0;
      |             ^~~
D:/msys64/home/ampet/zyn-fusion-build/src/zynaddsubfx/src/main.cpp:154:9: warning: unused variable 'midicommand' [-Wunused-variable]
  154 |     int midicommand=0;
      |         ^~~~~~~~~~~
D:/msys64/home/ampet/zyn-fusion-build/src/zynaddsubfx/src/main.cpp: In function 'void InitWinMidi(int)':
D:/msys64/home/ampet/zyn-fusion-build/src/zynaddsubfx/src/main.cpp:206:67: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long in
t' [-Wformat=]
  206 |             printf("[INFO] Starting Windows MIDI At %d with code %d(noerror=%d)\n", i, res, MMSYSERR_NOERROR);
      |                                                                  ~^                    ~~~
      |                                                                   |                    |
      |                                                                   int                  long int
      |                                                                  %ld
___________________________________

but it eventually stops here:

D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -llo: No such file or directory
collect2.exe: error: ld returned 1 exit status
make[3]: *** [src/CMakeFiles/zynaddsubfx.dir/build.make:106: src/zynaddsubfx.exe] Error 1
make[2]: *** [CMakeFiles/Makefile2:1432: src/CMakeFiles/zynaddsubfx.dir/all] Error 2
make[1]: *** [Makefile:146: all] Error 2
make[1]: Leaving directory '/home/ampet/zyn-fusion-build/build/build-zynaddsubfx-windows-release'
make: *** [Makefile.mingw64.mk:71: build_zynaddsubfx] Error 2
ampetrosillo commented 3 months ago

Erm, maybe I should just attach the output. zyn build errors.txt

fundamental commented 3 months ago

It looks like liblo has not been installed to a location that zynaddsubfx can find, hence the failure to link against it at the point of -llo failing in the last listed command.