Open Lucarda opened 4 years ago
@Lucarda it's been a long time since the request, but perhaps you can check if my PR #37 fixes this problem?
I did a quick test but now I got:
$ make install
[ 6%] Generating WDL/eel2/asm-nseel-x64.obj
/bin/sh: php: command not found
make[2]: *** [/E/git-portable/jsusfx/src/CMakeFiles/jsusfx.dir/build.make:62: E:/git-portable/jsusfx/src/WDL/eel2/asm-nseel-x64.obj] Error 127
make[1]: *** [CMakeFiles/Makefile2:126: E:/git-portable/jsusfx/src/CMakeFiles/jsusfx.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
I don't have php. Never had it. Not sure how to install it.
Hmm right msys doesn't have it. I did because I make a cross-compilation based on linux. It'd be nice if jsusfx would allow to use the prebuilts, then it would require neither php nor nasm to build.
I'll make some work towards that in a branch. Another thing is that the upstream has received support of ARM64. While at it, I consider adding this support, and also universal binary.
Let me know when ready for another test. :)
@Lucarda You could give my current fork a try, it drops the php requirement. https://github.com/jpcima/jsusfx
I'm getting this:
cmake -G "MSYS Makefiles" -D CMAKE_C_COMPILER=G:/msys64/mingw64/bin/gcc.exe -D CMAKE_CXX_COMPILER=G:/msys64/mingw64/bin/g++.exe .
make install
...
[ 85%] Linking CXX static library libjsusfx.a
[ 85%] Built target jsusfx
Scanning dependencies of target jsusfx_pd_project
[ 92%] Building CXX object CMakeFiles/jsusfx_pd_project.dir/jsusfx_pd.cpp.obj
g++.exe: error: G:/msys64/DPD_LONGINTTYPE=long long: No such file or directory
make[2]: *** [CMakeFiles/jsusfx_pd_project.dir/build.make:63: CMakeFiles/jsusfx_pd_project.dir/jsusfx_pd.cpp.obj] Error 1
make[1]: *** [CMakeFiles/Makefile2:77: CMakeFiles/jsusfx_pd_project.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
could g++.exe: error: G:/msys64/DPD_LONGINTTYPE=long long: No such file or directory
be replaced with:
-DPD_LONGINTTYPE=__int64
somewhere?
https://github.com/pure-data/pd-lib-builder/blob/master/Makefile.pdlibbuilder#L579
If i'm correct the pd.build
part is not supposed to work under MINGW but on MSVC.
https://github.com/pierreguillot/pd.build/blob/674c969e39ad3e8fbd38f344488c8bac3667ce6e/pd.cmake#L53
Perhaps it helps to replace "/D" with "-D" on that exact line.
I have done that and suppressed:
# Generate the function to export for Windows
#if(${WIN32})
# string(REPLACE "~" "_tilde" EXPORT_FUNCTION "${EXTERNAL_NAME}_setup")
# set_property(TARGET ${PROJECT_NAME} APPEND_STRING PROPERTY LINK_FLAGS #"/export:${EXPORT_FUNCTION}")
#endif()
in pd.cmake
.
Now I got undefined reference ..
in the linking stage. On Windows we link to pd[.lib][.dll] and in this case had to link to libjsusfx~.dll.a
?
Dont know how to do that in Cmake.
It will need a mingw alternative to that part your commented. It's that one that lets the dll know that these missing symbols would be found inside pd.exe.
But that part of pd.build is msvc-only. Perhaps you can make something of my external builder which has mingw support. mingw's dlltool can serve to change a def file into an implib. https://github.com/jpcima/pd-externals/blob/9fe8bbaaff32200e613b5cc6ee8c3a6823eac2ea/cmake/PdExternal.cmake#L13-L30
would be found inside pd.exe.
In the current build system Pd symbols are found in pd.build/x64/
in the pd.lib
and for MSVC also on pd.def
MINGW is happy finding the symbols in pd.dll
(this is how is done with pd-lib-builder.)
This is how the linking is done in pd-lib-builder
https://github.com/pure-data/pd-lib-builder/blob/master/Makefile.pdlibbuilder#L590
If i'm not mistaken MINGW can statically link to an .a
file.
Yes that's what the code would produce, a linkable .a
file. You can make these by command-line too
x86_64-w64-mingw32-dlltool -l x64/libpd.dll.a x64/pd.def
i686-w64-mingw32-dlltool -l x86/libpd.dll.a x86/pd.def
I got the libjsusfx~.dll.a
file. MINGW needs to link jsusfx~.dll
with that and pd.lib
.
Is the above correct?
I tried to build it with https://github.com/pure-data/pd-lib-builder and it went really good with this makefile
:
# library name
lib.name = jsusfx~
CPPFLAGS += -DEEL_TARGET_PORTABLE=1 -DWDL_FFT_REALSIZE=8 -I./src -I./src/WDL -I./src/WDL/eel2 -I./pd
common.sources = \
src/jsusfx.cpp \
src/jsusfx_file.cpp \
src/jsusfx_gfx.cpp \
src/jsusfx_serialize.cpp \
src/riff.cpp \
src/WDL/eel2/nseel-compiler.c \
src/WDL/eel2/nseel-eval.c \
src/WDL/eel2/nseel-ram.c \
src/WDL/eel2/nseel-yylex.c \
src/WDL/eel2/nseel-cfunc.c \
src/WDL/fft.c \
jsusfx~.class.sources = \
pd/jsusfx_pd.cpp \
datafiles = \
# include Makefile.pdlibbuilder
# (for real-world projects see the "Project Management" section
# in tips-tricks.md)
PDLIBBUILDER_DIR=./pd-lib-builder
include $(PDLIBBUILDER_DIR)/Makefile.pdlibbuilder
May be the -I includes are not necessary.
I can upload here the binary for Windows64. Seems to be working fine here.
I can upload here the binary for Windows64. Seems to be working fine here.
Is that an ongoing offer, perchance?
Is that an ongoing offer, perchance?
no.
Hi,
I'm trying to compile the Pd objects for windows 64 bit. No hurries :)
I do and get:
?