Opened 3 years ago

Closed 3 years ago

#1578 closed defect (fixed)

qtcsh compile failure

Reported by: opoplawski Owned by:
Priority: normal Milestone:
Component: sge Version: 8.1.8
Severity: minor Keywords:
Cc:

Description

Trying to compile sge 8.1.9 on Fedora Rawhide (F26) I get:

cc -c -O2 -Wstrict-prototypes -DLINUX -DLINUXAMD64 -DLINUXAMD64 -D_GNU_SOURCE -DGETHOSTBYNAME_R6 -DGETHOSTBYADDR_R8 -DTARGET_64BIT -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -DSGE_PQS_API -DSPOOLING_dynamic -DSECURE -DHAVE_HWLOC=1 -DCOMPILE_DC -D__SGE_COMPILE_WITH_GETTEXT__ -D__SGE_NO_USERMAPPING__ -U_GNU_SOURCE -Wno-error -DPROG_NAME='"qtcsh"' -DLINUXAMD64                 -I. -I.. -D_PATH_TCSHELL='"/usr/local/bin/tcsh"'    -I../../../libs/gdi -I../../../libs/gdi ../sh.proc.c
In file included from /usr/include/signal.h:28:0,
                 from ../sh.h:39,
                 from ../sh.proc.c:33:
/usr/include/features.h:177:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
../sh.proc.c: In function 'pchild':
../sh.proc.c:153:16: error: storage size of 'w' isn't known
     union wait w;
                ^
../sh.proc.c:153:16: warning: unused variable 'w' [-Wunused-variable]
Makefile:381: recipe for target 'sh.proc.o' failed

Looking sh.proc.c, I see:

#if defined(_BSD) || (defined(IRIS4D) && __STDC__) || defined(__lucid) || defined(linux) || defined(__GNU__) || defined(__GLIBC__)
# define BSDWAIT
#endif /* _BSD || (IRIS4D && __STDC__) || __lucid || glibc */
Which doesn't make much sense to me. waitpid() is preferred over wait3() according to the wait3(2) man page, so we should be avoiding it when we can. So I would think we would want to drop "defined(linux)
defined(GNU) defined(GLIBC)" from that conditional. That combined with dropping #define BSDTIMES from the linux config file seems to do the trick.

Attachments (1)

sge-wait.patch (1.2 KB) - added by opoplawski 3 years ago.
patch to make qtcsh use waitpid() on linux

Download all attachments as: .zip

Change History (3)

Changed 3 years ago by opoplawski

patch to make qtcsh use waitpid() on linux

comment:2 Changed 3 years ago by dlove

#if defined(_BSD) defined(linux)
(defined(IRIS4D) && STDC) defined(lucid)
defined(GNU) defined(GLIBC)

# define BSDWAIT

#endif /* _BSD
(IRIS4D && STDC) lucid glibc */

}}}
Which doesn't make much sense to me.

You don't still have an IRIS4D?

waitpid() is preferred over wait3()
according to the wait3(2) man page, so we should be avoiding it when we

can. So I would think we would want to drop "defined(linux) defined(GNU)
defined(GLIBC)" from that conditional. That

combined with dropping #define BSDTIMES from the linux config file seems
to do the trick.

The glibc change for union wait was announced on fedora-devel a while
ago, but obviously I didn't push the change. Now:
https://arc.liv.ac.uk/trac/SGE/changeset/4906/sge/?format=diff&new=4906

The next version of openssl will break it too, according to Debian, but
I haven't looked at that.

comment:3 Changed 3 years ago by dlove

  • Resolution set to fixed
  • Status changed from new to closed

Was fixed by [4906]

Note: See TracTickets for help on using tickets.