Csound Csound-dev Csound-tekno Search About

[Csnd-dev] liblo problem

Date2023-06-03 17:30
FromJohn
Subject[Csnd-dev] liblo problem
I am trying to rejoin the development team but am having loads of
problems.

Latest is with liblo.   I have sources of 2019-02-28: Release 0.31
and it builds/installs apparently with no problem. But when I try to
build Csound I get

Consolidate compiler generated dependencies of target osc
[ 63%] Building C object Opcodes/CMakeFiles/osc.dir/OSC.c.o
/home/jpff/cs7/Opcodes/OSC.c: In function ‘OSC_handler’:
/home/jpff/cs7/Opcodes/OSC.c:551:31: error: passing argument 1 of ‘lo_blobsize’ from incompatible pointer type [-Werror=incompatible-pointer-types]
                   lo_blobsize((lo_blob*)argv[i]);
                               ^
In file included from /usr/local/include/lo/lo.h:32:0,
                 from /home/jpff/cs7/Opcodes/OSC.c:34:
/usr/local/include/lo/lo_lowlevel.h:1065:10: note: expected ‘lo_blob {aka struct lo_blob_ *}’ but argument is of type ‘struct lo_blob_ **’
 uint32_t lo_blobsize(lo_blob b);
          ^~~~~~~~~~~
/home/jpff/cs7/Opcodes/OSC.c: In function ‘OSC_list_init’:
/home/jpff/cs7/Opcodes/OSC.c:790:47: error: passing argument 4 of ‘lo_server_thread_add_method’ from incompatible pointer type [-Werror=incompatible-pointer-types]
                                               OSC_handler, p->port);
                                               ^~~~~~~~~~~
In file included from /usr/local/include/lo/lo.h:33:0,
                 from /home/jpff/cs7/Opcodes/OSC.c:34:
/usr/local/include/lo/lo_serverthread.h:150:11: note: expected ‘lo_method_handler {aka int (*)(const char *, const char *, union  **, int,  struct lo_message_ *, void *)}’ but argument is of type ‘int32_t (*)(const char *, const char *, lo_arg **, int32_t,  void *, void *) {aka int (*)(const char *, const char *, union  **, int,  void *, void *)}’
 lo_method lo_server_thread_add_method(lo_server_thread st, const char *path,
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/jpff/cs7/Opcodes/OSC.c: In function ‘OSC_alist_init’:
/home/jpff/cs7/Opcodes/OSC.c:1070:47: error: passing argument 4 of ‘lo_server_thread_add_method’ from incompatible pointer type [-Werror=incompatible-pointer-types]
                                               OSC_ahandler, p->port);
                                               ^~~~~~~~~~~~
In file included from /usr/local/include/lo/lo.h:33:0,
                 from /home/jpff/cs7/Opcodes/OSC.c:34:
/usr/local/include/lo/lo_serverthread.h:150:11: note: expected ‘lo_method_handler {aka int (*)(const char *, const char *, union  **, int,  struct lo_message_ *, void *)}’ but argument is of type ‘int32_t (*)(const char *, const char *, lo_arg **, int32_t,  void *, void *) {aka int (*)(const char *, const char *, union  **, int,  void *, void *)}’
 lo_method lo_server_thread_add_method(lo_server_thread st, const char *path,
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [Opcodes/CMakeFiles/osc.dir/build.make:76: Opcodes/CMakeFiles/osc.dir/OSC.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:602: Opcodes/CMakeFiles/osc.dir/all] Error 2
make: *** [Makefile:166: all] Error 2


Looks like a version change?  Any ep welcome.  I am
missing the buzz from coding

==John ffitch

Date2023-06-03 17:57
FromSteven Yi
SubjectRe: [Csnd-dev] liblo problem
Odd, I just tried a build on both latest from csound6 and develop branches and did not have problems with liblo. I'm on macOS and have liblo 0.31 installed from homebrew:

==> liblo: stable 0.31 (bottled), HEAD

Lightweight Open Sound Control implementation

https://liblo.sourceforge.io/

/opt/homebrew/Cellar/liblo/0.31 (24 files, 512.3KB) *

  Poured from bottle on 2021-05-09 at 22:24:17

From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/liblo.rb

I'll fire up the Linux computer to see what happens there. 


On Sat, Jun 3, 2023 at 12:31 PM John <jpff@codemist.co.uk> wrote:
I am trying to rejoin the development team but am having loads of
problems.

Latest is with liblo.   I have sources of 2019-02-28: Release 0.31
and it builds/installs apparently with no problem. But when I try to
build Csound I get

Consolidate compiler generated dependencies of target osc
[ 63%] Building C object Opcodes/CMakeFiles/osc.dir/OSC.c.o
/home/jpff/cs7/Opcodes/OSC.c: In function ‘OSC_handler’:
/home/jpff/cs7/Opcodes/OSC.c:551:31: error: passing argument 1 of ‘lo_blobsize’ from incompatible pointer type [-Werror=incompatible-pointer-types]
                   lo_blobsize((lo_blob*)argv[i]);
                               ^
In file included from /usr/local/include/lo/lo.h:32:0,
                 from /home/jpff/cs7/Opcodes/OSC.c:34:
/usr/local/include/lo/lo_lowlevel.h:1065:10: note: expected ‘lo_blob {aka struct lo_blob_ *}’ but argument is of type ‘struct lo_blob_ **’
 uint32_t lo_blobsize(lo_blob b);
          ^~~~~~~~~~~
/home/jpff/cs7/Opcodes/OSC.c: In function ‘OSC_list_init’:
/home/jpff/cs7/Opcodes/OSC.c:790:47: error: passing argument 4 of ‘lo_server_thread_add_method’ from incompatible pointer type [-Werror=incompatible-pointer-types]
                                               OSC_handler, p->port);
                                               ^~~~~~~~~~~
