Re: gcc issue
Steve zep...@cfl.rr.com wrote: Mamoru Tasaka mtas...@ioa.s.u-tokyo.ac.jp wrote: Steve wrote, at 02/05/2009 03:55 AM +9:00: Kevin Kofler kevin.kof...@chello.at wrote: Steve wrote: I had tried putting #define __USE_GNU in the code but that didn't make any difference. You need to #define _GNU_SOURCE, not __USE_GNU. glibc #undefs all the __USE_* macros, then #defines them based on the _*_SOURCE macros you used. ...and now I know... but that still doesn't explain why _GNU_SOURCE is not defined in the dhcp-4.0.0 src rpm. Note that dhcp-4.0.0-22.fc9 srpm has: - CFLAGS=%{optflags} -fPIC -D_GNU_SOURCE \ %configure \ --disable-dhcpv6 \ --with-srv-lease-file=%{_localstatedir}/lib/dhcpd/dhcpd.leases \ --with-cli-lease-file=%{_localstatedir}/lib/dhclient/dhclient.leases \ --with-srv-pid-file=%{_localstatedir}/run/dhcpd.pid \ --with-cli-pid-file=%{_localstatedir}/run/dhclient.pid \ --with-relay-pid-file=%{_localstatedir}/run/dhcrelay.pid - Interesting. I'll take another look tomorrow morning. Perhaps there is a completly different reason why the make is failing with that error or perhaps something funky happened with configure. Steve. OK, now I am really confused. I went to rpmfind (http://rpmfind.net/linux/RPM/fedora/updates/9/x86_64/dhclient-4.0.0-22.fc9.x86_64.html) to get the dhcp src rpm and downloaded it. It comes from ftp://download.fedora.redhat.com/pub/fedora/linux/updates/9/SRPMS.newkey/dhcp-4.0.0-22.fc9.src.rpm When I ran rpm -qp on the downloaded rpm I get this: $ rpm -qp dhcp-4.0.0-22.fc9.src.rpm dhcp-4.0.0-22.fc9.ppc ppc?!!? Is this the correct rpm? I installed the rpm anyway # rpm -iv dhcp-4.0.0-22.fc9.src.rpm which created, amongst other things /usr/src/redhat/SOURCES/dhcp-4.0.0.tar.gz I unpacked: # gunzip -cd dhcp-4.0.0.tar.gz | tar xvf - which created a /usr/src/redhat/SOURCES/dhcp-4.0.0 directory. I cd'd to the directory and ran # ./configure which ran with no errors # grep -R GNU_SOURCE * # No mention of GNU_SOURCE anywhere. I'd be interested to see if anyone can reproduce these results. Mamoru, how did you get that info you posted from the src rpm? Steve -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: gcc issue
Steve wrote, at 02/05/2009 11:26 PM +9:00: OK, now I am really confused. I went to rpmfind (http://rpmfind.net/linux/RPM/fedora/updates/9/x86_64/dhclient-4.0.0-22.fc9.x86_64.html) to get the dhcp src rpm and downloaded it. It comes from ftp://download.fedora.redhat.com/pub/fedora/linux/updates/9/SRPMS.newkey/dhcp-4.0.0-22.fc9.src.rpm When I ran rpm -qp on the downloaded rpm I get this: $ rpm -qp dhcp-4.0.0-22.fc9.src.rpm dhcp-4.0.0-22.fc9.ppc ppc?!!? Is this the correct rpm? No problem. Here ppc means the architecture where this srpm was created. However srpm is arch-independent regardless of on what platform the srpm were created. I installed the rpm anyway # rpm -iv dhcp-4.0.0-22.fc9.src.rpm which created, amongst other things /usr/src/redhat/SOURCES/dhcp-4.0.0.tar.gz I unpacked: # gunzip -cd dhcp-4.0.0.tar.gz | tar xvf - which created a /usr/src/redhat/SOURCES/dhcp-4.0.0 directory. I cd'd to the directory and ran # ./configure In that way you are not using the srpm you downloaded anymore. You are just unpacking the tarball (with no patched) and are compiling vanilla source by yourself. Perhaps what you want to do is $ rpmbuild -bc dhcp.spec after $ rpm -ivh dhcp-X.src.rpm . Please try $ man rpmbuild Regards, Mamoru -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: gcc issue
Steve wrote: I went to rpmfind (http://rpmfind.net/linux/RPM/fedora/updates/9/x86_64/dhclient-4.0.0-22.fc9.x86_64.html) to get the dhcp src rpm and downloaded it. It comes from ftp://download.fedora.redhat.com/pub/fedora/linux/updates/9/SRPMS.newkey/dhcp-4.0.0-22.fc9.src.rpm When I ran rpm -qp on the downloaded rpm I get this: $ rpm -qp dhcp-4.0.0-22.fc9.src.rpm dhcp-4.0.0-22.fc9.ppc ppc?!!? Is this the correct rpm? I installed the rpm anyway # rpm -iv dhcp-4.0.0-22.fc9.src.rpm which created, amongst other things /usr/src/redhat/SOURCES/dhcp-4.0.0.tar.gz I unpacked: # gunzip -cd dhcp-4.0.0.tar.gz | tar xvf - which created a /usr/src/redhat/SOURCES/dhcp-4.0.0 directory. I cd'd to the directory and ran # ./configure which ran with no errors # grep -R GNU_SOURCE * # http://docs.fedoraproject.org/drafts/rpm-guide-en/ Specifically: http://docs.fedoraproject.org/drafts/rpm-guide-en/ch08s02.html Regards, Bryn. -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: gcc issue [SOLVED]
Mamoru Tasaka mtas...@ioa.s.u-tokyo.ac.jp wrote: Steve wrote, at 02/05/2009 11:26 PM +9:00: OK, now I am really confused. ... In that way you are not using the srpm you downloaded anymore. You are just unpacking the tarball (with no patched) and are compiling vanilla source by yourself. Ah... umm... yes... I wondered how those patches got used. sheepish grin It just goes to show you - a (very) little knowledge is a dangerous thing. Perhaps what you want to do is $ rpmbuild -bc dhcp.spec after $ rpm -ivh dhcp-X.src.rpm . Please try $ man rpmbuild OK, got it now. (and thanks to Bryn M. Reeves for the link) $ pwd /usr/src/redhat/ $ find . -name *.spec ./SOURCES/dhcp-4.0.0/contrib/dhcp.spec ./SPECS/dhcp.spec $ rpmbuild -bc ./SPECS/dhcp.spec ...lots of stuff... ...couple of warning messages... ...more stuff... success!! Thanks, Steve -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
gcc issue
On my fully-up-to-date F9 system, this file, junk.c: #include netinet/in.h struct my_struct { struct in6_addripi6_addr; unsigned intipi6_ifindex; }; int main ( int argc, char **argv ) { int x,y; struct in6_pktinfo junk; struct my_struct junk2; x = sizeof (junk); y = sizeof (junk2); } when compiled gives this error: $ gcc -c junk.c junk.c: In function ‘main’: junk.c:12: error: storage size of ‘junk’ isn’t known $ gcc --version gcc (GCC) 4.3.0 20080428 (Red Hat 4.3.0-8) Copyright (C) 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. On a Suse 11.1 system running gcc v4.3.2, the same file compiles without errors. I'm trying to compile dhcp-4.0.0 which uses struct in6_pktinfo. Can anyone suggest a workaround? (and please don't say switch to Suse ;-D) Thanks, Steve -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: gcc issue
On Wed, Feb 04, 2009 at 10:35:09AM -0500, Steve wrote: On my fully-up-to-date F9 system, this file, junk.c: #include netinet/in.h struct my_struct { struct in6_addripi6_addr; unsigned intipi6_ifindex; }; int main ( int argc, char **argv ) { int x,y; struct in6_pktinfo junk; struct my_struct junk2; x = sizeof (junk); y = sizeof (junk2); } when compiled gives this error: $ gcc -c junk.c junk.c: In function ‘main’: junk.c:12: error: storage size of ‘junk’ isn’t known Compile with gcc -D_GNU_SOURCE -c junk.c as struct in6_pktinfo is a GNU extension. info libc 'Feature Test Macros' for more info. Jakub -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: gcc issue
Jakub Jelinek ja...@redhat.com wrote: On Wed, Feb 04, 2009 at 10:35:09AM -0500, Steve wrote: On my fully-up-to-date F9 system, this file, junk.c: #include netinet/in.h struct my_struct { struct in6_addripi6_addr; unsigned intipi6_ifindex; }; int main ( int argc, char **argv ) { int x,y; struct in6_pktinfo junk; struct my_struct junk2; x = sizeof (junk); y = sizeof (junk2); } when compiled gives this error: $ gcc -c junk.c junk.c: In function ‘main’: junk.c:12: error: storage size of ‘junk’ isn’t known Compile with gcc -D_GNU_SOURCE -c junk.c as struct in6_pktinfo is a GNU extension. info libc 'Feature Test Macros' for more info. Thanks, that works. I had tried putting #define __USE_GNU in the code but that didn't make any difference. I downloaded the source rpm for dhcp-4.0.0 and the compile failed with this error. Packaging error or configure error? Thanks, Steve -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: gcc issue
Steve wrote: I had tried putting #define __USE_GNU in the code but that didn't make any difference. You need to #define _GNU_SOURCE, not __USE_GNU. glibc #undefs all the __USE_* macros, then #defines them based on the _*_SOURCE macros you used. Kevin Kofler -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: gcc issue
Kevin Kofler kevin.kof...@chello.at wrote: Steve wrote: I had tried putting #define __USE_GNU in the code but that didn't make any difference. You need to #define _GNU_SOURCE, not __USE_GNU. glibc #undefs all the __USE_* macros, then #defines them based on the _*_SOURCE macros you used. ...and now I know... but that still doesn't explain why _GNU_SOURCE is not defined in the dhcp-4.0.0 src rpm. Steve -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: gcc issue
Steve wrote, at 02/05/2009 03:55 AM +9:00: Kevin Kofler kevin.kof...@chello.at wrote: Steve wrote: I had tried putting #define __USE_GNU in the code but that didn't make any difference. You need to #define _GNU_SOURCE, not __USE_GNU. glibc #undefs all the __USE_* macros, then #defines them based on the _*_SOURCE macros you used. ...and now I know... but that still doesn't explain why _GNU_SOURCE is not defined in the dhcp-4.0.0 src rpm. Note that dhcp-4.0.0-22.fc9 srpm has: - CFLAGS=%{optflags} -fPIC -D_GNU_SOURCE \ %configure \ --disable-dhcpv6 \ --with-srv-lease-file=%{_localstatedir}/lib/dhcpd/dhcpd.leases \ --with-cli-lease-file=%{_localstatedir}/lib/dhclient/dhclient.leases \ --with-srv-pid-file=%{_localstatedir}/run/dhcpd.pid \ --with-cli-pid-file=%{_localstatedir}/run/dhclient.pid \ --with-relay-pid-file=%{_localstatedir}/run/dhcrelay.pid - Regards, Mamoru -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: gcc issue
Mamoru Tasaka mtas...@ioa.s.u-tokyo.ac.jp wrote: Steve wrote, at 02/05/2009 03:55 AM +9:00: Kevin Kofler kevin.kof...@chello.at wrote: Steve wrote: I had tried putting #define __USE_GNU in the code but that didn't make any difference. You need to #define _GNU_SOURCE, not __USE_GNU. glibc #undefs all the __USE_* macros, then #defines them based on the _*_SOURCE macros you used. ...and now I know... but that still doesn't explain why _GNU_SOURCE is not defined in the dhcp-4.0.0 src rpm. Note that dhcp-4.0.0-22.fc9 srpm has: - CFLAGS=%{optflags} -fPIC -D_GNU_SOURCE \ %configure \ --disable-dhcpv6 \ --with-srv-lease-file=%{_localstatedir}/lib/dhcpd/dhcpd.leases \ --with-cli-lease-file=%{_localstatedir}/lib/dhclient/dhclient.leases \ --with-srv-pid-file=%{_localstatedir}/run/dhcpd.pid \ --with-cli-pid-file=%{_localstatedir}/run/dhclient.pid \ --with-relay-pid-file=%{_localstatedir}/run/dhcrelay.pid - Interesting. I'll take another look tomorrow morning. Perhaps there is a completly different reason why the make is failing with that error or perhaps something funky happened with configure. Steve. -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines