configure script patches for IBM z/OS Build

71 views
Skip to first unread message

Bovy, Stephen

unread,
Apr 28, 2012, 12:45:41 AM4/28/12
to vim...@googlegroups.com, vim...@vim.org, Bram Moolenaar
>> src/auto/configure <<<<

4414c4414
< if test "$CC" = "cc"; then
---
> if test "$CC" = "cc"; then
4436,4439c4436
< # set CFLAGS for configure process
< # this will be reset later for config.mk
< # use haltonmsg to force error for missing H files
< CFLAGS="$CFLAGS -D_ALL_SOURCE -Wc,float(ieee),haltonmsg(3296)";
---
> CFLAGS="$CFLAGS -D_ALL_SOURCE -Wc,float\\(IEEE\\)";
12595,12598d12591
< # IBM z/OS reset CFLAGS for config.mk
< if test "$zOSUnix" = "yes"; then
< CFLAGS="-D_ALL_SOURCE -Wc,float\(ieee\)"
< fi

>>> src/configure.in <<<<<<

339,342c339
< # set CFLAGS for configure process
< # this will be reset later for config.mk
< # use haltonmsg to force error for missing H files
< CFLAGS="$CFLAGS -D_ALL_SOURCE -Wc,float(ieee),haltonmsg(3296)";
---
> CFLAGS="$CFLAGS -D_ALL_SOURCE -Wc,float\\(IEEE\\)";
3647,3651d3643
<
< # IBM z/OS reset CFLAGS for config.mk
< if test "$zOSUnix" = "yes"; then
< CFLAGS="-D_ALL_SOURCE -Wc,float\(ieee\)"
< fi

Bram Moolenaar

unread,
Apr 28, 2012, 7:33:07 AM4/28/12
to Bovy, Stephen, vim...@vim.org
Can you please make context diffs, so that we can see exactly what
changes? And please attach the diff, if you put it as the main text
lines get wrapped.

It is also nice if you can give a short explanation what the patch
fixes, otherwise we have to guess.

--
VOICE OVER: As the horrendous Black Beast lunged forward, escape for Arthur
and his knights seemed hopeless, when, suddenly ... the animator
suffered a fatal heart attack.
ANIMATOR: Aaaaagh!
VOICE OVER: The cartoon peril was no more ... The Quest for Holy Grail could
continue.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Bovy, Stephen

unread,
Apr 29, 2012, 1:45:02 AM4/29/12
to vim...@googlegroups.com, vim...@vim.org, MVS OpenEdition (MVS-OE@vm.marist.edu)
OK, thanks

I will try my best

I am new at this (so please be patient )

These patches address three issues

The first change fixes the configure process

1) The configure script does not detect missing H files, I added the following option to fix this { haltonmsg(3296) }
2) The z/OS compiler use "()" for some compiler options. Normally in an open command-line or in an open-makefile
The "()" must be "escaped" , but configure uses { eval } therefore the escapes are not needed and do not work .
This value { float\\(IEEE\\) } produces a compiler warning error "invalid option float\ ". I found this by examining the configure.log
Therefore I changed it to ",float(ieee),"

Since the above options will only work correctly in the configure script the CFLAGS must be RESET to values that
Will work in the makefile so the last change sets the options that are to be used in the makefile

CFLAGS="-D_ALL_SOURCE -Wc,float\(ieee\)"

IBM has recently added a new compiler interface which is UNIX friendly (the new -q options syntax) but that may not
Be backwards compatible

But , Now after doing further research I have discovered that ( I need to use a completely different set of options ) and for sure these
Options are not compatible with older systems ( how old or how far back should be supported is the current question I need to resolve )

Here is an excerpt from a motif sample makefile >>

/usr/lpp/tcpip/X11R66/Xamples/motif/popups/Makefile

# This Makefile is used to build autopopups.
#
# Parameters:
# 31STATIC - builds 31-bit statically linked version
# 31DYNAMIC - builds 31-bit dynamically linked (DLL) version
# 64STATIC - builds 64-bit statically linked version
# 64DYNAMIC - builds 64-bit dynamically linked (DLL) version
# ALL - build all four versions
# clean - remove all objects, side-decks, and autopopups* prog
#
# The default is 31STATIC.
#
.SUFFIXES: .o .o64 .c
#
#
OBJS31 = autopopups.o
OBJS64 = autopopups.o64
PROGRAM = autopopups
#
LIB = /usr/lpp/tcpip/X11R66/lib
XINCLUDE = -I/usr/lpp/tcpip/X11R66/include
CC = cc
#
STATLIBS = -lXm -lXt -lSM -lICE -lXp -lXext -lX11
#
DYNLIBS31 = $(LIB)/Xm_31.x $(LIB)/Xaw_31.x $(LIB)/SM_31.x \
$(LIB)/ICE_31.x $(LIB)/X11_31.x
CFLAGS31 = -D_ALL_SOURCE -Wc,dll,XPLINK,FLOAT\(IEEE\)
LFLAGS31 = -Wl,dll,XPLINK
#
DYNLIBS64 = $(LIB)/Xm_64.x $(LIB)/Xaw_64.x $(LIB)/SM_64.x \
$(LIB)/ICE_64.x $(LIB)/X11_64.x
CFLAGS64 = -D_ALL_SOURCE -Wc,dll,LP64,XPLINK,FLOAT\(IEEE\)
LFLAGS64 = -Wl,LP64,dll,XPLINK
#
default: 31STATIC
ALL: 31STATIC 31DYNAMIC 64STATIC 64DYNAMIC
31STATIC: $(PROGRAM)
31DYNAMIC: $(PROGRAM)d
64STATIC: $(PROGRAM)64
64DYNAMIC: $(PROGRAM)64d

