[opensuse-buildservice] Build error struct udphdr' missing 'uh_dport' for sipp on BS
Hi, hopefully someone on the list knows the root cause of the underneath problem. The root cause is probably a missing pkg, but I have no idea which one. The build fails when executing 'osc build ....sipp.spec', but the build is succesfull in my local environment. I assume some more pkgs are available there. cc -march=i586 -mtune=i686 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -O2 -I. -I/opt/openssl/include -c -o send_packets.o send_packets.c send_packets.c: In function 'send_packets': send_packets.c:177: error: 'struct udphdr' has no member named 'uh_dport' send_packets.c:179: error: 'struct udphdr' has no member named 'uh_sport' send_packets.c:180: error: 'struct udphdr' has no member named 'uh_dport' send_packets.c:183: error: 'struct udphdr' has no member named 'uh_sport' send_packets.c:186: error: 'struct udphdr' has no member named 'uh_sport' send_packets.c:193: error: 'struct udphdr' has no member named 'uh_sum' make[1]: *** [send_packets.o] Error 1 make[1]: Leaving directory `/usr/src/packages/BUILD/sipp-1.1rc8.src' make: *** [pcapplay_ossl] Error 2 It looks to me that the structure is provided by: /usr/include/netinet/udp.h /* UDP header as specified by RFC 768, August 1980. */ struct udphdr { u_int16_t uh_sport; /* source port */ u_int16_t uh_dport; /* destination port */ u_int16_t uh_ulen; /* udp length */ u_int16_t uh_sum; /* udp checksum */ }; This file is part of the osc build, see (the grep for dport): Local osc build output: + cd sipp-1.1rc8.src + make clean rm -f *.o sipp *~ *.log sipp.tgz *.csv *.exe rm -rf cxx_repository + grep uh_dport /usr/include/netinet/udp.h u_int16_t uh_dport; /* destination port */ Is something processes/installed in the wrong order? What's needed to have sipp build succesfull on the BS? -- TIA, Richard Bos We are borroing the world of our chlidren, We don't inherit her from our parents. --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On Wed, Jan 31, 2007 at 09:25:54PM +0100, Richard Bos wrote:
It looks to me that the structure is provided by: /usr/include/netinet/udp.h /* UDP header as specified by RFC 768, August 1980. */
struct udphdr { u_int16_t uh_sport; /* source port */ u_int16_t uh_dport; /* destination port */ u_int16_t uh_ulen; /* udp length */ u_int16_t uh_sum; /* udp checksum */ };
On my system struct udphdr is defined as struct udphdr { u_int16_t source; u_int16_t dest; u_int16_t len; u_int16_t check; }; See the #ifdef in udp.h. I don't know why your local builds have _BSD_SOURCE defined. Cheers, Michael. -- Michael Schroeder mls@suse.de main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);} --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Robert and Michael, thanks you for your fast replies :)) I continue below... Op woensdag 31 januari 2007 21:39, schreef Michael Schroeder:
On Wed, Jan 31, 2007 at 09:25:54PM +0100, Richard Bos wrote:
It looks to me that the structure is provided by: /usr/include/netinet/udp.h /* UDP header as specified by RFC 768, August 1980. */
struct udphdr { u_int16_t uh_sport; /* source port */ u_int16_t uh_dport; /* destination port */ u_int16_t uh_ulen; /* udp length */ u_int16_t uh_sum; /* udp checksum */ };
On my system struct udphdr is defined as
struct udphdr { u_int16_t source; u_int16_t dest; u_int16_t len; u_int16_t check; };
See the #ifdef in udp.h. I don't know why your local builds have _BSD_SOURCE defined.
Ah, I see the #if #else construct now, I did not notice it before. May the difference be in the used compiler? With the local build gcc is used and on the BS 'cc' is used, although gcc, gcc-c++ are installed What determines the compiler to be used? To Robert: I have no idea how to make the code POSIX compliant. [some time later] I found the solution: when I add -D__LINUX to the CFLAGS build option the build completes succesfully :)) -- Richard Bos We are borroing the world of our chlidren, We don't inherit her from our parents. --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On Wed, Jan 31, 2007 at 10:35:22PM +0100, Richard Bos wrote:
Ah, I see the #if #else construct now, I did not notice it before. May the difference be in the used compiler? With the local build gcc is used and on the BS 'cc' is used, although gcc, gcc-c++ are installed
cc is just another name for gcc on Linux. It should not behave in a different way.
What determines the compiler to be used?
As long as you don't give us a pointer to your code we can't say.
To Robert: I have no idea how to make the code POSIX compliant.
In that case just use the other member names as seen in the header file.
[some time later] I found the solution: when I add -D__LINUX to the CFLAGS build option the build completes succesfully :))
This is a special thing of your application then. glibc does not use __LINUX in any way. Robert -- Robert Schiele Dipl.-Wirtsch.informatiker mailto:rschiele@gmail.com "Quidquid latine dictum sit, altum sonatur."
Op woensdag 31 januari 2007 22:52, schreef Robert Schiele:
On Wed, Jan 31, 2007 at 10:35:22PM +0100, Richard Bos wrote:
Ah, I see the #if #else construct now, I did not notice it before. May the difference be in the used compiler? With the local build gcc is used and on the BS 'cc' is used, although gcc, gcc-c++ are installed
cc is just another name for gcc on Linux. It should not behave in a different way.
What determines the compiler to be used?
As long as you don't give us a pointer to your code we can't say.
It's sipp: http://sipp.svn.sourceforge.net/viewvc/sipp/sipp/trunk/
To Robert: I have no idea how to make the code POSIX compliant.
In that case just use the other member names as seen in the header file.
[some time later] I found the solution: when I add -D__LINUX to the CFLAGS build option the build completes succesfully :))
This is a special thing of your application then. glibc does not use __LINUX in any way.
Guess so, it seems to be hardcoded in the makefile: http://sipp.svn.sourceforge.net/viewvc/sipp/sipp/trunk/Makefile?revision=151&view=markup From the Makefile: CFLAGS_linux=-D__LINUX -pthread -- Richard Bos Without a home the journey is endless --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On Wed, Jan 31, 2007 at 11:26:10PM +0100, Richard Bos wrote:
Op woensdag 31 januari 2007 22:52, schreef Robert Schiele:
As long as you don't give us a pointer to your code we can't say.
It's sipp: http://sipp.svn.sourceforge.net/viewvc/sipp/sipp/trunk/
This is still incomplete information since it does not tell us how your spec file does look like.
Guess so, it seems to be hardcoded in the makefile: http://sipp.svn.sourceforge.net/viewvc/sipp/sipp/trunk/Makefile?revision=151&view=markup
From the Makefile: CFLAGS_linux=-D__LINUX -pthread
So, why did you remove it in the first place? Robert -- Robert Schiele Dipl.-Wirtsch.informatiker mailto:rschiele@gmail.com "Quidquid latine dictum sit, altum sonatur."
Op woensdag 31 januari 2007 23:34, schreef Robert Schiele:
On Wed, Jan 31, 2007 at 11:26:10PM +0100, Richard Bos wrote:
Op woensdag 31 januari 2007 22:52, schreef Robert Schiele:
As long as you don't give us a pointer to your code we can't say.
It's sipp: http://sipp.svn.sourceforge.net/viewvc/sipp/sipp/trunk/
This is still incomplete information since it does not tell us how your spec file does look like.
Sorry. Here is the reference to the BS: http://build.opensuse.org/package/show?package=sipp&project=server%3Atelephony
Guess so, it seems to be hardcoded in the makefile: http://sipp.svn.sourceforge.net/viewvc/sipp/sipp/trunk/Makefile?revision= 151&view=markup
From the Makefile: CFLAGS_linux=-D__LINUX -pthread
So, why did you remove it in the first place?
In the spec file that comes with the package, the following make line is present: make CFLAGS="%{optflags} CPPFLAGS="%{optflags}" So, why not use it than? -- Richard Bos We are borroing the world of our chlidren, We don't inherit her from our parents. --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On Thu, Feb 01, 2007 at 08:16:55PM +0100, Richard Bos wrote:
In the spec file that comes with the package, the following make line is present: make CFLAGS="%{optflags} CPPFLAGS="%{optflags}" So, why not use it than?
Because it is broken. For this makefile you obviously have to set EXTRACFLAGS and EXTRACPPFLAGS, not CFLAGS and CPPFLAGS. Robert -- Robert Schiele Dipl.-Wirtsch.informatiker mailto:rschiele@gmail.com "Quidquid latine dictum sit, altum sonatur."
Op donderdag 1 februari 2007 20:45, schreef Robert Schiele:
On Thu, Feb 01, 2007 at 08:16:55PM +0100, Richard Bos wrote:
In the spec file that comes with the package, the following make line is present: make CFLAGS="%{optflags} CPPFLAGS="%{optflags}" So, why not use it than?
Because it is broken. For this makefile you obviously have to set EXTRACFLAGS and EXTRACPPFLAGS, not CFLAGS and CPPFLAGS.
I've updated the spec file :) Thanks for being persistent! -- Richard Bos We are borroing the world of our chlidren, We don't inherit her from our parents. --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On Wed, Jan 31, 2007 at 09:25:54PM +0100, Richard Bos wrote:
Hi,
hopefully someone on the list knows the root cause of the underneath problem. The root cause is probably a missing pkg, but I have no idea which one. The build fails when executing 'osc build ....sipp.spec', but the build is succesfull in my local environment. I assume some more pkgs are available there.
cc -march=i586 -mtune=i686 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -O2 -I. -I/opt/openssl/include -c -o send_packets.o send_packets.c send_packets.c: In function 'send_packets': send_packets.c:177: error: 'struct udphdr' has no member named 'uh_dport' send_packets.c:179: error: 'struct udphdr' has no member named 'uh_sport' send_packets.c:180: error: 'struct udphdr' has no member named 'uh_dport' send_packets.c:183: error: 'struct udphdr' has no member named 'uh_sport' send_packets.c:186: error: 'struct udphdr' has no member named 'uh_sport' send_packets.c:193: error: 'struct udphdr' has no member named 'uh_sum' make[1]: *** [send_packets.o] Error 1 make[1]: Leaving directory `/usr/src/packages/BUILD/sipp-1.1rc8.src' make: *** [pcapplay_ossl] Error 2
Either make your code POSIX compliant or add -D_BSD_SOURCE to the compiler command line. Robert -- Robert Schiele Dipl.-Wirtsch.informatiker mailto:rschiele@gmail.com "Quidquid latine dictum sit, altum sonatur."
participants (3)
-
Michael Schroeder
-
Richard Bos
-
Robert Schiele