bug-gnucobol
[Top][All Lists]
Advanced

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

Re: [open-cobol-list] [OpenCOBOL 1.0] syntax: 2 3 4 5 failed


From: Kumi Hagimoto
Subject: Re: [open-cobol-list] [OpenCOBOL 1.0] syntax: 2 3 4 5 failed
Date: Sun, 25 Jan 2009 08:27:57 -0800

Thanks, I'll try that.
I actually tried to get a GCC 4.3.2, but it failed to install after letting it run for over an hour.
I'll report back how it goes with 1.1!

Regards,
Kumi

On Fri, Jan 23, 2009 at 11:13 PM, Roger While <address@hidden> wrote:
Please use OpenCOBOL 1.1 prerelease.
This does not use "internal" functions.

Roger

Hi Kumi,

> i686-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5370)

Looks like your GCC version can't handle "internal" functions, like in this test which you can try

void test() {
 int data;

 auto void init_external (void);
 init_external();

 void init_external (void)
 {
     data = "">  }
}

For example it compiles fine in GCC 4.0.2 on HPUX (below)
Try to find GCC which will do that.
Otherwise you might need to push OpenCobol to do non-GCC translation, which is possible of course but will be complicated to configure.

Regards,
Sergey


-------------------
ska 35> gcc -v -DPIC -c test.c
Using built-in specs.
Target: ia64-hp-hpux11.23
Configured with: /tmp/gcc-4.0.2.tar.gz/gcc-4.0.2/configure --host=ia64-hp-hpux11.23 --target=ia64-hp-hpux11.23 --build=ia64-hp-hpux11.23 --prefix=/opt/hp-gcc-4.0.2 --enable-languages=c,c++ --with-gnu-as --without-gnu-ld --with-ld=/usr/ccs/bin/ld --enable-threads=posix
Thread model: posix
gcc version 4.0.2
 /opt/hp-gcc-4.0.2/libexec/gcc/ia64-hp-hpux11.23/4.0.2/cc1 -quiet -v -DPIC test.c -quiet -dumpbase test.c -auxbase test -version -o /var/tmp//ccZzm1H1.s
ignoring nonexistent directory "/opt/hp-gcc-4.0.2/lib/gcc/ia64-hp-hpux11.23/4.0.2/../../../../ia64-hp-hpux11.23/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /opt/hp-gcc-4.0.2/include
 /opt/hp-gcc-4.0.2/lib/gcc/ia64-hp-hpux11.23/4.0.2/include
 /usr/include
End of search list.
GNU C version 4.0.2 (ia64-hp-hpux11.23)
       compiled by GNU C version 4.0.2.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072

/opt/hp-gcc-4.0.2/lib/gcc/ia64-hp-hpux11.23/4.0.2/../../../../ia64-hp-hpux11.23/bin/as -x -o test.o /var/tmp//ccZzm1H1.s


----- Original Message -----
From: <mailto:address@hidden>Kumi Hagimoto
To: <mailto:address@hidden>Sergey Kashyrin
Sent: Thursday, January 22, 2009 5:10 PM
Subject: Re: [open-cobol-list] [OpenCOBOL 1.0] syntax: 2 3 4 5 failed
Hi Sergey,
Please see the attached file.
I'll try to compile the C program like you said and see what I can find out, if anything...
Thanks very much!
Kumi
On Thu, Jan 22, 2009 at 1:49 PM, Sergey Kashyrin <<mailto:address@hidden>address@hidden> wrote:
Hi,

Can you send callee.c.h also - I will try co compile it on other platforms, but basically I don't see anything fansy in this generated callee.c for GCC to complain...
You can try to compile this C program too. Don't remember your exact options, but try
gcc  -I/usr/local/src/open-cobol-1.0/  -I/usr/local/include --shared -o callee callee.c

or whatever necessary to build shared library instead of "--shared"

I see a lot of options set in SHROPT
You can try
echo $COMPILE_MODULE
to see that, as well as
$COMPILE_MODULE  callee.c
to see C errors.

Maybe some option enabled for modules / shared libs has a collision with some C syntax (I have no idea)

SK


----- Original Message -----
From: <mailto:address@hidden>Kumi Hagimoto
To: <mailto:address@hidden>Sergey Kashyrin
Cc: <mailto:address@hidden>Roger While
Sent: Thursday, January 22, 2009 2:51 PM
Subject: Re: [open-cobol-list] [OpenCOBOL 1.0] syntax: 2 3 4 5 failed

