Csound Csound-dev Csound-tekno Search About

[Csnd-dev] libwinpthread-1

Date2016-04-09 11:52
FromOeyvind Brandtsegg
Subject[Csnd-dev] libwinpthread-1
Hi,

When I build a minimal Csound version (using the build script from the
repo from Feb 27), it produce an error on startup regarding a missing
libwinpthread-1.dll. I suspect there might be a dynamic link to this
file somewwhere (introduced some time during the 4-5 weeks or so).

Is there any specific reason why this was introduced? I thought it
should all be static linking now?
Does it perhaps relate to this:
https://listserv.heanet.ie/cgi-bin/wa?A3=ind1602&L=CSOUND-DEV&E=quoted-printable&P=629755&B=--&T=text%2Fplain;%20charset=UTF-8&header=1
?



-- 

Oeyvind Brandtsegg
Professor of Music Technology
NTNU
7491 Trondheim
Norway
Cell: +47 92 203 205

http://www.partikkelaudio.com/
http://soundcloud.com/brandtsegg
http://flyndresang.no/

Date2016-04-10 18:39
FromOeyvind Brandtsegg
SubjectRe: [Csnd-dev] libwinpthread-1
If I delete osd.dll from the plugins folder, I do not get the
libwinpthread error.
Where should I change a setting to try to compile osc.dll statically linked?

2016-04-09 12:52 GMT+02:00 Oeyvind Brandtsegg :
> Hi,
>
> When I build a minimal Csound version (using the build script from the
> repo from Feb 27), it produce an error on startup regarding a missing
> libwinpthread-1.dll. I suspect there might be a dynamic link to this
> file somewwhere (introduced some time during the 4-5 weeks or so).
>
> Is there any specific reason why this was introduced? I thought it
> should all be static linking now?
> Does it perhaps relate to this:
> https://listserv.heanet.ie/cgi-bin/wa?A3=ind1602&L=CSOUND-DEV&E=quoted-printable&P=629755&B=--&T=text%2Fplain;%20charset=UTF-8&header=1
> ?
>
>
>
> --
>
> Oeyvind Brandtsegg
> Professor of Music Technology
> NTNU
> 7491 Trondheim
> Norway
> Cell: +47 92 203 205
>
> http://www.partikkelaudio.com/
> http://soundcloud.com/brandtsegg
> http://flyndresang.no/
> http://soundcloud.com/t-emp



-- 

Oeyvind Brandtsegg
Professor of Music Technology
NTNU
7491 Trondheim
Norway
Cell: +47 92 203 205

http://www.partikkelaudio.com/
http://soundcloud.com/brandtsegg
http://flyndresang.no/

Date2016-04-10 19:00
FromRory Walsh
SubjectRe: [Csnd-dev] libwinpthread-1
Csound is now linking statically when building its interface. For example, we no longer need to include portaudio.dll, libsndfile, etc. But the plugin opcodes are still building dynamically. For my previous Csound builds I added -static to the make_plugin calls in Opcodes/CMakeLIsts.txt, but this resulted in static linking across all platforms, which isn't desirable. It was suggested that I add a conditional in make_plugin() to see if we are on Windows, and if so, build statically. Unfortunately I just don't know how to do this. If you like I can send you a cmakelists.txt that will build plugin opcodes statically, but it would be far better to have the make_plugin() call updated. 

Steven? Mike? Anyone? 

On 10 April 2016 at 18:39, Oeyvind Brandtsegg <oyvind.brandtsegg@ntnu.no> wrote:
If I delete osd.dll from the plugins folder, I do not get the
libwinpthread error.
Where should I change a setting to try to compile osc.dll statically linked?

2016-04-09 12:52 GMT+02:00 Oeyvind Brandtsegg <oyvind.brandtsegg@ntnu.no>:
> Hi,
>
> When I build a minimal Csound version (using the build script from the
> repo from Feb 27), it produce an error on startup regarding a missing
> libwinpthread-1.dll. I suspect there might be a dynamic link to this
> file somewwhere (introduced some time during the 4-5 weeks or so).
>
> Is there any specific reason why this was introduced? I thought it
> should all be static linking now?
> Does it perhaps relate to this:
> https://listserv.heanet.ie/cgi-bin/wa?A3=ind1602&L=CSOUND-DEV&E=quoted-printable&P=629755&B=--&T=text%2Fplain;%20charset=UTF-8&header=1
> ?
>
>
>
> --
>
> Oeyvind Brandtsegg
> Professor of Music Technology
> NTNU
> 7491 Trondheim
> Norway
> Cell: +47 92 203 205
>
> http://www.partikkelaudio.com/
> http://soundcloud.com/brandtsegg
> http://flyndresang.no/
> http://soundcloud.com/t-emp



--

Oeyvind Brandtsegg
Professor of Music Technology
NTNU
7491 Trondheim
Norway
Cell: +47 92 203 205

http://www.partikkelaudio.com/
http://soundcloud.com/brandtsegg
http://flyndresang.no/
http://soundcloud.com/t-emp


Date2016-04-10 19:23
FromMichael Gogins
SubjectRe: [Csnd-dev] libwinpthread-1

On Windows with MSYS2/mingw64, ldd shows that OSC.dll does not depend on the liblo dll, but does depend on winpthread-1.dll.

You could add flags to CMakeLists.txt for the OSC DLL to link everything statically, starting at about line 178, just for Windows x64 of course.

I think that would work. The pthreads obviously are used inside the liblo library, but linking OSC.dll statically with winpthreads (libpthreadGC2.a) should do the trick. I'm not sure what flags to add however.

Best,

Mike


On Apr 10, 2016 8:49 PM, "Oeyvind Brandtsegg" <oyvind.brandtsegg@ntnu.no> wrote:
If I delete osd.dll from the plugins folder, I do not get the
libwinpthread error.
Where should I change a setting to try to compile osc.dll statically linked?

2016-04-09 12:52 GMT+02:00 Oeyvind Brandtsegg <oyvind.brandtsegg@ntnu.no>:
> Hi,
>
> When I build a minimal Csound version (using the build script from the
> repo from Feb 27), it produce an error on startup regarding a missing
> libwinpthread-1.dll. I suspect there might be a dynamic link to this
> file somewwhere (introduced some time during the 4-5 weeks or so).
>
> Is there any specific reason why this was introduced? I thought it
> should all be static linking now?
> Does it perhaps relate to this:
> https://listserv.heanet.ie/cgi-bin/wa?A3=ind1602&L=CSOUND-DEV&E=quoted-printable&P=629755&B=--&T=text%2Fplain;%20charset=UTF-8&header=1
> ?
>
>
>
> --
>
> Oeyvind Brandtsegg
> Professor of Music Technology
> NTNU
> 7491 Trondheim
> Norway
> Cell: +47 92 203 205
>
> http://www.partikkelaudio.com/
> http://soundcloud.com/brandtsegg
> http://flyndresang.no/
> http://soundcloud.com/t-emp



--

Oeyvind Brandtsegg
Professor of Music Technology
NTNU
7491 Trondheim
Norway
Cell: +47 92 203 205

http://www.partikkelaudio.com/
http://soundcloud.com/brandtsegg
http://flyndresang.no/
http://soundcloud.com/t-emp

Date2016-04-10 19:34
FromOeyvind Brandtsegg
SubjectRe: [Csnd-dev] libwinpthread-1
Thanks you for looking into it, Mike.
Are you able to find out what flags?

2016-04-10 20:23 GMT+02:00 Michael Gogins :
> On Windows with MSYS2/mingw64, ldd shows that OSC.dll does not depend on the
> liblo dll, but does depend on winpthread-1.dll.
>
> You could add flags to CMakeLists.txt for the OSC DLL to link everything
> statically, starting at about line 178, just for Windows x64 of course.
>
> I think that would work. The pthreads obviously are used inside the liblo
> library, but linking OSC.dll statically with winpthreads (libpthreadGC2.a)
> should do the trick. I'm not sure what flags to add however.
>
> Best,
>
> Mike
>
>
> On Apr 10, 2016 8:49 PM, "Oeyvind Brandtsegg" 
> wrote:
>>
>> If I delete osd.dll from the plugins folder, I do not get the
>> libwinpthread error.
>> Where should I change a setting to try to compile osc.dll statically
>> linked?
>>
>> 2016-04-09 12:52 GMT+02:00 Oeyvind Brandtsegg :
>> > Hi,
>> >
>> > When I build a minimal Csound version (using the build script from the
>> > repo from Feb 27), it produce an error on startup regarding a missing
>> > libwinpthread-1.dll. I suspect there might be a dynamic link to this
>> > file somewwhere (introduced some time during the 4-5 weeks or so).
>> >
>> > Is there any specific reason why this was introduced? I thought it
>> > should all be static linking now?
>> > Does it perhaps relate to this:
>> >
>> > https://listserv.heanet.ie/cgi-bin/wa?A3=ind1602&L=CSOUND-DEV&E=quoted-printable&P=629755&B=--&T=text%2Fplain;%20charset=UTF-8&header=1
>> > ?
>> >
>> >
>> >
>> > --
>> >
>> > Oeyvind Brandtsegg
>> > Professor of Music Technology
>> > NTNU
>> > 7491 Trondheim
>> > Norway
>> > Cell: +47 92 203 205
>> >
>> > http://www.partikkelaudio.com/
>> > http://soundcloud.com/brandtsegg
>> > http://flyndresang.no/
>> > http://soundcloud.com/t-emp
>>
>>
>>
>> --
>>
>> Oeyvind Brandtsegg
>> Professor of Music Technology
>> NTNU
>> 7491 Trondheim
>> Norway
>> Cell: +47 92 203 205
>>
>> http://www.partikkelaudio.com/
>> http://soundcloud.com/brandtsegg
>> http://flyndresang.no/
>> http://soundcloud.com/t-emp



-- 

Oeyvind Brandtsegg
Professor of Music Technology
NTNU
7491 Trondheim
Norway
Cell: +47 92 203 205

http://www.partikkelaudio.com/
http://soundcloud.com/brandtsegg
http://flyndresang.no/

Date2016-04-10 19:58
FromMichael Gogins
SubjectRe: [Csnd-dev] libwinpthread-1

I think that in the link command you just put -static ahead of the libraries you want to link statically. You can mix this with -dynamic but obviously that is not what we need here.

Regards,
Mike

On Apr 10, 2016 9:44 PM, "Oeyvind Brandtsegg" <oyvind.brandtsegg@ntnu.no> wrote:
Thanks you for looking into it, Mike.
Are you able to find out what flags?

2016-04-10 20:23 GMT+02:00 Michael Gogins <michael.gogins@gmail.com>:
> On Windows with MSYS2/mingw64, ldd shows that OSC.dll does not depend on the
> liblo dll, but does depend on winpthread-1.dll.
>
> You could add flags to CMakeLists.txt for the OSC DLL to link everything
> statically, starting at about line 178, just for Windows x64 of course.
>
> I think that would work. The pthreads obviously are used inside the liblo
> library, but linking OSC.dll statically with winpthreads (libpthreadGC2.a)
> should do the trick. I'm not sure what flags to add however.
>
> Best,
>
> Mike
>
>
> On Apr 10, 2016 8:49 PM, "Oeyvind Brandtsegg" <oyvind.brandtsegg@ntnu.no>
> wrote:
>>
>> If I delete osd.dll from the plugins folder, I do not get the
>> libwinpthread error.
>> Where should I change a setting to try to compile osc.dll statically
>> linked?
>>
>> 2016-04-09 12:52 GMT+02:00 Oeyvind Brandtsegg <oyvind.brandtsegg@ntnu.no>:
>> > Hi,
>> >
>> > When I build a minimal Csound version (using the build script from the
>> > repo from Feb 27), it produce an error on startup regarding a missing
>> > libwinpthread-1.dll. I suspect there might be a dynamic link to this
>> > file somewwhere (introduced some time during the 4-5 weeks or so).
>> >
>> > Is there any specific reason why this was introduced? I thought it
>> > should all be static linking now?
>> > Does it perhaps relate to this:
>> >
>> > https://listserv.heanet.ie/cgi-bin/wa?A3=ind1602&L=CSOUND-DEV&E=quoted-printable&P=629755&B=--&T=text%2Fplain;%20charset=UTF-8&header=1
>> > ?
>> >
>> >
>> >
>> > --
>> >
>> > Oeyvind Brandtsegg
>> > Professor of Music Technology
>> > NTNU
>> > 7491 Trondheim
>> > Norway
>> > Cell: +47 92 203 205
>> >
>> > http://www.partikkelaudio.com/
>> > http://soundcloud.com/brandtsegg
>> > http://flyndresang.no/
>> > http://soundcloud.com/t-emp
>>
>>
>>
>> --
>>
>> Oeyvind Brandtsegg
>> Professor of Music Technology
>> NTNU
>> 7491 Trondheim
>> Norway
>> Cell: +47 92 203 205
>>
>> http://www.partikkelaudio.com/
>> http://soundcloud.com/brandtsegg
>> http://flyndresang.no/
>> http://soundcloud.com/t-emp



--

Oeyvind Brandtsegg
Professor of Music Technology
NTNU
7491 Trondheim
Norway
Cell: +47 92 203 205

http://www.partikkelaudio.com/
http://soundcloud.com/brandtsegg
http://flyndresang.no/
http://soundcloud.com/t-emp

Date2016-04-10 20:02
FromRory Walsh
SubjectRe: [Csnd-dev] libwinpthread-1
AttachmentsCMakeLists.txt  
Here you go Oeyvind. This is my old Opcodes/CMakeLists.txt, I was hoping that I wouldn't need it again, but it looks like I might! Note that this might not be up to date with the current dev branch, but you can see how I statically compile some, if not all of the opcodes. 

On 10 April 2016 at 19:58, Michael Gogins <michael.gogins@gmail.com> wrote:

I think that in the link command you just put -static ahead of the libraries you want to link statically. You can mix this with -dynamic but obviously that is not what we need here.

Regards,
Mike

On Apr 10, 2016 9:44 PM, "Oeyvind Brandtsegg" <oyvind.brandtsegg@ntnu.no> wrote:
Thanks you for looking into it, Mike.
Are you able to find out what flags?

2016-04-10 20:23 GMT+02:00 Michael Gogins <michael.gogins@gmail.com>:
> On Windows with MSYS2/mingw64, ldd shows that OSC.dll does not depend on the
> liblo dll, but does depend on winpthread-1.dll.
>
> You could add flags to CMakeLists.txt for the OSC DLL to link everything
> statically, starting at about line 178, just for Windows x64 of course.
>
> I think that would work. The pthreads obviously are used inside the liblo
> library, but linking OSC.dll statically with winpthreads (libpthreadGC2.a)
> should do the trick. I'm not sure what flags to add however.
>
> Best,
>
> Mike
>
>
> On Apr 10, 2016 8:49 PM, "Oeyvind Brandtsegg" <oyvind.brandtsegg@ntnu.no>
> wrote:
>>
>> If I delete osd.dll from the plugins folder, I do not get the
>> libwinpthread error.
>> Where should I change a setting to try to compile osc.dll statically
>> linked?
>>
>> 2016-04-09 12:52 GMT+02:00 Oeyvind Brandtsegg <oyvind.brandtsegg@ntnu.no>:
>> > Hi,
>> >
>> > When I build a minimal Csound version (using the build script from the
>> > repo from Feb 27), it produce an error on startup regarding a missing
>> > libwinpthread-1.dll. I suspect there might be a dynamic link to this
>> > file somewwhere (introduced some time during the 4-5 weeks or so).
>> >
>> > Is there any specific reason why this was introduced? I thought it
>> > should all be static linking now?
>> > Does it perhaps relate to this:
>> >
>> > https://listserv.heanet.ie/cgi-bin/wa?A3=ind1602&L=CSOUND-DEV&E=quoted-printable&P=629755&B=--&T=text%2Fplain;%20charset=UTF-8&header=1
>> > ?
>> >
>> >
>> >
>> > --
>> >
>> > Oeyvind Brandtsegg
>> > Professor of Music Technology
>> > NTNU
>> > 7491 Trondheim
>> > Norway
>> > Cell: +47 92 203 205
>> >
>> > http://www.partikkelaudio.com/
>> > http://soundcloud.com/brandtsegg
>> > http://flyndresang.no/
>> > http://soundcloud.com/t-emp
>>
>>
>>
>> --
>>
>> Oeyvind Brandtsegg
>> Professor of Music Technology
>> NTNU
>> 7491 Trondheim
>> Norway
>> Cell: +47 92 203 205
>>
>> http://www.partikkelaudio.com/
>> http://soundcloud.com/brandtsegg
>> http://flyndresang.no/
>> http://soundcloud.com/t-emp