In file included from /usr/local/include/lo/lo.h:33:0,
                 from /home/jpff/cs7/Opcodes/OSC.c:34:
/usr/local/include/lo/lo_serverthread.h:150:11: note: expected ‘lo_method_handler {aka int (*)(const char *, const char *, union <anonymous> **, int,  struct lo_message_ *, void *)}’ but argument is of type ‘int32_t (*)(const char *, const char *, lo_arg **, int32_t,  void *, void *) {aka int (*)(const char *, const char *, union <anonymous> **, int,  void *, void *)}’
 lo_method lo_server_thread_add_method(lo_server_thread st, const char *path,
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/jpff/cs7/Opcodes/OSC.c: In function ‘OSC_alist_init’:
/home/jpff/cs7/Opcodes/OSC.c:1070:47: error: passing argument 4 of ‘lo_server_thread_add_method’ from incompatible pointer type [-Werror=incompatible-pointer-types]
                                               OSC_ahandler, p->port);
                                               ^~~~~~~~~~~~
In file included from /usr/local/include/lo/lo.h:33:0,
                 from /home/jpff/cs7/Opcodes/OSC.c:34:
/usr/local/include/lo/lo_serverthread.h:150:11: note: expected ‘lo_method_handler {aka int (*)(const char *, const char *, union <anonymous> **, int,  struct lo_message_ *, void *)}’ but argument is of type ‘int32_t (*)(const char *, const char *, lo_arg **, int32_t,  void *, void *) {aka int (*)(const char *, const char *, union <anonymous> **, int,  void *, void *)}’
 lo_method lo_server_thread_add_method(lo_server_thread st, const char *path,
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [Opcodes/CMakeFiles/osc.dir/build.make:76: Opcodes/CMakeFiles/osc.dir/OSC.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:602: Opcodes/CMakeFiles/osc.dir/all] Error 2
make: *** [Makefile:166: all] Error 2


Looks like a version change?  Any ep welcome.  I am
missing the buzz from coding

==John ffitch

Date2023-06-03 18:09
FromVictor Lazzarini
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] liblo problem
I have liblo 0.29 here, and it works. I think some lo types may have changed in 0.31
and your compiler is barfing at that. I made some changes that should help:

1) First error: 
I checked the header lo/lo_lowlevel.h and I have

uint32_t lo_blobsize(lo_blob b);

so I suppose the correct cast should be (lo_blob) not (lo_blob *)

I think the change may be in the type, in my lo/lo_types.h  I have

def void *lo_blob;

but your error says it’s struct lo_blob_ *

I changed this and it’s ok here still 

2) Second error:

I think if we change the signature of OSC_handler to

static int32_t OSC_handler(const char *path, const char *types,
                       lo_arg **argv, int32_t argc, lo_msg data, void *p)

that could fix it.  I changed it here and it’s ok.

