john@sol.cs.wmich.edu (John Kapenga) (12/16/90)
I have been trying to get the SGRP library (Foley et al) to compile correctly under SUNs stock openwindows 2.0 on sparcs. SGRP was compiled with gcc 1.37.1 and flags effecting gcc to cc linkage were tried. Such as #The following flags must be defined for UNIX/X11 implementations CPPFLAGS = -DX11 -DUNIX -I/usr/openwin/include #Very important! The first flag (struct-return) makes it safe to link # gcc objects with cc objects. GCCFLAGS = -fpcc-struct-return # Special Flags that are tried in various combinations GSPECIAL = -static -fwritable-strings -mno-epilogue -traditional Compilations give no warnings and link with SUNs X libraries fine. What happens is that some examples which use output only function work correctly (invoking them from a shelltool under openwindows). All routines which request input seem to hang, resulting in 100% CPU usage until the object is killed. It seems impossible to bind the keyboard to the newly opened graphics window. This was on a SUN 4/110, Sparcstation 1+ and an IPC. And SGRP was ftped from brown in early December. Options I see: use X libraries compiled with gcc and ANSI headers (this is recommended in the SGRP docs and likely will work, but requires a fair amount of extra disk space), wait for SUN to release an ANSI C compiler (wait is the operational term), de ANSI sgrp (automated, but undesirable), go in to hack/debug mode. Please mail any suggestions. If there is interest (and it works) I will summerize. john john@sol.cs.wmich.edu
elvis@Erc.MsState.Edu (presley) (12/16/90)
*note: I am not an Xpert, but I play one locally, sometimes* We use SRGP under X11R4 and SunOS 4.1. I have also run into the *input hangs* problem while using Sun's Openwindows 2.0 server and olwm. Because olwm (the window manager supplied with OW2.0) is fully ICCCM compliant, I believe it *forces* it's clients to be compliant also. This indicates to me that your problem (and mine) has nothing to do with the libraries being compiled by Sun's cc or gcc. I beleive it is strictly an ICCCM problem. This diagnosis has been shown to be correct by runnin twm on the OW2.0 server and running olwm on the X11R4 server. twm works with SRGP programs, wheres olwm (even when running it on the MIT server!) does not. My recommendation to you is to use twm. Also remember that the X11R4 server from MIT runs faster than OW2.0 on most SS1's because of memory requirements of the OW2.0 server. Note: I have tried to correct this problem by setting the input atoms in my X resource data base, but I've had no success at all. -- hangin' ten: -John West- surfer@erc.msstate.edu Engineering Research Center for Computational Field Simulation Mississippi State University ***** National Science Foundation P.O. Drawer EE {Simrall Bldg, Rm 431} (601) 325-8234 (voice) Mississippi State, MS 39762 (601) 325-2298 (fax) "Ours is not to reason why, but just to do and die" "`forward,' he cried from the rear, and the front flank died" - the appropriate sources
jet@karazm.math.uh.edu (J. Eric Townsend) (12/17/90)
In article <1990Dec15.170428.8738@sol.cs.wmich.edu> john@sol.cs.wmich.edu (John Kapenga) writes: >I have been trying to get the SGRP library (Foley et al) to compile >correctly under SUNs stock openwindows 2.0 on sparcs. SGRP was compiled >with gcc 1.37.1 and flags effecting gcc to cc linkage were tried. [...] >GCCFLAGS = -fpcc-struct-return There is a known bug in gcc-1.37.1 with passing structs over the stack. It breaks regardless of what flags you use. You have a two solutions: 1. Don't pass/return stacks. This is what all good C programmers should strive for. 2. Don't use gcc. -- J. Eric Townsend Internet: jet@uh.edu Bitnet: jet@UHOU Systems Mangler - UH Dept. of Mathematics - (713) 749-2120 "If you are the system administrator and this is the first time you are logging into your system, use the login name root." -- IBM RS/6000 docs