--

Oeyvind Brandtsegg
Professor of Music Technology
NTNU
7491 Trondheim
Norway
Cell: +47 92 203 205

http://www.partikkelaudio.com/
http://soundcloud.com/brandtsegg
http://flyndresang.no/
http://soundcloud.com/t-emp


Date2016-04-10 20:55
FromOeyvind Brandtsegg
SubjectRe: [Csnd-dev] libwinpthread-1
Hi
I tried modifying line 182 of CMakeLists.txt to
    make_plugin(osc OSC.c -static-libgcc -static)
also tried
    make_plugin(osc OSC.c -static)

But still get the libwinpthread error when running csound, if osc.dll
is present in the plugin dir


2016-04-10 21:02 GMT+02:00 Rory Walsh :
> Here you go Oeyvind. This is my old Opcodes/CMakeLists.txt, I was hoping
> that I wouldn't need it again, but it looks like I might! Note that this
> might not be up to date with the current dev branch, but you can see how I
> statically compile some, if not all of the opcodes.
>
> On 10 April 2016 at 19:58, Michael Gogins  wrote:
>>
>> I think that in the link command you just put -static ahead of the
>> libraries you want to link statically. You can mix this with -dynamic but
>> obviously that is not what we need here.
>>
>> Regards,
>> Mike
>>
>> On Apr 10, 2016 9:44 PM, "Oeyvind Brandtsegg" 
>> wrote:
>>>
>>> Thanks you for looking into it, Mike.
>>> Are you able to find out what flags?
>>>
>>> 2016-04-10 20:23 GMT+02:00 Michael Gogins :
>>> > On Windows with MSYS2/mingw64, ldd shows that OSC.dll does not depend
>>> > on the
>>> > liblo dll, but does depend on winpthread-1.dll.
>>> >
>>> > You could add flags to CMakeLists.txt for the OSC DLL to link
>>> > everything
>>> > statically, starting at about line 178, just for Windows x64 of course.
>>> >
>>> > I think that would work. The pthreads obviously are used inside the
>>> > liblo
>>> > library, but linking OSC.dll statically with winpthreads
>>> > (libpthreadGC2.a)
>>> > should do the trick. I'm not sure what flags to add however.
>>> >
>>> > Best,
>>> >
>>> > Mike
>>> >
>>> >
>>> > On Apr 10, 2016 8:49 PM, "Oeyvind Brandtsegg"
>>> > 
>>> > wrote:
>>> >>
>>> >> If I delete osd.dll from the plugins folder, I do not get the
>>> >> libwinpthread error.
>>> >> Where should I change a setting to try to compile osc.dll statically
>>> >> linked?
>>> >>
>>> >> 2016-04-09 12:52 GMT+02:00 Oeyvind Brandtsegg
>>> >> :
>>> >> > Hi,
>>> >> >
>>> >> > When I build a minimal Csound version (using the build script from
>>> >> > the
>>> >> > repo from Feb 27), it produce an error on startup regarding a
>>> >> > missing
>>> >> > libwinpthread-1.dll. I suspect there might be a dynamic link to this
>>> >> > file somewwhere (introduced some time during the 4-5 weeks or so).
>>> >> >
>>> >> > Is there any specific reason why this was introduced? I thought it
>>> >> > should all be static linking now?
>>> >> > Does it perhaps relate to this:
>>> >> >
>>> >> >
>>> >> > https://listserv.heanet.ie/cgi-bin/wa?A3=ind1602&L=CSOUND-DEV&E=quoted-printable&P=629755&B=--&T=text%2Fplain;%20charset=UTF-8&header=1
>>> >> > ?
>>> >> >
>>> >> >
>>> >> >
>>> >> > --
>>> >> >
>>> >> > Oeyvind Brandtsegg
>>> >> > Professor of Music Technology
>>> >> > NTNU
>>> >> > 7491 Trondheim
>>> >> > Norway
>>> >> > Cell: +47 92 203 205
>>> >> >
>>> >> > http://www.partikkelaudio.com/
>>> >> > http://soundcloud.com/brandtsegg
>>> >> > http://flyndresang.no/
>>> >> > http://soundcloud.com/t-emp
>>> >>
>>> >>
>>> >>
>>> >> --
>>> >>
>>> >> Oeyvind Brandtsegg
>>> >> Professor of Music Technology
>>> >> NTNU
>>> >> 7491 Trondheim
>>> >> Norway
>>> >> Cell: +47 92 203 205
>>> >>
>>> >> http://www.partikkelaudio.com/
>>> >> http://soundcloud.com/brandtsegg
>>> >> http://flyndresang.no/
>>> >> http://soundcloud.com/t-emp
>>>
>>>
>>>
>>> --
>>>
>>> Oeyvind Brandtsegg
>>> Professor of Music Technology
>>> NTNU
>>> 7491 Trondheim
>>> Norway
>>> Cell: +47 92 203 205
>>>
>>> http://www.partikkelaudio.com/
>>> http://soundcloud.com/brandtsegg
>>> http://flyndresang.no/
>>> http://soundcloud.com/t-emp
>
>



