Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
'struct sockaddr' declared inside parameter list
#1
Hi Insiders,

I've got warnings at the useralgo.ko compilation since I updated my IDE to versions 3 I cannot get ride of. I have been seeing them for several months and they don't prevent my project to run properly, so I didn't pay much attention to them. However, I'd really like to solve the problem and to make these warning disappear. It seems that some ethernet-related headers are missing the <sys/socket.h> library, since the message says "'struct sockaddr' declared inside parameter list".

Do you have any clue of what could be done to solve this problem ?

Here is my compilation output on a new project, compiled with the IDE 3.1.4.0 on an Etherlite in firmware v.2.4.0.180.

------ Build started: Project: PowerPMAC1, Configuration: Debug Any CPU ------
Please wait while mapping PowerPMAC variables.
End of synchronizing the Database.
PowerPMAC variables mapped successfully.
Build process for capp1.out has started.
Build process for capp1.out has ended.

Build process for usralgo.ko has started.
C:\Users\J27CE~1.LAM\Desktop\POWERP~1\POWERP~1\CLANGU~1\REALTI~1\\\usr\local\dtlibs\libopener\cipcommon.h(14,0): warning : in file included from /usr/local/dtlibs/libopener/cipcommon.h
C:\Users\J27CE~1.LAM\Desktop\POWERP~1\POWERP~1\CLANGU~1\REALTI~1\\\usr\local\dtlibs\rtpmac\..\libppmac\ethernetip.h(14,0): warning : in file included from /usr/local/dtlibs/rtpmac/../libppmac/ethernetip.h
C:\Users\J27CE~1.LAM\Desktop\POWERP~1\POWERP~1\CLANGU~1\REALTI~1\\\usr\local\dtlibs\rtpmac\RtGpShm.h(82,0): warning : in file included from /usr/local/dtlibs/rtpmac/RtGpShm.h
C:\Users\J.Lamaury\Desktop\PowerPMAC1\PowerPMAC1\C Language\Realtime Routines\usralgomain.c(41,0): warning : in file included from /cygdrive/c/Users/J27CE~1.LAM/Desktop/POWERP~1/POWERP~1/CLANGU~1/REALTI~1/usralgomain.c
C:\Users\J27CE~1.LAM\Desktop\POWERP~1\POWERP~1\CLANGU~1\REALTI~1\\\usr\local\dtlibs\libopener\ciptypes.h(299,0): warning : 'struct sockaddr' declared inside parameter list
C:\Users\J27CE~1.LAM\Desktop\POWERP~1\POWERP~1\CLANGU~1\REALTI~1\\\usr\local\dtlibs\libopener\ciptypes.h(299,0): warning : its scope is only this definition or declaration, which is probably not what you want
C:\Users\J27CE~1.LAM\Desktop\POWERP~1\POWERP~1\CLANGU~1\REALTI~1\\\usr\local\dtlibs\rtpmac\..\libppmac\ethernetip.h(14,0): warning : in file included from /usr/local/dtlibs/rtpmac/../libppmac/ethernetip.h
C:\Users\J27CE~1.LAM\Desktop\POWERP~1\POWERP~1\CLANGU~1\REALTI~1\\\usr\local\dtlibs\rtpmac\RtGpShm.h(82,0): warning : in file included from /usr/local/dtlibs/rtpmac/RtGpShm.h
C:\Users\J.Lamaury\Desktop\PowerPMAC1\PowerPMAC1\C Language\Realtime Routines\usralgomain.c(41,0): warning : in file included from /cygdrive/c/Users/J27CE~1.LAM/Desktop/POWERP~1/POWERP~1/CLANGU~1/REALTI~1/usralgomain.c
C:\Users\J27CE~1.LAM\Desktop\POWERP~1\POWERP~1\CLANGU~1\REALTI~1\\\usr\local\dtlibs\libopener\cipcommon.h(39,0): warning : 'struct sockaddr' declared inside parameter list
C:\Users\J27CE~1.LAM\Desktop\POWERP~1\POWERP~1\CLANGU~1\REALTI~1\\\usr\local\dtlibs\libopener\cipcommon.h(57,0): warning : 'struct sockaddr' declared inside parameter list
C:\Users\J27CE~1.LAM\Desktop\POWERP~1\POWERP~1\CLANGU~1\REALTI~1\\\usr\local\dtlibs\libopener\cipcommon.h(71,0): warning : 'struct sockaddr' declared inside parameter list
C:\Users\J27CE~1.LAM\Desktop\POWERP~1\POWERP~1\CLANGU~1\REALTI~1\\\usr\local\dtlibs\libopener\cipcommon.h(14,0): warning : in file included from /usr/local/dtlibs/libopener/cipcommon.h
C:\Users\J27CE~1.LAM\Desktop\POWERP~1\POWERP~1\CLANGU~1\REALTI~1\\\usr\local\dtlibs\rtpmac\..\libppmac\ethernetip.h(14,0): warning : in file included from /usr/local/dtlibs/rtpmac/../libppmac/ethernetip.h
C:\Users\J27CE~1.LAM\Desktop\POWERP~1\POWERP~1\CLANGU~1\REALTI~1\\\usr\local\dtlibs\rtpmac\RtGpShm.h(82,0): warning : in file included from /usr/local/dtlibs/rtpmac/RtGpShm.h
C:\Users\J.Lamaury\Desktop\PowerPMAC1\PowerPMAC1\C Language\Realtime Routines\usrcode.h(9,0): warning : in file included from /cygdrive/c/Users/J27CE~1.LAM/Desktop/POWERP~1/POWERP~1/CLANGU~1/REALTI~1/usrcode.h
C:\Users\J.Lamaury\Desktop\PowerPMAC1\PowerPMAC1\C Language\Realtime Routines\usrcode.c(20,0): warning : in file included from /cygdrive/c/Users/J27CE~1.LAM/Desktop/POWERP~1/POWERP~1/CLANGU~1/REALTI~1/usrcode.c
C:\Users\J27CE~1.LAM\Desktop\POWERP~1\POWERP~1\CLANGU~1\REALTI~1\\\usr\local\dtlibs\libopener\ciptypes.h(299,0): warning : 'struct sockaddr' declared inside parameter list
C:\Users\J27CE~1.LAM\Desktop\POWERP~1\POWERP~1\CLANGU~1\REALTI~1\\\usr\local\dtlibs\libopener\ciptypes.h(299,0): warning : its scope is only this definition or declaration, which is probably not what you want
C:\Users\J27CE~1.LAM\Desktop\POWERP~1\POWERP~1\CLANGU~1\REALTI~1\\\usr\local\dtlibs\rtpmac\..\libppmac\ethernetip.h(14,0): warning : in file included from /usr/local/dtlibs/rtpmac/../libppmac/ethernetip.h
C:\Users\J27CE~1.LAM\Desktop\POWERP~1\POWERP~1\CLANGU~1\REALTI~1\\\usr\local\dtlibs\rtpmac\RtGpShm.h(82,0): warning : in file included from /usr/local/dtlibs/rtpmac/RtGpShm.h
C:\Users\J.Lamaury\Desktop\PowerPMAC1\PowerPMAC1\C Language\Realtime Routines\usrcode.h(9,0): warning : in file included from /cygdrive/c/Users/J27CE~1.LAM/Desktop/POWERP~1/POWERP~1/CLANGU~1/REALTI~1/usrcode.h
C:\Users\J.Lamaury\Desktop\PowerPMAC1\PowerPMAC1\C Language\Realtime Routines\usrcode.c(20,0): warning : in file included from /cygdrive/c/Users/J27CE~1.LAM/Desktop/POWERP~1/POWERP~1/CLANGU~1/REALTI~1/usrcode.c
C:\Users\J27CE~1.LAM\Desktop\POWERP~1\POWERP~1\CLANGU~1\REALTI~1\\\usr\local\dtlibs\libopener\cipcommon.h(39,0): warning : 'struct sockaddr' declared inside parameter list
C:\Users\J27CE~1.LAM\Desktop\POWERP~1\POWERP~1\CLANGU~1\REALTI~1\\\usr\local\dtlibs\libopener\cipcommon.h(57,0): warning : 'struct sockaddr' declared inside parameter list
C:\Users\J27CE~1.LAM\Desktop\POWERP~1\POWERP~1\CLANGU~1\REALTI~1\\\usr\local\dtlibs\libopener\cipcommon.h(71,0): warning : 'struct sockaddr' declared inside parameter list
Build process for usralgo.ko has ended.

