Bugzilla – Bug 74
Building FreeBSD fails
Last modified: 2010-07-23 18:56:58 MDT
You need to log in before you can comment on or make changes to this bug.
Created an attachment (id=44) [details] Full output of build attempt Full output of configure/make attached. Same results with no configure options. Reproducible with 2.5.0, 2.5.1, and 2.5.2-snap.201007221545 --enable-unixsockets also results in build failure. $ uname -rsp FreeBSD 7.0-RELEASE-p5 i386 $ gcc --version gcc (GCC) 4.2.1 20070719 [FreeBSD] *snip* $ ./configure --disable-privports --disable-gcc-warnings && gmake *snip* if gcc -DHAVE_CONFIG_H -I. -I. -I../../src/include -I../../src/include -DPBS_SERVER_HOME=\"/var/spool/torque\" -DPBS_ENVIRON=\"/var/spool/torque/pbs_environment\" -g -O2 -MT node_manager.o -MD -MP -MF ".deps/node_manager.Tpo" -c -o node_manager.o node_manager.c; then mv -f ".deps/node_manager.Tpo" ".deps/node_manager.Po"; else rm -f ".deps/node_manager.Tpo"; exit 1; fi node_manager.c: In function 'is_request': node_manager.c:1933: error: 'AF_INET' undeclared (first use in this function) node_manager.c:1933: error: (Each undeclared identifier is reported only once node_manager.c:1933: error: for each function it appears in.) *** Error code 1 Stop in /cluster/home/fitzgan/software/torque-2.5.1/src/server. *** Error code 1 Stop in /cluster/home/fitzgan/software/torque-2.5.1/src. gmake: *** [all-recursive] Error 1 $ ./configure --disable-privports --disable-gcc-warnings --enable-unixsockets && gmake *snip* gcc -DHAVE_CONFIG_H -I. -I. -I../../../src/include -I../../../src/include -I../../../src/lib/Libdis -DIFF_PATH=\"/usr/local/sbin/pbs_iff\" -DPBS_DEFAULT_FILE=\"/var/spool/torque/server_name\" -g -O2 -MT pbsD_connect.lo -MD -MP -MF .deps/pbsD_connect.Tpo -c ../Libifl/pbsD_connect.c -fPIC -DPIC -o .libs/pbsD_connect.o ../Libifl/pbsD_connect.c: In function 'send_unix_creds': ../Libifl/pbsD_connect.c:512: error: invalid application of 'sizeof' to incomplete type 'struct ucred' ../Libifl/pbsD_connect.c:527: error: invalid application of 'sizeof' to incomplete type 'struct ucred' ../Libifl/pbsD_connect.c:529: error: dereferencing pointer to incomplete type ../Libifl/pbsD_connect.c:530: error: dereferencing pointer to incomplete type *** Error code 1 Stop in /cluster/home/fitzgan/software/torque-2.5.2-snap.201007221545/src/lib/Libpbs. *** Error code 1 Stop in /cluster/home/fitzgan/software/torque-2.5.2-snap.201007221545/src/lib. *** Error code 1 Stop in /cluster/home/fitzgan/software/torque-2.5.2-snap.201007221545/src.
I think this will fix the first problem. $ svn diff src/server/node_manager.c Index: src/server/node_manager.c =================================================================== --- src/server/node_manager.c (revision 3917) +++ src/server/node_manager.c (working copy) @@ -91,6 +91,7 @@ #include <netinet/in.h> #include <stdarg.h> #include <assert.h> +#include <sys/socket.h> #if defined(NTOHL_NEEDS_ARPA_INET_H) && defined(HAVE_ARPA_INET_H) #include <arpa/inet.h> #endif @@ -1930,7 +1931,7 @@ else if (allow_any_mom) { { - hp = gethostbyaddr(&ipaddr, sizeof(ipaddr), AF_INET); + hp = gethostbyaddr((void *)&ipaddr, sizeof(ipaddr), AF_INET); if(hp != NULL) { strncpy(nodename, hp->h_name, PBS_MAXHOSTNAME);
Regarding unixsocket support... the default is to be enabled if it seems to be working. configure had already detected that unixsocket support wasn't going to work and you attempting to override that. In this case, it doesn't work because of some specific problem with ucred.h.
Closing out bug