-- 

Oeyvind Brandtsegg
Professor of Music Technology
NTNU
7491 Trondheim
Norway
Cell: +47 92 203 205

http://www.partikkelaudio.com/
http://soundcloud.com/brandtsegg
http://flyndresang.no/

Date2016-04-10 22:41
FromRory Walsh
SubjectRe: [Csnd-dev] libwinpthread-1

Sounds like liblo needs to be built statically. I think I've done this too in the past, but not with msys2. I can take a look but I would prefer if this was the default for the msys2 liblo package.

On 10 Apr 2016 9:05 pm, "Oeyvind Brandtsegg" <oyvind.brandtsegg@ntnu.no> wrote:
Hi
I tried modifying line 182 of CMakeLists.txt to
    make_plugin(osc OSC.c -static-libgcc -static)
also tried
    make_plugin(osc OSC.c -static)

But still get the libwinpthread error when running csound, if osc.dll
is present in the plugin dir


2016-04-10 21:02 GMT+02:00 Rory Walsh <rorywalsh@ear.ie>:
> Here you go Oeyvind. This is my old Opcodes/CMakeLists.txt, I was hoping
> that I wouldn't need it again, but it looks like I might! Note that this
> might not be up to date with the current dev branch, but you can see how I
> statically compile some, if not all of the opcodes.
>
> On 10 April 2016 at 19:58, Michael Gogins <michael.gogins@gmail.com> wrote:
>>
>> I think that in the link command you just put -static ahead of the
>> libraries you want to link statically. You can mix this with -dynamic but
>> obviously that is not what we need here.
>>
>> Regards,
>> Mike
>>
>> On Apr 10, 2016 9:44 PM, "Oeyvind Brandtsegg" <oyvind.brandtsegg@ntnu.no>
>> wrote:
>>>
>>> Thanks you for looking into it, Mike.
>>> Are you able to find out what flags?
>>>
>>> 2016-04-10 20:23 GMT+02:00 Michael Gogins <michael.gogins@gmail.com>:
>>> > On Windows with MSYS2/mingw64, ldd shows that OSC.dll does not depend
>>> > on the
>>> > liblo dll, but does depend on winpthread-1.dll.
>>> >
>>> > You could add flags to CMakeLists.txt for the OSC DLL to link
>>> > everything
>>> > statically, starting at about line 178, just for Windows x64 of course.
>>> >
>>> > I think that would work. The pthreads obviously are used inside the
>>> > liblo
>>> > library, but linking OSC.dll statically with winpthreads
>>> > (libpthreadGC2.a)
>>> > should do the trick. I'm not sure what flags to add however.
>>> >
>>> > Best,
>>> >
>>> > Mike
>>> >
>>> >
>>> > On Apr 10, 2016 8:49 PM, "Oeyvind Brandtsegg"
>>> > <oyvind.brandtsegg@ntnu.no>
>>> > wrote:
>>> >>
>>> >> If I delete osd.dll from the plugins folder, I do not get the
>>> >> libwinpthread error.
>>> >> Where should I change a setting to try to compile osc.dll statically
>>> >> linked?
>>> >>
>>> >> 2016-04-09 12:52 GMT+02:00 Oeyvind Brandtsegg
>>> >> <oyvind.brandtsegg@ntnu.no>:
>>> >> > Hi,
>>> >> >
>>> >> > When I build a minimal Csound version (using the build script from
>>> >> > the
>>> >> > repo from Feb 27), it produce an error on startup regarding a
>>> >> > missing
>>> >> > libwinpthread-1.dll. I suspect there might be a dynamic link to this
>>> >> > file somewwhere (introduced some time during the 4-5 weeks or so).
>>> >> >
>>> >> > Is there any specific reason why this was introduced? I thought it
>>> >> > should all be static linking now?
>>> >> > Does it perhaps relate to this:
>>> >> >
>>> >> >
>>> >> > https://listserv.heanet.ie/cgi-bin/wa?A3=ind1602&L=CSOUND-DEV&E=quoted-printable&P=629755&B=--&T=text%2Fplain;%20charset=UTF-8&header=1
>>> >> > ?
>>> >> >
>>> >> >
>>> >> >
>>> >> > --
>>> >> >
>>> >> > Oeyvind Brandtsegg
>>> >> > Professor of Music Technology
>>> >> > NTNU
>>> >> > 7491 Trondheim
>>> >> > Norway
>>> >> > Cell: +47 92 203 205
>>> >> >
>>> >> > http://www.partikkelaudio.com/
>>> >> > http://soundcloud.com/brandtsegg
>>> >> > http://flyndresang.no/
>>> >> > http://soundcloud.com/t-emp
>>> >>
>>> >>
>>> >>
>>> >> --
>>> >>
>>> >> Oeyvind Brandtsegg
>>> >> Professor of Music Technology
>>> >> NTNU
>>> >> 7491 Trondheim
>>> >> Norway
>>> >> Cell: +47 92 203 205
>>> >>
>>> >> http://www.partikkelaudio.com/
>>> >> http://soundcloud.com/brandtsegg
>>> >> http://flyndresang.no/
>>> >> http://soundcloud.com/t-emp
>>>
>>>
>>>
>>> --
>>>
>>> Oeyvind Brandtsegg
>>> Professor of Music Technology
>>> NTNU
>>> 7491 Trondheim
>>> Norway
>>> Cell: +47 92 203 205
>>>
>>> http://www.partikkelaudio.com/
>>> http://soundcloud.com/brandtsegg
>>> http://flyndresang.no/
>>> http://soundcloud.com/t-emp
>
>