I have committed these changes to the develop branch. Pull it and see if it works now.
========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 3 Jun 2023, at 17:30, John  wrote:
> 
> *Warning*
> 
> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
> 
> I am trying to rejoin the development team but am having loads of
> problems.
> 
> Latest is with liblo.   I have sources of 2019-02-28: Release 0.31
> and it builds/installs apparently with no problem. But when I try to
> build Csound I get
> 
> Consolidate compiler generated dependencies of target osc
> [ 63%] Building C object Opcodes/CMakeFiles/osc.dir/OSC.c.o
> /home/jpff/cs7/Opcodes/OSC.c: In function ‘OSC_handler’:
> /home/jpff/cs7/Opcodes/OSC.c:551:31: error: passing argument 1 of ‘lo_blobsize’ from incompatible pointer type [-Werror=incompatible-pointer-types]
>                   lo_blobsize((lo_blob*)argv[i]);
>                               ^
> In file included from /usr/local/include/lo/lo.h:32:0,
>                 from /home/jpff/cs7/Opcodes/OSC.c:34:
> /usr/local/include/lo/lo_lowlevel.h:1065:10: note: expected ‘lo_blob {aka struct lo_blob_ *}’ but argument is of type ‘struct lo_blob_ **’
> uint32_t lo_blobsize(lo_blob b);
>          ^~~~~~~~~~~
> /home/jpff/cs7/Opcodes/OSC.c: In function ‘OSC_list_init’:
> /home/jpff/cs7/Opcodes/OSC.c:790:47: error: passing argument 4 of ‘lo_server_thread_add_method’ from incompatible pointer type [-Werror=incompatible-pointer-types]
>                                               OSC_handler, p->port);
>                                               ^~~~~~~~~~~
> In file included from /usr/local/include/lo/lo.h:33:0,
>                 from /home/jpff/cs7/Opcodes/OSC.c:34:
> /usr/local/include/lo/lo_serverthread.h:150:11: note: expected ‘lo_method_handler {aka int (*)(const char *, const char *, union  **, int,  struct lo_message_ *, void *)}’ but argument is of type ‘int32_t (*)(const char *, const char *, lo_arg **, int32_t,  void *, void *) {aka int (*)(const char *, const char *, union  **, int,  void *, void *)}’
> lo_method lo_server_thread_add_method(lo_server_thread st, const char *path,
>           ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> /home/jpff/cs7/Opcodes/OSC.c: In function ‘OSC_alist_init’:
> /home/jpff/cs7/Opcodes/OSC.c:1070:47: error: passing argument 4 of ‘lo_server_thread_add_method’ from incompatible pointer type [-Werror=incompatible-pointer-types]
>                                               OSC_ahandler, p->port);
>                                               ^~~~~~~~~~~~
> In file included from /usr/local/include/lo/lo.h:33:0,
>                 from /home/jpff/cs7/Opcodes/OSC.c:34:
> /usr/local/include/lo/lo_serverthread.h:150:11: note: expected ‘lo_method_handler {aka int (*)(const char *, const char *, union  **, int,  struct lo_message_ *, void *)}’ but argument is of type ‘int32_t (*)(const char *, const char *, lo_arg **, int32_t,  void *, void *) {aka int (*)(const char *, const char *, union  **, int,  void *, void *)}’
> lo_method lo_server_thread_add_method(lo_server_thread st, const char *path,
>           ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
> make[2]: *** [Opcodes/CMakeFiles/osc.dir/build.make:76: Opcodes/CMakeFiles/osc.dir/OSC.c.o] Error 1
> make[1]: *** [CMakeFiles/Makefile2:602: Opcodes/CMakeFiles/osc.dir/all] Error 2
> make: *** [Makefile:166: all] Error 2
> 
> 
> Looks like a version change?  Any ep welcome.  I am
> missing the buzz from coding
> 
> ==John ffitch


Date2023-06-03 18:42
Fromjohn
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] liblo problem
Still fails to uild.
peraps #i soukd look for  0.29

Date2023-06-03 19:25
FromVictor Lazzarini
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] liblo problem
Can you post the errors after the pull?

Prof. Victor Lazzarini
Maynooth University
Ireland

> On 3 Jun 2023, at 18:42, john  wrote:
> 
> Still fails to uild.
> peraps #i soukd look for  0.29

Date2023-06-03 20:55
FromVictor Lazzarini
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] liblo problem
I have built and installed the latest here and Csound builds correctly, so I am thinking the version does not matter
========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 3 Jun 2023, at 19:25, Victor Lazzarini  wrote:
> 
> Can you post the errors after the pull?
> 
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
> 
>> On 3 Jun 2023, at 18:42, john  wrote:
>> 
>> Still fails to uild.
>> peraps #i soukd look for  0.29


Date2023-06-03 21:04
FromVictor Lazzarini
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] liblo problem
I’ve noted something odd though. Your error message says

/usr/local/include/lo/lo_lowlevel.h:1065:10: note: expected ‘lo_blob {aka struct lo_blob_ *}’ but argument is of type ‘struct lo_blob_ **’
uint32_t lo_blobsize(lo_blob b);

But in my 0.31 installation that line does not have "uint32_t lo_blobsize(lo_blob b);”. I can’t reconcile your error message with the
0.31 sources.

I am wondering if you have two versions of liblo in your system?

I see the headers you are using are in /usr/local/include/

In my installation, they are /usr/local/lib/include.
========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 3 Jun 2023, at 20:55, Victor Lazzarini  wrote:
> 
> I have built and installed the latest here and Csound builds correctly, so I am thinking the version does not matter
> ========================
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
> 
>> On 3 Jun 2023, at 19:25, Victor Lazzarini  wrote:
>> 
>> Can you post the errors after the pull?
>> 
>> Prof. Victor Lazzarini
>> Maynooth University
>> Ireland
>> 
>>> On 3 Jun 2023, at 18:42, john  wrote:
>>> 
>>> Still fails to uild.
>>> peraps #i soukd look for  0.29
> 


Date2023-06-03 21:34
FromJohn ff
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] liblo problem
I typed too soon.  The liblo part seems to work now.  To be replaced by parsing errors in booleans.  These were working earlier so not sure what is wrong. Probably time to give up for the night. 

⁣​

On 3 Jun 2023, 19:26, at 19:26, Victor Lazzarini  wrote:
>Can you post the errors after the pull?
>
>Prof. Victor Lazzarini
>Maynooth University
>Ireland
>
>> On 3 Jun 2023, at 18:42, john  wrote:
>> 
>> Still fails to uild.
>> peraps #i soukd look for  0.29