Build process for usralgo.so has started.
Build process for usralgo.so has ended.

Project Building and Mapping total time = 10.675 sec
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========

Thanks in advance !
Reply
#2
This is probably a result of “left-over” files in the project. Perform a “Clean” of the project. Then “Unload Project” and “Reload Project”.
Reply
#3
Thanks for the replying Steve. I clean the project before every single compilation. Besides, I have several projects (I am using PPMAC for different kind of robotic architectures) and thus often unload/load projects. This doesn't correct my problem, and I add that I have these warnings for all of my current projects.
Reply
#4
In order to make progress, I add that I have these warnings compilation on 2.4.0.180 Etherlite and PowerBrickAC, and not on a CK3E ! Does it help ? Do they miss a library ?
Reply
#5
Contact the support group with a copy of the project: support@deltatau.com.
Reply
#6
(08-30-2018, 11:38 AM)steve.milici Wrote: Contact the support group with a copy of the project: support@deltatau.com.

Hi Steve,

I had no return from the support group, and I have now this warning on CK3E since the last firmware update. I am the only one having this problem ?

Thanks !
Reply
#7
J0hann - this drove me nuts too. When my company updated firmware I made some changes to the header files to prevent the warnings. I didn't do the greatest job documenting the changes I made, but I did write down the following:

In libopener/typdefs.h move the "#include <stddef.h>" inside the !defined(__KERNEL__) statement. Here is a snippet from typedefs.h showing the change:

Code:
#ifndef OPENER_TYPEDEFS_H_
#define OPENER_TYPEDEFS_H_

#if !defined(__KERNEL__)
  #include <inttypes.h>
  #include <stddef.h>
#else
  #include <linux/types.h>
  #include <linux/socket.h>
#endif

#include <stdbool.h>

/** @file typedefs.h

I am not using the IDE, but I think the IDE auto-downloads all header files from the Power PMAC so you may have to make the change both on the Power PMAC and on your development computer.
Reply
#8
Awesome, it works, thank you so much Shansen !!! So happy to see this problem solved.

For the record (and for other people having the problem), the path of the file to edit is:

~\DeltaTau\PowerPMAC\Compilers\usr\local\dtlibs\libopener

My DeltaTau file is directly on C:\
Reply
#9
You're right, the libopener header files are replaced by PPMAC's, downloaded at compilation. So I have to apply the changes in the controller also. Do you know where I can find these files ?!

Thanks !

EDIT: found it -> /opt/ppmac/libopener
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)