--

Oeyvind Brandtsegg
Professor of Music Technology
NTNU
7491 Trondheim
Norway
Cell: +47 92 203 205

http://www.partikkelaudio.com/
http://soundcloud.com/brandtsegg
http://flyndresang.no/
http://soundcloud.com/t-emp

Date2016-04-10 23:04
FromOeyvind Brandtsegg
SubjectRe: [Csnd-dev] libwinpthread-1
aha, that makes sense.
I just used the PKGBUILD in csound/mingw64/packages/liblo.
I had built it earlier, but had to do it again now as I cleaned out
the whole local copy of the repo to make sure I had a fresh build.
Perhaps the packages had been updated (the package in our repo, or the
liblo source?) That might explain why this behaves differently here
now than it did a month ago.

2016-04-10 23:41 GMT+02:00 Rory Walsh :
> Sounds like liblo needs to be built statically. I think I've done this too
> in the past, but not with msys2. I can take a look but I would prefer if
> this was the default for the msys2 liblo package.
>
> On 10 Apr 2016 9:05 pm, "Oeyvind Brandtsegg" 
> wrote:
>>
>> Hi
>> I tried modifying line 182 of CMakeLists.txt to
>>     make_plugin(osc OSC.c -static-libgcc -static)
>> also tried
>>     make_plugin(osc OSC.c -static)
>>
>> But still get the libwinpthread error when running csound, if osc.dll
>> is present in the plugin dir
>>
>>
>> 2016-04-10 21:02 GMT+02:00 Rory Walsh :
>> > Here you go Oeyvind. This is my old Opcodes/CMakeLists.txt, I was hoping
>> > that I wouldn't need it again, but it looks like I might! Note that this
>> > might not be up to date with the current dev branch, but you can see how
>> > I
>> > statically compile some, if not all of the opcodes.
>> >
>> > On 10 April 2016 at 19:58, Michael Gogins 
>> > wrote:
>> >>
>> >> I think that in the link command you just put -static ahead of the
>> >> libraries you want to link statically. You can mix this with -dynamic
>> >> but
>> >> obviously that is not what we need here.
>> >>
>> >> Regards,
>> >> Mike
>> >>
>> >> On Apr 10, 2016 9:44 PM, "Oeyvind Brandtsegg"
>> >> 
>> >> wrote:
>> >>>
>> >>> Thanks you for looking into it, Mike.
>> >>> Are you able to find out what flags?
>> >>>
>> >>> 2016-04-10 20:23 GMT+02:00 Michael Gogins :
>> >>> > On Windows with MSYS2/mingw64, ldd shows that OSC.dll does not
>> >>> > depend
>> >>> > on the
>> >>> > liblo dll, but does depend on winpthread-1.dll.
>> >>> >
>> >>> > You could add flags to CMakeLists.txt for the OSC DLL to link
>> >>> > everything
>> >>> > statically, starting at about line 178, just for Windows x64 of
>> >>> > course.
>> >>> >
>> >>> > I think that would work. The pthreads obviously are used inside the
>> >>> > liblo
>> >>> > library, but linking OSC.dll statically with winpthreads
>> >>> > (libpthreadGC2.a)
>> >>> > should do the trick. I'm not sure what flags to add however.
>> >>> >
>> >>> > Best,
>> >>> >
>> >>> > Mike
>> >>> >
>> >>> >
>> >>> > On Apr 10, 2016 8:49 PM, "Oeyvind Brandtsegg"
>> >>> > 
>> >>> > wrote:
>> >>> >>
>> >>> >> If I delete osd.dll from the plugins folder, I do not get the
>> >>> >> libwinpthread error.
>> >>> >> Where should I change a setting to try to compile osc.dll
>> >>> >> statically
>> >>> >> linked?
>> >>> >>
>> >>> >> 2016-04-09 12:52 GMT+02:00 Oeyvind Brandtsegg
>> >>> >> :
>> >>> >> > Hi,
>> >>> >> >
>> >>> >> > When I build a minimal Csound version (using the build script
>> >>> >> > from
>> >>> >> > the
>> >>> >> > repo from Feb 27), it produce an error on startup regarding a
>> >>> >> > missing
>> >>> >> > libwinpthread-1.dll. I suspect there might be a dynamic link to
>> >>> >> > this
>> >>> >> > file somewwhere (introduced some time during the 4-5 weeks or
>> >>> >> > so).
>> >>> >> >
>> >>> >> > Is there any specific reason why this was introduced? I thought
>> >>> >> > it
>> >>> >> > should all be static linking now?
>> >>> >> > Does it perhaps relate to this:
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> >>> >> > https://listserv.heanet.ie/cgi-bin/wa?A3=ind1602&L=CSOUND-DEV&E=quoted-printable&P=629755&B=--&T=text%2Fplain;%20charset=UTF-8&header=1
>> >>> >> > ?
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> >>> >> > --
>> >>> >> >
>> >>> >> > Oeyvind Brandtsegg
>> >>> >> > Professor of Music Technology
>> >>> >> > NTNU
>> >>> >> > 7491 Trondheim
>> >>> >> > Norway
>> >>> >> > Cell: +47 92 203 205
>> >>> >> >
>> >>> >> > http://www.partikkelaudio.com/
>> >>> >> > http://soundcloud.com/brandtsegg
>> >>> >> > http://flyndresang.no/
>> >>> >> > http://soundcloud.com/t-emp
>> >>> >>
>> >>> >>
>> >>> >>
>> >>> >> --
>> >>> >>
>> >>> >> Oeyvind Brandtsegg
>> >>> >> Professor of Music Technology
>> >>> >> NTNU
>> >>> >> 7491 Trondheim
>> >>> >> Norway
>> >>> >> Cell: +47 92 203 205
>> >>> >>
>> >>> >> http://www.partikkelaudio.com/
>> >>> >> http://soundcloud.com/brandtsegg
>> >>> >> http://flyndresang.no/
>> >>> >> http://soundcloud.com/t-emp
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>>
>> >>> Oeyvind Brandtsegg
>> >>> Professor of Music Technology
>> >>> NTNU
>> >>> 7491 Trondheim
>> >>> Norway
>> >>> Cell: +47 92 203 205
>> >>>
>> >>> http://www.partikkelaudio.com/
>> >>> http://soundcloud.com/brandtsegg
>> >>> http://flyndresang.no/
>> >>> http://soundcloud.com/t-emp
>> >
>> >
>>
>>
>>
>> --
>>
>> Oeyvind Brandtsegg
>> Professor of Music Technology
>> NTNU
>> 7491 Trondheim
>> Norway
>> Cell: +47 92 203 205
>>
>> http://www.partikkelaudio.com/
>> http://soundcloud.com/brandtsegg
>> http://flyndresang.no/
>> http://soundcloud.com/t-emp



