Simon-L / ModScript

9 stars 1 forks source link

build fails building on fresh git clone of Rack #8

Open jpnielsen opened 1 year ago

jpnielsen commented 1 year ago

On windows 11, fresh git pull of RackFree - and fresh update of msys2-mingw64

cd ModScript
make dep
(...)
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -Wall -I.. -fPIC -O3 -fPIC -march=nehalem -DWIN32 -D_WIN32_WINNT=0x501 -O0 -g -Wall -Werror -DDEBUG -MT liblo_la-server.lo -MD -MP -MF .deps/liblo_la-server.Tpo -c server.c -o liblo_la-server.o
server.c: In function 'lo_servers_wait':
server.c:1396:15: error: unused variable 'k' [-Werror=unused-variable]
 1396 |     int i, j, k, sched_timeout;
      |               ^
cc1.exe: all warnings being treated as errors
make[4]: *** [Makefile:863: liblo_la-server.lo] Error 1
make[4]: Leaving directory '/home/jpn99/src/rack/plugins/ModScript/dep/liblo/src'
make[3]: *** [Makefile:1022: all-recursive] Error 1
make[3]: Leaving directory '/home/jpn99/src/rack/plugins/ModScript/dep/liblo/src'
make[2]: *** [Makefile:472: all-recursive] Error 1
make[2]: Leaving directory '/home/jpn99/src/rack/plugins/ModScript/dep/liblo'
make[1]: *** [Makefile:381: all] Error 2
make[1]: Leaving directory '/home/jpn99/src/rack/plugins/ModScript/dep/liblo'
make: *** [Makefile:53: dep/lib/liblo.a] Error 2

I have gotten a bit further, by editing dep/liblo/src/server.c

int __attribute__((unused)) k;
int i, j, sched_timeout;

then i can manually 'make' in dep/liblo but I'm not sure I'm doing it right, because when i

cd ModScript 'make'

it gives a bunch of errors.

