gnucobol-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [open-cobol-list] Open Cobol 0.33 and IBM AIX Xlc


From: Sergey Kashyrin
Subject: Re: [open-cobol-list] Open Cobol 0.33 and IBM AIX Xlc
Date: Wed Mar 8 10:48:08 2006

Gary,

What version of xlc do you have ?

I'm using v8 and it compiles opencobol okay (of course giving a lot of warnings 
about the stuff you mentioned).
According what you've send you might be using not xlc but cc (which is 
different !)
I recommend to do
export CC=xlc_r
export CXX=xlc_r
export CFLAGS="-qchars=signed"

You will need to edit Makefiles anyway to replace -fsigned-char by "-qchars=signed" remove other -f options, replace "-shared" by "-G".
I also recommend as soon as you start "make", cancel it and edit default.h
Mine is following:
#define COB_CC           "xlc_r"
#define COB_CFLAGS       "-I/usr/local/include -I/usr/local/include -qchars=signed 
-w "
#define COB_LIBS         ""
#define COB_LDFLAGS      "-L/usr/local/lib -lcob -lm -ldb -lgmp -lintl"
#define COB_CONFIG_DIR   "/usr/local/share/open-cobol/config"
#define COB_LIBRARY_PATH ".:/usr/local/lib/open-cobol"
#define COB_MODULE_EXT   "so"
#define LOCALEDIR        "/usr/local/share/locale"

as well as config.h
#define COB_EXPORT_DYN "-Wl,-bexpfull"
#define COB_SHARED_OPT "-G"

Regards,
Sergey


----- Original Message ----- From: "Gary Cowell" <address@hidden>
To: <address@hidden>
Sent: Wednesday, March 08, 2006 12:36 PM
Subject: [open-cobol-list] Open Cobol 0.33 and IBM AIX Xlc


Whilst trying to get OC to compile up on AIX (I have
compiled up bdb with 1.85 compatibility and gmp
already) I find two problems so far:

1) The ./configure script detects Xlc but generates
GNU compiler options which cause Xlc to choke.

If I hack the Makefiles to get around this problem, we
find the following:

$ make
       make  all-recursive
Making all in lib
Target "all" is up to date.
Making all in libcob
       source='move.c' object='libcob_la-move.lo'
libtool=yes  DEPDIR=.deps depmode=aix /bin/sh
../depcomp  /bin/sh ../libtool --tag=CC --mode=compile
cc -DHAVE_CONFIG_H -I. -I. -I..
-I/usr/local/BerkeleyDB.4.4/include
-I/usr/local/include -fsigned-char -DSUPER_OPTIMIZE
-I..  -c -o libcob_la-move.lo `test -f 'move.c' ||
echo './'`move.c
cc -DHAVE_CONFIG_H -I. -I. -I..
-I/usr/local/BerkeleyDB.4.4/include
-I/usr/local/include -fsigned-char -DSUPER_OPTIMIZE
-I.. -c -M move.c  -DPIC -o .libs/libcob_la-move.o
"move.c", line 793.37: 1506-068 (S) Operation between
types "void" and "void" is not allowed.
"move.c", line 798.54: 1506-068 (S) Operation between
types "void" and "void" is not allowed.
"move.c", line 807.55: 1506-068 (S) Operation between
types "void" and "void" is not allowed.
"move.c", line 809.60: 1506-068 (S) Operation between
types "void" and "void" is not allowed.
"move.c", line 811.59: 1506-068 (S) Operation between
types "void" and "void" is not allowed.
"move.c", line 813.59: 1506-068 (S) Operation between
types "void" and "void" is not allowed.
"move.c", line 815.59: 1506-068 (S) Operation between
types "void" and "void" is not allowed.
"move.c", line 819.54: 1506-068 (S) Operation between
types "void" and "void" is not allowed.
"move.c", line 823.68: 1506-068 (S) Operation between
types "void" and "void" is not allowed.
"move.c", line 826.61: 1506-068 (S) Operation between
types "void" and "void" is not allowed.
"move.c", line 832.59: 1506-068 (S) Operation between
types "void" and "void" is not allowed.
"move.c", line 834.46: 1506-068 (S) Operation between
types "void" and "void" is not allowed.
"move.c", line 841.59: 1506-068 (S) Operation between
types "void" and "void" is not allowed.
"move.c", line 847.46: 1506-068 (S) Operation between
types "void" and "void" is not allowed.
"move.c", line 850.46: 1506-068 (S) Operation between
types "void" and "void" is not allowed.
"move.c", line 857.59: 1506-068 (S) Operation between
types "void" and "void" is not allowed.
"move.c", line 863.46: 1506-068 (S) Operation between
types "void" and "void" is not allowed.
"move.c", line 865.60: 1506-068 (S) Operation between
types "void" and "void" is not allowed.
"move.c", line 867.62: 1506-068 (S) Operation between
types "void" and "void" is not allowed.
"move.c", line 872.38: 1506-068 (S) Operation between
types "void" and "void" is not allowed.
"move.c", line 877.61: 1506-068 (S) Operation between
types "void" and "void" is not allowed.
"move.c", line 883.46: 1506-068 (S) Operation between
types "void" and "void" is not allowed.
"move.c", line 885.60: 1506-068 (S) Operation between
types "void" and "void" is not allowed.
"move.c", line 887.62: 1506-068 (S) Operation between
types "void" and "void" is not allowed.
make: 1254-004 The error code from the last command is
1.


Stop.
make: 1254-004 The error code from the last command is
1.


Stop.
make: 1254-004 The error code from the last command is
2.


This is a problem from returning a call to a function
which returns void.

This small example:

#include <stdio.h>

static void myvoid() {
       return;
}
static void thingy() {
       return myvoid();
}

int main(int argc, char *argv[]) {
       thingy();
       return 0;
}

Will compile and work (for whatever work means in for
this code!) if you use GCC. With Xlc it will refuse to
compile it.

I don't know if there are options that could be added
to Xlc to make it accept this code but the construct
looks wrong to me anyway

Gary



___________________________________________________________
To help you stay safe and secure online, we've developed the all new Yahoo! 
Security Centre. http://uk.security.yahoo.com


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
open-cobol-list mailing list
address@hidden
https://lists.sourceforge.net/lists/listinfo/open-cobol-list



reply via email to

[Prev in Thread] Current Thread [Next in Thread]