Yona-Appletree / LEDscape

Beagle Bone Black cape and firmware for driving a large number of WS281x LED strips.
126 stars 58 forks source link

Compile of opc-server.c fails on Debian 10.3 on BBB #69

Open pscheie opened 2 years ago

pscheie commented 2 years ago

I've got a Beaglebone Black running Debian 10.3. When I run 'make' to build the opc-server, it's failing thusly:

opc-server.c: In function ‘opc_server_set_error.part.1’: opc-server.c:211:3: error: invalid use of ‘__builtin_va_arg_pack ()’ snprintf( ^~~~~ extra_info_out,

    sizeof(extra_info_out),
extra_info,
~~~~~~~~~~~
__builtin_va_arg_pack()
~~~~~~~~~~~~~~~~~~~~~~~

);

I'm running the stock kernel 4.19.94. GCC is version 8.3.0-6.

There are also a bunch of warnings beforehand. Any suggestions on how to fix this?

DBell33 commented 2 years ago

having the same issue currently, anyone figured out a workaround to this issue?

nargetdev commented 2 years ago

For whatever reason setting the compiler optimization from

-O2 --> -O1

suppresses the error... but you'll still have linker errors in the end.

also.. (while still using -O2) just deleting the line and doing

 char extra_info_out[2048];
 snprintf(
         extra_info_out,
         sizeof(extra_info_out),
         extra_info
 );

allows to compile.. but I'm still getting a segmentation fault..

nargetdev commented 2 years ago

FWIW ThrowingBagels works out of the box.. only caveat is new packet format.

https://github.com/iontank/ThrowingBagels

nargetdev commented 2 years ago

Ok.. so for the segmentation faults check out here:

https://github.com/steely-glint/starway/blob/novparkreno/bbbuildnotes.txt

Specifically the recommendations as follows:

vi opc-server.c
change e131 port to 0 in
+       .e131_port = 0,
And
+       assert_int_range_inclusive("e131 UDP Port", 0, 65535, input_config- 
>e131_port);

make
nargetdev commented 2 years ago

Geocene has a working version in 4.19: https://github.com/Geocene/LEDscape