-- 

Oeyvind Brandtsegg
Professor of Music Technology
NTNU
7491 Trondheim
Norway
Cell: +47 92 203 205

http://www.partikkelaudio.com/
http://soundcloud.com/brandtsegg
http://flyndresang.no/

Date2016-04-10 23:16
FromRory Walsh
SubjectRe: [Csnd-dev] libwinpthread-1

Interesting, I don't get that error here and I'm still using the package Steven provided me. But I will need to double check as I do have libpthread somewhere in my path. I can check tomorrow.

On 10 Apr 2016 11:14 pm, "Oeyvind Brandtsegg" <oyvind.brandtsegg@ntnu.no> wrote:
aha, that makes sense.
I just used the PKGBUILD in csound/mingw64/packages/liblo.
I had built it earlier, but had to do it again now as I cleaned out
the whole local copy of the repo to make sure I had a fresh build.
Perhaps the packages had been updated (the package in our repo, or the
liblo source?) That might explain why this behaves differently here
now than it did a month ago.

2016-04-10 23:41 GMT+02:00 Rory Walsh <rorywalsh@ear.ie>:
> Sounds like liblo needs to be built statically. I think I've done this too
> in the past, but not with msys2. I can take a look but I would prefer if
> this was the default for the msys2 liblo package.
>
> On 10 Apr 2016 9:05 pm, "Oeyvind Brandtsegg" <oyvind.brandtsegg@ntnu.no>
> wrote:
>>
>> Hi
>> I tried modifying line 182 of CMakeLists.txt to
>>     make_plugin(osc OSC.c -static-libgcc -static)
>> also tried
>>     make_plugin(osc OSC.c -static)
>>
>> But still get the libwinpthread error when running csound, if osc.dll
>> is present in the plugin dir
>>
>>
>> 2016-04-10 21:02 GMT+02:00 Rory Walsh <rorywalsh@ear.ie>:
>> > Here you go Oeyvind. This is my old Opcodes/CMakeLists.txt, I was hoping
>> > that I wouldn't need it again, but it looks like I might! Note that this
>> > might not be up to date with the current dev branch, but you can see how
>> > I
>> > statically compile some, if not all of the opcodes.
>> >
>> > On 10 April 2016 at 19:58, Michael Gogins <michael.gogins@gmail.com>
>> > wrote:
>> >>
>> >> I think that in the link command you just put -static ahead of the
>> >> libraries you want to link statically. You can mix this with -dynamic
>> >> but
>> >> obviously that is not what we need here.
>> >>
>> >> Regards,
>> >> Mike
>> >>
>> >> On Apr 10, 2016 9:44 PM, "Oeyvind Brandtsegg"
>> >> <oyvind.brandtsegg@ntnu.no>
>> >> wrote:
>> >>>
>> >>> Thanks you for looking into it, Mike.
>> >>> Are you able to find out what flags?
>> >>>
>> >>> 2016-04-10 20:23 GMT+02:00 Michael Gogins <michael.gogins@gmail.com>:
>> >>> > On Windows with MSYS2/mingw64, ldd shows that OSC.dll does not
>> >>> > depend
>> >>> > on the
>> >>> > liblo dll, but does depend on winpthread-1.dll.
>> >>> >
>> >>> > You could add flags to CMakeLists.txt for the OSC DLL to link
>> >>> > everything
>> >>> > statically, starting at about line 178, just for Windows x64 of
>> >>> > course.
>> >>> >
>> >>> > I think that would work. The pthreads obviously are used inside the
>> >>> > liblo
>> >>> > library, but linking OSC.dll statically with winpthreads
>> >>> > (libpthreadGC2.a)
>> >>> > should do the trick. I'm not sure what flags to add however.
>> >>> >
>> >>> > Best,
>> >>> >
>> >>> > Mike
>> >>> >
>> >>> >
>> >>> > On Apr 10, 2016 8:49 PM, "Oeyvind Brandtsegg"
>> >>> > <oyvind.brandtsegg@ntnu.no>
>> >>> > wrote:
>> >>> >>
>> >>> >> If I delete osd.dll from the plugins folder, I do not get the
>> >>> >> libwinpthread error.
>> >>> >> Where should I change a setting to try to compile osc.dll
>> >>> >> statically
>> >>> >> linked?
>> >>> >>
>> >>> >> 2016-04-09 12:52 GMT+02:00 Oeyvind Brandtsegg
>> >>> >> <oyvind.brandtsegg@ntnu.no>:
>> >>> >> > Hi,
>> >>> >> >
>> >>> >> > When I build a minimal Csound version (using the build script
>> >>> >> > from
>> >>> >> > the
>> >>> >> > repo from Feb 27), it produce an error on startup regarding a
>> >>> >> > missing
>> >>> >> > libwinpthread-1.dll. I suspect there might be a dynamic link to
>> >>> >> > this
>> >>> >> > file somewwhere (introduced some time during the 4-5 weeks or
>> >>> >> > so).
>> >>> >> >
>> >>> >> > Is there any specific reason why this was introduced? I thought
>> >>> >> > it
>> >>> >> > should all be static linking now?
>> >>> >> > Does it perhaps relate to this:
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> >>> >> > https://listserv.heanet.ie/cgi-bin/wa?A3=ind1602&L=CSOUND-DEV&E=quoted-printable&P=629755&B=--&T=text%2Fplain;%20charset=UTF-8&header=1
>> >>> >> > ?
>> >>> >> >
>> >>> >> >
>> >>> >> >
>> >>> >> > --
>> >>> >> >
>> >>> >> > Oeyvind Brandtsegg
>> >>> >> > Professor of Music Technology
>> >>> >> > NTNU
>> >>> >> > 7491 Trondheim
>> >>> >> > Norway
>> >>> >> > Cell: +47 92 203 205
>> >>> >> >
>> >>> >> > http://www.partikkelaudio.com/
>> >>> >> > http://soundcloud.com/brandtsegg
>> >>> >> > http://flyndresang.no/
>> >>> >> > http://soundcloud.com/t-emp
>> >>> >>
>> >>> >>
>> >>> >>
>> >>> >> --
>> >>> >>
>> >>> >> Oeyvind Brandtsegg
>> >>> >> Professor of Music Technology
>> >>> >> NTNU
>> >>> >> 7491 Trondheim
>> >>> >> Norway
>> >>> >> Cell: +47 92 203 205
>> >>> >>
>> >>> >> http://www.partikkelaudio.com/
>> >>> >> http://soundcloud.com/brandtsegg
>> >>> >> http://flyndresang.no/
>> >>> >> http://soundcloud.com/t-emp
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>>
>> >>> Oeyvind Brandtsegg
>> >>> Professor of Music Technology
>> >>> NTNU
>> >>> 7491 Trondheim
>> >>> Norway
>> >>> Cell: +47 92 203 205
>> >>>
>> >>> http://www.partikkelaudio.com/
>> >>> http://soundcloud.com/brandtsegg
>> >>> http://flyndresang.no/
>> >>> http://soundcloud.com/t-emp
>> >
>> >
>>
>>
>>
>> --
>>
>> Oeyvind Brandtsegg
>> Professor of Music Technology
>> NTNU
>> 7491 Trondheim
>> Norway
>> Cell: +47 92 203 205
>>
>> http://www.partikkelaudio.com/
>> http://soundcloud.com/brandtsegg
>> http://flyndresang.no/
>> http://soundcloud.com/t-emp



--

Oeyvind Brandtsegg
Professor of Music Technology
NTNU
7491 Trondheim
Norway
Cell: +47 92 203 205

http://www.partikkelaudio.com/
http://soundcloud.com/brandtsegg
http://flyndresang.no/
http://soundcloud.com/t-emp