Pokeys_homecomp EncoderSearch / Encoder Arm Topic: Pos_Fb Following errors

More
3 years 11 months ago #257436 by rodw
Replied by rodw on topic Pokeys
If you review the errors, it is failing during the build process.
I have the same issue.

Please Log in or Create an account to join the conversation.

More
3 years 11 months ago #257438 by zarfld
Replied by zarfld on topic Pokeys

If you review the errors, it is failing during the build process.
I have the same issue. 
 
you get these build errors even if you use the update instructions (page 10)?

i did not have problems so far - but there might be some changes (pokeyslib, linux,...) since i did my last build on that component.


 

PoKeysLibDevicePoKeys57Industrial.c: In function ‘PK57i_SearchDevice’:
PoKeysLibDevicePoKeys57Industrial.c:221:12: warning: implicit declaration of function ‘GetBroadcastAddresses’ ...
 

so it seems that pokeyslib commit "Merge of updated PoKeysLib to public repository"(2022-06-23) includes a change for PoKeysLibDevicePoKeys57Industrial.c, which might cause that problem.

Please Log in or Create an account to join the conversation.

More
3 years 11 months ago #257439 by rodw
Replied by rodw on topic Pokeys
Thats just a warning. The error which prevents compilation is
Code:
PoKeysLibDevicePoKeys57Industrial.c:233:51: error: ‘SOCKADDR’ undeclared (first use in this function); did you mean ‘SOCK_RDM’?          if (sendto(txSocket, SendBuf, BufLen, 0, (SOCKADDR *)&remoteEP, sizeof(remoteEP)) == -1)                                                    ^~~~~~~~                                                    SOCK_RDM

Please Log in or Create an account to join the conversation.

More
3 years 11 months ago #257440 by zarfld
Replied by zarfld on topic Pokeys
i see, anyway it is the same file, that has been added at that comit.

as soon as i'm at home i can check if on my system the file already exists.

I'm not sure if, a workaround might be to exclude it in makefiles.

what i found in actual files in bitbucket SOCKADDR is defined in PoKeysLibCoreSockets.c

#if defined(__FreeBSD__) || defined(BSD) || defined(__APPLE__) || defined(__linux__)
#define USE_GETIFADDRS 1
#define SOCKADDR struct sockaddr

#include <ifaddrs.h>

uint32 SockAddrToUint32(struct sockaddr * a)
{
return ((a)&&(a->sa_family == AF_INET)) ? ntohl(((struct sockaddr_in *)a)->sin_addr.s_addr) : 0;
}
#endif


which compilation seemed ok according to logfile

ozisthebest@debian:~/mbosnak-pokeyslib-7a079bad8dbe$ sudo make -f Makefile.noqmake install
[sudo] password for ozisthebest:
gcc -fPIC -c -o PoKeysLibCore.o PoKeysLibCore.c
gcc -fPIC -c -o PoKeysLibCoreSockets.o PoKeysLibCoreSockets.c
...


so i assume that the condition "#if defined(__FreeBSD__) || defined(BSD) || defined(__APPLE__) || defined(__linux__)" did not match due to some reason.

.. unfortunately i currently have insufficiant knowledge to dig deeper in that issue. (i would have asumed that at least "defined(__linux__)" should be true)

to fix it i think we should report that problem at bitbucket.org/mbosnak/pokeyslib/src/master/

Please Log in or Create an account to join the conversation.

More
3 years 11 months ago #257445 by rodw
Replied by rodw on topic Pokeys
Thanks for that the help. Clearly something is not being set right in the environment for some reason.
I tried a couple of edits to PoKeysLibCore.c but it still failed, 
So I added 
Code:
#define SOCKADDR struct sockaddr
to PoKeysLibDevicePoKeys57Industrial.c after #include "stdio.h" and it worked

Thanks again!
The following user(s) said Thank You: zarfld, ChapEng

Please Log in or Create an account to join the conversation.

More
3 years 11 months ago #257446 by rodw
Replied by rodw on topic Pokeys
Actually thinking about it those #defines should most likely be made in the h file, not the .c file as it won't be included in the other modules

Please Log in or Create an account to join the conversation.

Time to create page: 0.329 seconds
Powered by Kunena Forum