g++ -o plugin.dll build/src/LuaJITEngine.cpp.o build/src/LuaJITEngineAPI.cpp.o build/src/Lune.cpp.o build/src/LuneHelper.cpp.o build/src/PleineLune.cpp.o build/src/plugin.cpp.o dep/lib/libluajit-5.1.a -shared -L../.. -lRack -static-libstdc++
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/src/LuaJITEngineAPI.cpp.o: in function `lo::Message::Message(lo::Message const&)':
H:/msys64/mingw64/include/lo/lo_cpp.h:319:(.text+0x83a): undefined reference to `lo_message_incref'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/src/LuaJITEngineAPI.cpp.o: in function `lo::Message::serialise(lo::string_type const&, void*, unsigned long long*) const':
H:/msys64/mingw64/include/lo/lo_cpp.h:461:(.text+0x897): undefined reference to `lo_message_serialise'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/src/LuaJITEngineAPI.cpp.o: in function `lo::Message::~Message()':
H:/msys64/mingw64/include/lo/lo_cpp.h:336:(.text+0x8bb): undefined reference to `lo_message_free'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: H:/msys64/mingw64/include/lo/lo_cpp.h:336:(.text+0x943): undefined reference to `lo_message_free'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: H:/msys64/mingw64/include/lo/lo_cpp.h:336:(.text+0x96a): undefined reference to `lo_message_free'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/src/LuaJITEngineAPI.cpp.o: in function `lo::Message::deserialise(void*, unsigned long long)':
H:/msys64/mingw64/include/lo/lo_cpp.h:468:(.text+0x995): undefined reference to `lo_message_deserialise'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/src/LuaJITEngineAPI.cpp.o: in function `lo::Message::Message(void*)':
H:/msys64/mingw64/include/lo/lo_cpp.h:315:(.text+0x9a5): undefined reference to `lo_message_incref'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/src/LuaJITEngineAPI.cpp.o: in function `lo::Message::print() const':
H:/msys64/mingw64/include/lo/lo_cpp.h:472:(.text+0x9ad): undefined reference to `lo_message_pp'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/src/LuaJITEngineAPI.cpp.o: in function `lo::Address::send(lo::string_type const&, void*) const':
H:/msys64/mingw64/include/lo/lo_cpp.h:214:(.text+0x9ce): undefined reference to `lo_send_message'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/src/LuaJITEngineAPI.cpp.o: in function `lo::Message::~Message()':
H:/msys64/mingw64/include/lo/lo_cpp.h:336:(.text+0x9d6): undefined reference to `lo_message_free'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: H:/msys64/mingw64/include/lo/lo_cpp.h:336:(.text+0x9ec): undefined reference to `lo_message_free'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/src/Lune.cpp.o: in function `lo::Message::Message(void*)':
H:/msys64/mingw64/include/lo/lo_cpp.h:315:(.text+0xd1): undefined reference to `lo_message_incref'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/src/Lune.cpp.o: in function `lo::Message::~Message()':
H:/msys64/mingw64/include/lo/lo_cpp.h:336:(.text+0xf9): undefined reference to `lo_message_free'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: H:/msys64/mingw64/include/lo/lo_cpp.h:336:(.text+0x119): undefined reference to `lo_message_free'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/src/Lune.cpp.o: in function `lo::Message::Message()':
H:/msys64/mingw64/include/lo/lo_cpp.h:312:(.text+0x1f2): undefined reference to `lo_message_new'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: H:/msys64/mingw64/include/lo/lo_cpp.h:312:(.text+0x203): undefined reference to `lo_message_incref'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/src/Lune.cpp.o: in function `lo::Message::Message(lo::Message const&)':
H:/msys64/mingw64/include/lo/lo_cpp.h:319:(.text+0x228): undefined reference to `lo_message_incref'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/src/Lune.cpp.o: in function `lo::Message::~Message()':
H:/msys64/mingw64/include/lo/lo_cpp.h:336:(.text+0x23a): undefined reference to `lo_message_free'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/src/Lune.cpp.o: in function `lo::Message::Message(lo::Message const&)':
H:/msys64/mingw64/include/lo/lo_cpp.h:319:(.text+0x2f7): undefined reference to `lo_message_incref'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: H:/msys64/mingw64/include/lo/lo_cpp.h:319:(.text+0x357): undefined reference to `lo_message_incref'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/src/Lune.cpp.o: in function `lo::Message::~Message()':
H:/msys64/mingw64/include/lo/lo_cpp.h:336:(.text+0x367): undefined reference to `lo_message_free'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/src/Lune.cpp.o: in function `lo::Message::Message(lo::Message const&)':
H:/msys64/mingw64/include/lo/lo_cpp.h:319:(.text+0x391): undefined reference to `lo_message_incref'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/src/Lune.cpp.o: in function `lo::Message::~Message()':
H:/msys64/mingw64/include/lo/lo_cpp.h:336:(.text+0x3a1): undefined reference to `lo_message_free'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: H:/msys64/mingw64/include/lo/lo_cpp.h:336:(.text+0x3d3): undefined reference to `lo_message_free'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: H:/msys64/mingw64/include/lo/lo_cpp.h:336:(.text+0x3ef): undefined reference to `lo_message_free'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: H:/msys64/mingw64/include/lo/lo_cpp.h:336:(.text+0x5fd): undefined reference to `lo_message_free'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/src/Lune.cpp.o: in function `lo::Address::Address(lo::string_type const&)':
H:/msys64/mingw64/include/lo/lo_cpp.h:157:(.text+0x15be): undefined reference to `lo_address_new_from_url'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/src/Lune.cpp.o: in function `lo::Server::Server(lo::num_string_type const&, void (*)(int, char const*, char const*))':
H:/msys64/mingw64/include/lo/lo_cpp.h:552:(.text+0x1859): undefined reference to `lo_server_new'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/src/Lune.cpp.o: in function `lo::Server::url[abi:cxx11]() const':
H:/msys64/mingw64/include/lo/lo_cpp.h:685:(.text+0x18e1): undefined reference to `lo_server_get_url'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/src/Lune.cpp.o: in function `lo::Address::~Address()':
H:/msys64/mingw64/include/lo/lo_cpp.h:163:(.text+0x1ad5): undefined reference to `lo_address_free'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/src/Lune.cpp.o: in function `lo::Server::recv(int)':
H:/msys64/mingw64/include/lo/lo_cpp.h:639:(.text+0x3198): undefined reference to `lo_server_recv_noblock'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/src/Lune.cpp.o: in function `lo::Message::Message()':
H:/msys64/mingw64/include/lo/lo_cpp.h:312:(.text+0x3731): undefined reference to `lo_message_new'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: H:/msys64/mingw64/include/lo/lo_cpp.h:312:(.text+0x3742): undefined reference to `lo_message_incref'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/src/Lune.cpp.o: in function `lo::Message::~Message()':
H:/msys64/mingw64/include/lo/lo_cpp.h:336:(.text+0x45cf): undefined reference to `lo_message_free'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/src/Lune.cpp.o: in function `lo::Address::~Address()':
H:/msys64/mingw64/include/lo/lo_cpp.h:163:(.text+0x4893): undefined reference to `lo_address_free'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/src/Lune.cpp.o: in function `lo::Server::_add_method(char const*, char const*, int (*)(char const*, char const*, lo_arg**, int, void*, void*), void*) const':
H:/msys64/mingw64/include/lo/lo_cpp.h:734:(.text$_ZNK2lo6Server11_add_methodEPKcS2_PFiS2_S2_PP6lo_argiPvS6_ES6_[_ZNK2lo6Server11_add_methodEPKcS2_PFiS2_S2_PP6lo_argiPvS6_ES6_]+0x1b): undefined reference to `lo_server_add_method'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/src/Lune.cpp.o: in function `lo::Server::~Server()':
H:/msys64/mingw64/include/lo/lo_cpp.h:571:(.text$_ZN2lo6ServerD1Ev[_ZN2lo6ServerD1Ev]+0x2a): undefined reference to `lo_server_free'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/src/Lune.cpp.o: in function `lo::Server::~Server()':
H:/msys64/mingw64/include/lo/lo_cpp.h:571:(.text$_ZN2lo6ServerD0Ev[_ZN2lo6ServerD0Ev]+0x2a): undefined reference to `lo_server_free'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/src/Lune.cpp.o: in function `lo::Message::~Message()':
H:/msys64/mingw64/include/lo/lo_cpp.h:336:(.text$_ZN16oscThreadMessageD1Ev[_ZN16oscThreadMessageD1Ev]+0x29): undefined reference to `lo_message_free'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/src/PleineLune.cpp.o: in function `lo::Message::Message(lo::Message const&)':
H:/msys64/mingw64/include/lo/lo_cpp.h:319:(.text$_ZN10PleineLune7processERKN4rack6engine6Module11ProcessArgsE[_ZN10PleineLune7processERKN4rack6engine6Module11ProcessArgsE]+0x49d): undefined reference to `lo_message_incref'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/src/PleineLune.cpp.o: in function `lo::Message::~Message()':
H:/msys64/mingw64/include/lo/lo_cpp.h:336:(.text$_ZN10PleineLune7processERKN4rack6engine6Module11ProcessArgsE[_ZN10PleineLune7processERKN4rack6engine6Module11ProcessArgsE]+0x52e): undefined reference to `lo_message_free'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: H:/msys64/mingw64/include/lo/lo_cpp.h:336:(.text$_ZN10PleineLune7processERKN4rack6engine6Module11ProcessArgsE[_ZN10PleineLune7processERKN4rack6engine6Module11ProcessArgsE]+0x636): undefined reference to `lo_message_free'
H:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: H:/msys64/mingw64/include/lo/lo_cpp.h:336:(.text$_ZN10PleineLune7processERKN4rack6engine6Module11ProcessArgsE[_ZN10PleineLune7processERKN4rack6engine6Module11ProcessArgsE]+0x66a): undefined reference to `lo_message_free'
collect2.exe: error: ld returned 1 exit status
make: *** [../../compile.mk:77: plugin.dll] Error 1

... but i basically don't know what I'm doing.

Please make Modscript build again, I really wanted to try making a control module for my Korg Minilogue XD.

jpnielsen commented 1 year ago

I got it building on windows 11, after changing the makefile a bit

diff Makefile Makefile.new
55c55
<       cd dep/liblo && ./autogen.sh --prefix="$(DEP_PATH)" --enable-static=yes --enable-shared=no --disable-tests --disable-network-tests --disable-tools --disable-examples
---
>       cd dep/liblo && ./autogen.sh CFLAGS="-Wno-error=unused-variable" --prefix="$(DEP_PATH)" --enable-static=yes --enable-shared=no --disable-tests --disable-network-tests --disable-tools --disable-examples
65c65
< LDFLAGS +=
---
> LDFLAGS += -liphlpapi -lws2_32

I also git rid of some warnings by specifically including winsock2.h before windows.h :

diff Lune.hpp Lune.hpp.new
11a12
> #include <winsock2.h>