# compile 31-bit objects
.c.o:
$(CC) -c -o $@ $(CFLAGS31) $(XINCLUDE) $<

# compile 64-bit objects
.c.o64:
$(CC) -c -o $@ $(CFLAGS64) $(XINCLUDE) $<

# link the 31-bit static version
$(PROGRAM): $(OBJS31)
$(CC) -o $@ $(LFLAGS31) -L$(LIB) $^ $(STATLIBS)

# link the 31-bit dynamic version
$(PROGRAM)d: $(OBJS31) $(DYNLIBS31)
$(CC) -o $@ $(LFLAGS31) $^

# link the 64-bit static version
$(PROGRAM)64: $(OBJS64)
$(CC) -o $@ $(LFLAGS64) -L$(LIB) $^ $(STATLIBS)

# link the 64-bit dynamic version
$(PROGRAM)64d: $(OBJS64) $(DYNLIBS64)
$(CC) -o $@ $(LFLAGS64) $^

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

So I need to use >>

CFLAGS = -D_ALL_SOURCE -Wc,dll,XPLINK,FLOAT\(IEEE\)
LFLAGS = -Wl,dll,XPLINK

So please hold off on these patches until I have time to do some more research
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Bovy, Stephen

unread,
Apr 29, 2012, 1:59:28 AM4/29/12
to vim...@googlegroups.com, vim...@vim.org, MVS OpenEdition (MVS-OE@vm.marist.edu)
>>>>>>>>

Hmmm ,

I see, I missed this !!

if test "$zOSUnix" = "yes"; then
CFLAGS="$CFLAGS -W c,dll"
LDFLAGS="$LDFLAGS -W l,dll"
X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE -lXmu"
fi

So again , please wait while I re-check

I suppose the correct solution would be to use SED to re-insert the required "escapes" before the makfile is written

Bovy, Stephen

unread,
Apr 29, 2012, 2:54:43 AM4/29/12
to vim...@googlegroups.com, vim...@vim.org, MVS OpenEdition (MVS-OE@vm.marist.edu)
Well shucks , I am still getting compiler errors (after fixing all previous mistakes)

The IBM compiler never lies ( we always use the IBM compiler as our final line of defense ) because it is the ultimate most absolutely strictest compiler Which absolutely enforces STANDARDS dotting every T and crossing every I

cc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MOTIF -D_ALL_SOURCE -Wc,float\(ieee\),dll -o objects/gui_xmebw.o gui_xmebw.c

ERROR CCN3285 ./gui_xmebw.c:1305 The indirection operator cannot be applied to a pointer to an incomplete struct or union.
ERROR CCN3285 ./gui_xmebw.c:1369 The indirection operator cannot be applied to a pointer to an incomplete struct or union.
ERROR CCN3285 ./gui_xmebw.c:1370 The indirection operator cannot be applied to a pointer to an incomplete struct or union.
CCN0793(I) Compilation failed for file ./gui_xmebw.c. Object file not created.
FSUM3065 The COMPILE step ended with return code 12.
FSUM3017 Could not compile gui_xmebw.c. Correct the errors and try again.
FSUM8226 make: Error code 3
$

Dominique Pellé

unread,
Apr 29, 2012, 3:05:09 AM4/29/12
to vim...@googlegroups.com
Bovy, Stephen wrote:

>>>>>>>>>
>
> Hmmm  ,
>
> I see, I missed this !!
>
>  if test "$zOSUnix" = "yes"; then
>    CFLAGS="$CFLAGS -W c,dll"
>    LDFLAGS="$LDFLAGS -W l,dll"
>    X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE -lXmu"
>  fi
>
> So again ,  please wait while I re-check
>
> I suppose the correct solution would be to use SED
> to re-insert the required "escapes"  before the makfile is written


Hi Stephen

You can produce a context diff for your patches with
with "diff -c original_file modified_file". Or if you use
mercurial (which is recommended), you then can just
do "hg diff file".

I suppose that only few people have access to zOS so the
problems you find are very welcome!

-- Dominique

Bovy, Stephen

unread,
Apr 29, 2012, 8:27:36 PM4/29/12
to vim...@googlegroups.com, vim...@vim.org, MVS OpenEdition (MVS-OE@vm.marist.edu)

ERROR CCN3285 ./gui_xmebw.c:1305 The indirection operator cannot be applied to a pointer to an incomplete struct or union.
ERROR CCN3285 ./gui_xmebw.c:1369 The indirection operator cannot be applied to a pointer to an incomplete struct or union.
ERROR CCN3285 ./gui_xmebw.c:1370 The indirection operator cannot be applied to a pointer to an incomplete struct or union.

I wonder if (eb) needs to be cast

I see eb being cast back and forth a lot

1305 >> XmParentBackgroundGC(eb),

1369 >> bottom_gc = XmParentTopShadowGC(eb);
top_gc = XmParentBottomShadowGC(eb);

Bovy, Stephen

unread,
Apr 29, 2012, 11:10:23 PM4/29/12
to vim...@googlegroups.com, vim...@vim.org, MVS OpenEdition (MVS-OE@vm.marist.edu)

ERROR CCN3285 ./gui_xmebw.c:1305 The indirection operator cannot be applied to a pointer to an incomplete struct or union.
ERROR CCN3285 ./gui_xmebw.c:1369 The indirection operator cannot be applied to a pointer to an incomplete struct or union.
ERROR CCN3285 ./gui_xmebw.c:1370 The indirection operator cannot be applied to a pointer to an incomplete struct or union.

I wonder if (eb) needs to be cast

I see eb being cast back and forth a lot

1305 >> XmParentBackgroundGC(eb),

1369 >> bottom_gc = XmParentTopShadowGC(eb);
top_gc = XmParentBottomShadowGC(eb);

Reply all
Reply to author
Forward
0 new messages