Just in case I didn't do something correctly, here's what i did:
(1) removed the "-fnested-functions" from atlocal file (and defaults.h)
(2) Executed run:
Shirochan:/usr/local/src/open-cobol-1.0/tests miyamocha$ sudo ./run
(3) In /usr/local/src/open-cobol-1.0/tests/run.dir/33 ran:
sudo /usr/local/src/open-cobol-1.0/cobc/cobc -m -std=cobol2002 -debug -Wall -C callee.cob
Please see the resulting callee.c (attached).
Regards,
Kumi
On Thu, Jan 22, 2009 at 11:04 AM, Sergey Kashyrin <<mailto:address@hidden>address@hidden> wrote:
Sounds like you can't use -fnested-functions for shared libraries...
Anyway it looks like GCC issue.
Let's revert back removing this -fnested-functions, and rerun the test 33 (or all run tests)
After 33 fails, go to the directory tests/run/033 or something like that.
It should contain callee.cob

Set environment manually, like
. ../../atconfig
. ../../atlocal
and compile this cobol test into C:

$COMPILE_MODULE  -C callee.cob

Send me the resulting callee.c

Sergey

------------------
it was
33. <http://misc.at:84>misc.at:84: testing ...
<http://misc.at:113>misc.at:113: ${COMPILE_MODULE} callee.cob

--- /dev/null 2009-01-22 08:40:24.000000000 -0800
+++ /usr/local/src/open-cobol-1.0/tests/run.dir/at-stderr 2009-01-22 08:40:34.000000000 -0800
@@ -0,0 +1,2 @@
+/tmp/cob29216_0.c: In function 'callee_':
+/tmp/cob29216_0.c:139: error: nested functions are disabled, use -fnested-functions to re-enable
<http://misc.at:113>misc.at:113: exit code was 1, expected 0
33. <http://misc.at:84>misc.at:84: 33. EXTERNAL data item (<http://misc.at:84>misc.at:84): FAILED (<http://misc.at:113>misc.at:113)





----- Original Message -----
From: <mailto:address@hidden>Kumi Hagimoto
To: <mailto:address@hidden>Sergey Kashyrin
Sent: Thursday, January 22, 2009 1:24 PM
Subject: Re: [open-cobol-list] [OpenCOBOL 1.0] syntax: 2 3 4 5 failed
Thank you for that info.
So I tried adding the options to atlocal file as follows:
export COB_CFLAGS="-I${abs_top_srcdir} -I/usr/local/include -I/usr/local/BerkeleyDB.4.7/include -I/opt/local/include  -O2 -fnested-functions"
I get more error after this..
run: 32 33 34 35 47 48 74 75 78 87 88 94 95 104 failed
Any pointer would be appreciated.
Many thanks!!
Kumi
On Thu, Jan 22, 2009 at 10:00 AM, Sergey Kashyrin <<mailto:address@hidden>address@hidden> wrote:
No, that's the correct file and that's for your "default" when you will work in the future with "COB_CFLAGS" not defined in environment.
For the tests you still need to edit tests/atlocal

----- Original Message -----
From: <mailto:address@hidden>Kumi Hagimoto
To: <mailto:address@hidden>Sergey Kashyrin
Sent: Thursday, January 22, 2009 12:29 PM
Subject: Re: [open-cobol-list] [OpenCOBOL 1.0] syntax: 2 3 4 5 failed
I unpacked the OpenCobol tar in /usr/local/src/open-cobol-1.0.
Are you referring to the defaults.h in that same directory?  I tried adding the option you mentioned as follows:
#define COB_CFLAGS       "-I/usr/local/include -I/usr/local/BerkeleyDB.4.7/include -I/opt/local/include  -O2 -fnested-functions "
but I still get the same error.  Am I editing the wrong file?
Thanks!
Kumi
On Thu, Jan 22, 2009 at 8:58 AM, Sergey Kashyrin <<mailto:address@hidden>address@hidden> wrote:
That's the issue of your GCC settings
Add "-fnested-functions" into COB_CFLAGS of the same tests/atlocal (or maybe it's a good idea to put it into default.h and rebuild cobc)

----- Original Message -----
From: <mailto:address@hidden>Kumi Hagimoto
To: <mailto:address@hidden>Sergey Kashyrin
Sent: Thursday, January 22, 2009 11:50 AM
Subject: Re: [open-cobol-list] [OpenCOBOL 1.0] syntax: 2 3 4 5 failed
Thanks very much for a quick reply!
Almost all tests ran successfully.
I still get three "run" failure:  "run: 33 34 35 failed".
Could you look at them, or should I submit another one to the list?
Regards,
Kumi
On Thu, Jan 22, 2009 at 8:35 AM, Sergey Kashyrin <<mailto:address@hidden>address@hidden> wrote:
As I see most of the problems are connected to unrecognized option "-R/opt/local/lib", and it's a configutation/configure issue.
You can try to edit tests/atlocal file to adjust the settings, at least to replace this by -L/opt/local/lib

Regards,
Sergey

----- Original Message -----
From: <mailto:address@hidden>Kumi Hagimoto
To: <mailto:address@hidden>address@hidden
Sent: Thursday, January 22, 2009 11:18 AM
Subject: [open-cobol-list] [OpenCOBOL 1.0] syntax: 2 3 4 5 failed
Please see



reply via email to

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