Re: [PD-dev] pdlibbuilder and static linking pthread by default on Windows.

2018-02-07 Thread Martin Peach
On Wed, Feb 7, 2018 at 11:50 AM, Lucas Cordiviola 
wrote:

> There were many problems back in 2016 with people that didn't have
> pd-extended installed. For them when downloading from deken many objects
> didn't work. One of the causes was that those "extended" .dlls where using
> pthread-GC-2.dll. This file was installed by pd-extended installer on
> windows system folders.
>
> Attached is a list of missing dlls on 2016.
>
> Now we have included those dlls in each pkg so [externals] work without
> having pd-extended installed.
>
> The actual libwinpthread-1.dll could change in future MinGWs so externals
> compiled today may stop working.
>
Is it possible to just use one pthread dll for all the externals, the one
that comes with Pd? They should all have the same functions in them, so it
would just be a matter of changing the linker LIBS.
In externals/Makefile pthreadGC2 occurs just once at the beginning, this is
the one used in mrpeach.
I attach a list of all the lpthreads mentioned in all the files in the
externals directory (at
https://sourceforge.net/p/pure-data/svn/HEAD/tree/trunk/externals/).
Most of them are pthread for linux or MacOS (except
iem/iemnet/Makefile:41:LIBS_windows=-lpthread), 18 are pthreadGC and four
are pthreadVC. It's possible some of the pthreads are for Windows as well.

Martin
./august/readanysf~/Makefile:23:PD_LDFLAGS =  -L$(GAVLPREFIX)/lib  -lgavl 
-lgmerlin_avdec -lpthread 
./august/readanysf~/Makefile.win:18:LDFLAGS += -lpd -lwsock32 -lkernel32 
-luser32 -lgdi32 -lpthreadGC2 $(GMERLIN_LIBS)
./bbogart/gphoto/makefile:15:-lgphoto2 -lpthread
./build/win/netclient.libs:1:-lwsock32 -lpthreadGC2
./build/win/netdist.libs:1:-lwsock32 -lpthreadGC2
./build/win/netrec.libs:1:-lwsock32 -lpthreadGC2
./build/win/netserver.libs:1:-lwsock32 -lpthreadGC2
./build/win/oggamp~.libs:1:-lwsock32 -lpthreadGC2
./build/win/oggcast~.libs:1:-lwsock32 -lpthreadGC2
./grill/flext/.svn/pristine/f4/f4ac9b6f8222176fb47eddede95bb10bc17ad6f6.svn-base:15:LIBS
 += -lpthreadVC2
./grill/flext/.svn/pristine/f4/f4ac9b6f8222176fb47eddede95bb10bc17ad6f6.svn-base:17:LIBS
 += -lpthreadVC
./grill/flext/buildsys/win/pd/gnumake-mingw.inc:15:LIBS +=  -lpthreadVC2
./grill/flext/buildsys/win/pd/gnumake-mingw.inc:17:LIBS +=  -lpthreadVC
./hardware/itrax2/makefile:14:LIB = -ldl -lm -lpthread
./iem/hdspm_mixer/makefile:8:LIB = -ldl -lm -lpthread
./iem/iemgui/src/makefile_darwin:9:LIB = -ldl -lm -lpthread
./iem/iemgui/src/makefile_linux:9:LIB = -ldl -lm -lpthread
./iem/iemnet/.svn/pristine/94/94c749b33a349a8a3c122eb8ec15a0d08d514b86.svn-base:41:LIBS_windows=-lpthread
./iem/iemnet/Makefile:41:LIBS_windows=-lpthread
./iem/iem_adaptfilt/src/makefile_darwin:9:LIB = -ldl -lm -lpthread
./iem/iem_adaptfilt/src/makefile_lin:8:LIB = -ldl -lm -lpthread
./iem/iem_ambi/src/makefile_darwin:9:LIB = -ldl -lm -lpthread
./iem/iem_atan2/src/makefile:8:LIB = -ldl -lm -lpthread
./iem/iem_atan2/src/makefile_darwin:9:LIB = -ldl -lm -lpthread
./iem/iem_atan2/src/makefile_linux:8:LIB = -ldl -lm -lpthread
./iem/iem_bin_ambi/src/makefile_darwin:9:LIB = -ldl -lm -lpthread
./iem/iem_bin_ambi/src/makefile_linux:8:LIB = -ldl -lm -lpthread
./iem/iem_delay/src/makefile_darwin:9:LIB = -ldl -lm -lpthread
./iem/iem_dp/src/makefile_darwin:9:LIB = -ldl -lm -lpthread
./iem/iem_dp/src/makefile_linux:9:LIB = -ldl -lm -lpthread
./iem/iem_matrix/src/makefile:8:LIB = -ldl -lm -lpthread
./iem/iem_matrix/src/makefile_darwin:9:LIB = -ldl -lm -lpthread
./iem/iem_matrix/src/makefile_linux:8:LIB = -ldl -lm -lpthread
./iem/iem_roomsim/src/makefile:8:LIB = -ldl -lm -lpthread
./iem/iem_roomsim/src/makefile_darwin:9:LIB = -ldl -lm -lpthread
./iem/iem_roomsim/src/makefile_linux:8:LIB = -ldl -lm -lpthread
./iem/iem_spec2/src/makefile_darwin:9:LIB = -ldl -lm -lpthread
./iem/iem_spec2/src/makefile_linux:8:LIB = -ldl -lm -lpthread
./iem/iem_tab/src/makefile_darwin:9:LIB = -ldl -lm -lpthread
./iem/pdoctave/Makefile:8:LIB = -ldl -lm -lpthread
./iemlib/iemlib1/src/makefile_darwin:9:LIB = -ldl -lm -lpthread
./iemlib/iemlib2/src/makefile_darwin:9:LIB = -ldl -lm -lpthread
./iemlib/iem_mp3/src/makefile_darwin:9:LIB = -ldl -lm -lpthread
./iemlib/iem_t3_lib/src/makefile_darwin:9:LIB = -ldl -lm -lpthread
./input_noticer/Makefile:19:LINUXLDFLAGS = `pkg-config --libs glib-2.0 hal 
dbus-glib-1` -lpthread -lgthread-2.0 -lglib-2.0
./Makefile:79:-lwsock32 -liphlpapi -lpthreadGC2 -lkernel32 -luser32 -lgdi32 
-lregex -liberty
./maxlib/Makefile:41:LIBS_windows = -lpthread
./moocow/common/m4/ax_pd_external.m4:355:  LIBS="$LIBS -lpd -lwsock32 
-lpthreadGC2 -lkernel32 -luser32 -lgdi32 -lregex"
./moocow/deque/configure:3861:  LIBS="$LIBS -lpd -lwsock32 -lpthreadGC2 
-lkernel32 -luser32 -lgdi32 -lregex"
./moocow/flite/configure:4401:  LIBS="$LIBS -lpd -lwsock32 -lpthreadGC2 
-lkernel32 -luser32 -lgdi32 -lregex"
./moocow/gfsm/configure:20523:  LIBS="$LIBS -lpd -lwsock32 -lpthreadGC2 
-lkernel32 -luser32 -lgdi32 -lregex"
./moocow/locale/configure:3861:  LIBS="$LIBS 

Re: [PD-dev] pdlibbuilder and static linking pthread by default on Windows.

2018-02-07 Thread Martin Peach
To return to the original subject of this thread, if I install Pd for
Windows from Miller's site I get libwinpthread-1.dll and pthreadVC.dll in
Pd/bin. So I don't see why it's necessary to ship either or both along with
an external, or to statically link them. It seems to needlessly duplicate
code and possibly introduce version conflicts.

Martin
___
Pd-dev mailing list
Pd-dev@lists.iem.at
https://lists.puredata.info/listinfo/pd-dev


[PD-dev] Multithreading support for FFT functions

2018-02-07 Thread Pierre Guillot
Hi,

As IOhannes pointed it in this Github pull request (
https://github.com/pure-data/pure-data/pull/81), the FFT functions in
d_fft_fftsg.c are not thread-safe. An easy fix would be to set the static
variables TLS (*PERTHREAD*). (It doesn't solve the "size problem" of the
original pull request but it can be complementary). If it seems good for
you, I will add this to the pull request dedicated to the
multi-instance/multithreading problems on Github (
https://github.com/pure-data/pure-data/pull/288).

Another solution would be to integrate these static variables in the pd
instance structure (and to allocate the memory for each instance)?
Nevertheless, this second solution would add some code pretty useless if
someone use the FFTW wrapper. But is anybody using the FFTW wrapper
(d_fft_fftw.c)? If this second solution seems more suitable, I can create a
new pull request.

Cheers,
Pierre
___
Pd-dev mailing list
Pd-dev@lists.iem.at
https://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] pdlibbuilder and static linking pthread by default on Windows.

2018-02-07 Thread Lucas Cordiviola
There are upcoming compilations for w64 and not-too-soon the 
"double-precision" ones.

This will avoid missing pthreads.

"-static by default" will also help to not make a mistake and ship an 
w32 pthread on a w64 pkg.


Mensaje telepatico asistido por maquinas.

On 2/6/2018 12:43 PM, IOhannes m zmoelnig wrote:
> these two have been re-uploaded since (fwiw, both have been uploaded by
> me), but miss the libpthread*.dll.
> - bsaylor
> - iemnet

___
Pd-dev mailing list
Pd-dev@lists.iem.at
https://lists.puredata.info/listinfo/pd-dev