porres / pd-else

ELSE - EL Locus Solus' Externals for Pure Data
Do What The F*ck You Want To Public License
297 stars 35 forks source link

how to copy 'pdlua' & 'Live-Electronics-Tutorial' folders via the makefile? #1414

Closed porres closed 1 year ago

porres commented 1 year ago

I have to do this manually and it sucks, I bet there is a simple way to use pdlibbuilder and the makefile to automatically do this.

I tried 'datadirs' but couldn't do it, maybe @Lucarda is wise enough to help me figuring out how to do this.

Lucarda commented 1 year ago

Trying to build I get

++++ info: linking objects in pink~.m_amd64 for lib else
cc -static-libgcc -shared -Wl,--enable-auto-import "C:/pd-sources/64/bin/pd.dll"    -o pink~.m_amd64 Classes/Source/pink~.o shared/random.o
make: *** No rule to make target 'lua/pd-lua/pdlua.o', needed by 'pdlua.m_amd64'.  Stop.

then I'll try. I have a couple of ideas :)

porres commented 1 year ago

Hmmm, we just added pd-lua as a submodule, try running "git submodule init" in ELSE's directory.

Lucarda commented 1 year ago

the correct command is git submodule update --init --recursive

now i get

++++ info: linking objects in osc.parse.m_amd64 for lib else
cc -static-libgcc -shared -Wl,--enable-auto-import "C:/pd-sources/64/bin/pd.dll"    -o osc.parse.m_amd64 Classes/Source/osc.parse.o
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: Classes/Source/osc.parse.o:osc.parse.c:(.text+0xf5): undefined reference to `__imp_ntohl'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: Classes/Source/osc.parse.o:osc.parse.c:(.text+0x6d0): undefined reference to `__imp_ntohl'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: Classes/Source/osc.parse.o:osc.parse.c:(.text+0x132d): undefined reference to `__imp_ntohl'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: Classes/Source/osc.parse.o:osc.parse.c:(.text+0x1501): undefined reference to `__imp_ntohl'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: Classes/Source/osc.parse.o:osc.parse.c:(.text+0x15fb): undefined reference to `__imp_ntohl'
collect2.exe: error: ld returned 1 exit status
make: *** [pd-lib-builder//Makefile.pdlibbuilder:881: osc.parse.m_amd64] Error 1

looks that a compiler flag is missing? will investigate...

porres commented 1 year ago

can you build ELSE and osc.parse a few commits before ( from this point? https://github.com/porres/pd-else/commit/9b16b0380adf3c1e5890e6ce5867a037e4d25031 )

I wanna see if this cause the issue --> https://github.com/porres/pd-else/commit/5cc3b0f3b8847d84e042fbafa971091cdc5e9fb9

porres commented 1 year ago

I wanna see if this cause the issue --> https://github.com/porres/pd-else/commit/5cc3b0f3b8847d84e042fbafa971091cdc5e9fb9

If this isn't the culprit, well, this is basically the same as unpackOSC, so I ask, can you build mrpeach just fine?

Lucarda commented 1 year ago

It was just that we need to link to the Windows sockets with:

define forWindows
  ldlibs += -lws2_32
endef

now I got this if I do install:

install: cannot stat 'lua/pd-lua/pdlua/pd.lua': No such file or directory
make: *** [pd-lib-builder//Makefile.pdlibbuilder:1142: install-datafiles] Error 1

but we are fine

porres commented 1 year ago

install: cannot stat 'lua/pd-lua/pdlua/pd.lua': No such file or directory

funny, it's here for me

Screen Shot 2023-01-04 at 19 49 41

porres commented 1 year ago

It was just that we need to link to the Windows sockets with:

Will you need to send me a PR so this works?

Lucarda commented 1 year ago

I almost have ready the PR.

What i don't get is the pd-lua/pdlua folder:

luafolder

did you mean:

./lua/pd-lua/pd.lua

instead of

./lua/pd-lua/pdlua/pd.lua

porres commented 1 year ago

ok, I see I screwed up, "./lua/pd-lua/pd.lua" is where the file actually should be

Lucarda commented 1 year ago

Ok I'm copying ./folders/Live-Electronics-Tutorial and ./folders/pdlua to the install dir via a installplus target. You can later change the target name. (or add more dirs to copy)

I'm preparing the PR ...

Lucarda commented 1 year ago

done https://github.com/porres/pd-else/pull/1415

:)

porres commented 1 year ago

folders weren't copied into 'else' for me :/

Lucarda commented 1 year ago

did you did make installplus ?

Lucarda commented 1 year ago

I mean you have to use installplus instead of install

porres commented 1 year ago

trying now

porres commented 1 year ago

it works :)