dbTalk Databases Forums  

[Info-Ingres] abf problems on fortran program

comp.databases.ingres comp.databases.ingres


Discuss [Info-Ingres] abf problems on fortran program in the comp.databases.ingres forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Martin Bowes
 
Posts: n/a

Default [Info-Ingres] abf problems on fortran program - 01-21-2009 , 09:22 AM






Hi All,



I'm trying to relocate a database and its applications from a VMS box
running II2.6 to a linux box running 9.1.1.



By and large it seems to have gone well, but I have a fortran procedure
returning integer which refuses to compile in the Linux version.



Any advice would be appreciated.



Attachment hold the source.



Errors are as follows:

Compiling 'add_cr.sf' . . .

E_AB001E Compilation failed

The compilation of '/user/ingres/dba/addtrial/add_cr.sf' failed with

status '1'. This could mean either that the compiler could not be
run

or that it ran and returned an error.



ESQL add_cr.sf:

add_cr.f: In function `add_cr':

add_cr.f:13:

parameter (carriage_return = char(13))

^

Invalid declaration of or reference to symbol `char' at (^) [initially
seen at (^)]

add_cr.f:18:

open (unit = main_channel, file = filename, status = 'old',

^

Unsupported OPEN control item at (^) -- ACTION=, ASSOCIATEVARIABLE=,
BLOCKSIZE=, BUFFERCOUNT=, CARRIAGECONTROL=, DEFAULTFILE=, DELIM=,
DISPOSE=, EXTENDSIZE=, INITIALSIZE=, KEY=, MAXREC=, NOSPANBLOCKS,
ORGANIZATION=, PAD=, POSITION=, READONLY=, RECORDTYPE=, SHARED=, and
USEROPEN= are not supported

add_cr.f:21:

open (unit = temp_channel, file = filename//'tmp',

1 2

Concatenation operator at (2) must operate on two scalar (not array)
subexpressions, two function invocations returning character scalars, or
a combination of both -- but the subexpression at (1) is of
indeterminate length

add_cr.f:21:

open (unit = temp_channel, file = filename//'tmp',

1

add_cr.f:23: (continued):

1 status = 'scratch', carriagecontrol = 'list',

2

Conflicting I/O control specifications at (1) and (2)

add_cr.f:21:

open (unit = temp_channel, file = filename//'tmp',

^

Unsupported OPEN control item at (^) -- ACTION=, ASSOCIATEVARIABLE=,
BLOCKSIZE=, BUFFERCOUNT=, CARRIAGECONTROL=, DEFAULTFILE=, DELIM=,
DISPOSE=, EXTENDSIZE=, INITIALSIZE=, KEY=, MAXREC=, NOSPANBLOCKS,
ORGANIZATION=, PAD=, POSITION=, READONLY=, RECORDTYPE=, SHARED=, and
USEROPEN= are not supported

add_cr.f:45:

open (unit = main_channel, file = filename, status = 'old',

^

Unsupported OPEN control item at (^) -- ACTION=, ASSOCIATEVARIABLE=,
BLOCKSIZE=, BUFFERCOUNT=, CARRIAGECONTROL=, DEFAULTFILE=, DELIM=,
DISPOSE=, EXTENDSIZE=, INITIALSIZE=, KEY=, MAXREC=, NOSPANBLOCKS,
ORGANIZATION=, PAD=, POSITION=, READONLY=, RECORDTYPE=, SHARED=, and
USEROPEN= are not supported

Compilation failed.



Martin Bowes



Reply With Quote
  #2  
Old   
Martin Bowes
 
Posts: n/a

Default Re: [Info-Ingres] abf problems on fortran program - 01-22-2009 , 06:51 AM






Hi All,



After some hacking and reading of manuals and consulting venerable
Fortran Gurus...I've managed to get the blasted thing to compile.



Sadly when I attempt to build the application image I get link errors:

abextract.obj.data+0x1728): undefined reference to `add_cr'

add_cr.obj: In function `add_cr__':add_cr.f.text+0x4c): undefined
reference to `f_open'

:add_cr.f.text+0x69): undefined reference to `f_open'

:add_cr.f.text+0xa4): undefined reference to `s_rsfe'

:add_cr.f.text+0xd0): undefined reference to `do_fio'

:add_cr.f.text+0xeb): undefined reference to `e_rsfe'

....etc...



Anyone got any idea about these?



Marty



From: Martin Bowes
Sent: 21 January 2009 15:22
To: 'Ingres and related product discussion forum'
Subject: abf problems on fortran program



Hi All,



I'm trying to relocate a database and its applications from a VMS box
running II2.6 to a linux box running 9.1.1.



By and large it seems to have gone well, but I have a fortran procedure
returning integer which refuses to compile in the Linux version.



Any advice would be appreciated.



Attachment hold the source.



Errors are as follows:

Compiling 'add_cr.sf' . . .

E_AB001E Compilation failed

The compilation of '/user/ingres/dba/addtrial/add_cr.sf' failed with

status '1'. This could mean either that the compiler could not be
run

or that it ran and returned an error.



ESQL add_cr.sf:

add_cr.f: In function `add_cr':

add_cr.f:13:

parameter (carriage_return = char(13))

^

Invalid declaration of or reference to symbol `char' at (^) [initially
seen at (^)]

add_cr.f:18:

open (unit = main_channel, file = filename, status = 'old',

^

Unsupported OPEN control item at (^) -- ACTION=, ASSOCIATEVARIABLE=,
BLOCKSIZE=, BUFFERCOUNT=, CARRIAGECONTROL=, DEFAULTFILE=, DELIM=,
DISPOSE=, EXTENDSIZE=, INITIALSIZE=, KEY=, MAXREC=, NOSPANBLOCKS,
ORGANIZATION=, PAD=, POSITION=, READONLY=, RECORDTYPE=, SHARED=, and
USEROPEN= are not supported

add_cr.f:21:

open (unit = temp_channel, file = filename//'tmp',

1 2

Concatenation operator at (2) must operate on two scalar (not array)
subexpressions, two function invocations returning character scalars, or
a combination of both -- but the subexpression at (1) is of
indeterminate length

add_cr.f:21:

open (unit = temp_channel, file = filename//'tmp',

1

add_cr.f:23: (continued):

1 status = 'scratch', carriagecontrol = 'list',

2

Conflicting I/O control specifications at (1) and (2)

add_cr.f:21:

open (unit = temp_channel, file = filename//'tmp',

^

Unsupported OPEN control item at (^) -- ACTION=, ASSOCIATEVARIABLE=,
BLOCKSIZE=, BUFFERCOUNT=, CARRIAGECONTROL=, DEFAULTFILE=, DELIM=,
DISPOSE=, EXTENDSIZE=, INITIALSIZE=, KEY=, MAXREC=, NOSPANBLOCKS,
ORGANIZATION=, PAD=, POSITION=, READONLY=, RECORDTYPE=, SHARED=, and
USEROPEN= are not supported

add_cr.f:45:

open (unit = main_channel, file = filename, status = 'old',

^

Unsupported OPEN control item at (^) -- ACTION=, ASSOCIATEVARIABLE=,
BLOCKSIZE=, BUFFERCOUNT=, CARRIAGECONTROL=, DEFAULTFILE=, DELIM=,
DISPOSE=, EXTENDSIZE=, INITIALSIZE=, KEY=, MAXREC=, NOSPANBLOCKS,
ORGANIZATION=, PAD=, POSITION=, READONLY=, RECORDTYPE=, SHARED=, and
USEROPEN= are not supported

Compilation failed.



Martin Bowes



Reply With Quote
  #3  
Old   
MikeT
 
Posts: n/a

Default Re: abf problems on fortran program - 01-22-2009 , 12:12 PM



On Jan 22, 7:51*am, "Martin Bowes" <martin.bo... (AT) ctsu (DOT) ox.ac.uk> wrote:
Quote:
Hi All,

After some hacking and reading of manuals and consulting venerable
Fortran Gurus...I've managed to get the blasted thing to compile.

Sadly when I attempt to build the application image I get link errors:

[snip]
:add_cr.f.text+0x69): undefined reference to `f_open'
:add_cr.f.text+0xa4): undefined reference to `s_rsfe'
:add_cr.f.text+0xd0): undefined reference to `do_fio'
:add_cr.f.text+0xeb): undefined reference to `e_rsfe'

...etc...

Anyone got any idea about these?

Marty
Marty,

IIRC abf compilation uses sepfortr, or maybe it's just for testing? At
any rate, a sample run is below.

$ sepfortr quel apxd
EQUEL apxd:
/usr/bin/f77 -o apxd.exe apxd.f -rdynamic /devsrc/main/toumi01/install/
build/ingres/lib/libingres.a -lpthread -lrt -lm -lc -lcrypt -ldl /lib/
libgcc_s.so.1

The unresolved symbols you listed should be in libg2c.a, and I'm under
the impression that g77 (a.k.a. f77) will use this without any -l
specification needed.

That said, since I'm under 60 years old, I'm no FORTRAN guru.

MikeT


Reply With Quote
  #4  
Old   
Martin Bowes
 
Posts: n/a

Default Re: [Info-Ingres] abf problems on fortran program - 01-23-2009 , 08:05 AM



Hi Mike,

I have a two possibilities:
1. /usr/lib/gcc-lib/x86_64-redhat-linux/3.2.3/libg2c.a
2. /usr/lib/gcc-lib/x86_64-redhat-linux/3.2.3/32/libg2c.a

I'm running on II 9.1.1 (a64.lnx/105)NPTL so I assumed I needed the former.
I altered abflnk.opt to include:
-L/usr/lib/gcc-lib/x86_64-redhat-linux/3.2.3
-lg2c

The abfimage command has now resolved almost all the undefined references...
Building runnable image of addtrial . . .
abextract.obj.data+0x1728): undefined reference to `add_cr'
collect2: ld returned 1 exit status
E_AB0020 Link failed
The link failed with status '69891'. This could mean either that the
linker could not be run or that it ran and returned an error.

But add_cr is the name of the fortran procedure that caused all this nonsense to begin with.

So I blew away the abf directory holding the application and rebuilt the image...and got the same result.

I can't find an abextract.* program in the source or in the application definition. What is it and why is it pissing me off?

Marty

-----Original Message-----
From: info-ingres-bounces (AT) kettleriver...ting (DOT) com [mailto:info-ingres-bounces (AT) kettleriverconsulting (DOT) com] On Behalf Of MikeT
Sent: 22 January 2009 18:12
To: info-ingres (AT) kettleriverconsulting (DOT) com
Subject: Re: [Info-Ingres] abf problems on fortran program

On Jan 22, 7:51*am, "Martin Bowes" <martin.bo... (AT) ctsu (DOT) ox.ac.uk> wrote:
Quote:
Hi All,

After some hacking and reading of manuals and consulting venerable
Fortran Gurus...I've managed to get the blasted thing to compile.

Sadly when I attempt to build the application image I get link errors:

[snip]
:add_cr.f.text+0x69): undefined reference to `f_open'
:add_cr.f.text+0xa4): undefined reference to `s_rsfe'
:add_cr.f.text+0xd0): undefined reference to `do_fio'
:add_cr.f.text+0xeb): undefined reference to `e_rsfe'

...etc...

Anyone got any idea about these?

Marty
Marty,

IIRC abf compilation uses sepfortr, or maybe it's just for testing? At
any rate, a sample run is below.

$ sepfortr quel apxd
EQUEL apxd:
/usr/bin/f77 -o apxd.exe apxd.f -rdynamic /devsrc/main/toumi01/install/
build/ingres/lib/libingres.a -lpthread -lrt -lm -lc -lcrypt -ldl /lib/
libgcc_s.so.1

The unresolved symbols you listed should be in libg2c.a, and I'm under
the impression that g77 (a.k.a. f77) will use this without any -l
specification needed.

That said, since I'm under 60 years old, I'm no FORTRAN guru.

MikeT
_______________________________________________
Info-Ingres mailing list
Info-Ingres (AT) kettleriverconsulting (DOT) com
http://www.kettleriverconsulting.com...fo/info-ingres



Reply With Quote
  #5  
Old   
nikosv
 
Posts: n/a

Default Re: abf problems on fortran program - 01-23-2009 , 10:54 AM



On Jan 23, 4:05*pm, "Martin Bowes" <martin.bo... (AT) ctsu (DOT) ox.ac.uk> wrote:
Quote:
Hi Mike,

I have a two possibilities:
1. /usr/lib/gcc-lib/x86_64-redhat-linux/3.2.3/libg2c.a
2. /usr/lib/gcc-lib/x86_64-redhat-linux/3.2.3/32/libg2c.a

I'm running on II 9.1.1 (a64.lnx/105)NPTL so I assumed I needed the former.
I altered abflnk.opt to include:
* * * * -L/usr/lib/gcc-lib/x86_64-redhat-linux/3.2.3
* * * * -lg2c

The abfimage command has now resolved almost all the undefined references....
Building runnable image of addtrial . . .
abextract.obj.data+0x1728): undefined reference to `add_cr'
collect2: ld returned 1 exit status
E_AB0020 Link failed
* * The link failed with status '69891'. *This could mean either that the
* * linker could not be run or that it ran and returned an error.

But add_cr is the name of the fortran procedure that caused all this nonsense to begin with.

So I blew away the abf directory holding the application and rebuilt the image...and got the same result.

I can't find an abextract.* program in the source or in the application definition. What is it and why is it pissing me off?

Marty

-----Original Message-----
From: info-ingres-boun... (AT) kettleriverconsulting (DOT) com [mailto:info-ingres-boun... (AT) kettleriverconsulting (DOT) com] On Behalf Of MikeT
Sent: 22 January 2009 18:12
To: info-ing... (AT) kettleriverconsulting (DOT) com
Subject: Re: [Info-Ingres] abf problems on fortran program

On Jan 22, 7:51*am, "Martin Bowes" <martin.bo... (AT) ctsu (DOT) ox.ac.uk> wrote:
Hi All,

After some hacking and reading of manuals and consulting venerable
Fortran Gurus...I've managed to get the blasted thing to compile.

Sadly when I attempt to build the application image I get link errors:

[snip]
:add_cr.f.text+0x69): undefined reference to `f_open'
:add_cr.f.text+0xa4): undefined reference to `s_rsfe'
:add_cr.f.text+0xd0): undefined reference to `do_fio'
:add_cr.f.text+0xeb): undefined reference to `e_rsfe'

...etc...

Anyone got any idea about these?

Marty

Marty,

IIRC abf compilation uses sepfortr, or maybe it's just for testing? At
any rate, a sample run is below.

$ sepfortr quel apxd
EQUEL apxd:
/usr/bin/f77 -o apxd.exe apxd.f -rdynamic /devsrc/main/toumi01/install/
build/ingres/lib/libingres.a -lpthread -lrt -lm -lc -lcrypt -ldl /lib/
libgcc_s.so.1

The unresolved symbols you listed should be in libg2c.a, and I'm under
the impression that g77 (a.k.a. f77) will use this without any -l
specification needed.

That said, since I'm under 60 years old, I'm no FORTRAN guru.

MikeT
_______________________________________________
Info-Ingres mailing list
Info-Ing... (AT) kettleriverconsulting (DOT) comhttp://www.kettleriverconsulting.com/mailman/listinfo/info-ingres
I was in a similar migration situation with a C procedure some time
ago and was getting the same error.
Please take a look at my post, just in case that it can help
http://groups.google.com/group/comp....ec53592a5fc7fb


Reply With Quote
  #6  
Old   
Michael Touloumtzis
 
Posts: n/a

Default Re: abf problems on fortran program - 01-27-2009 , 01:31 PM



On Jan 23, 9:05*am, "Martin Bowes" <martin.bo... (AT) ctsu (DOT) ox.ac.uk> wrote:
Quote:
Hi Mike,

I have a two possibilities:
1. /usr/lib/gcc-lib/x86_64-redhat-linux/3.2.3/libg2c.a
2. /usr/lib/gcc-lib/x86_64-redhat-linux/3.2.3/32/libg2c.a

I'm running on II 9.1.1 (a64.lnx/105)NPTL so I assumed I needed the former.
I altered abflnk.opt to include:
* * * * -L/usr/lib/gcc-lib/x86_64-redhat-linux/3.2.3
* * * * -lg2c

The abfimage command has now resolved almost all the undefined references....
Building runnable image of addtrial . . .abextract.obj.data+0x1728): undefined reference to `add_cr'
collect2: ld returned 1 exit status
E_AB0020 Link failed
* * The link failed with status '69891'. *This could mean either that the
* * linker could not be run or that it ran and returned an error.

But add_cr is the name of the fortran procedure that caused all this nonsense to begin with.

So I blew away the abf directory holding the application and rebuilt the image...and got the same result.

I can't find anabextract.* program in the source or in the application definition. What is it and why is it pissing me off?

Marty
Marty,

Still fighting this battle?

The abextract program is generated by abf. As for add_cr, I assume
your program is generating that link need? Is this for a crypto
function?

MikeT


Reply With Quote
  #7  
Old   
Martin Bowes
 
Posts: n/a

Default Re: [Info-Ingres] abf problems on fortran program - 01-28-2009 , 09:31 AM



Hi Mike,


Quote:
Still fighting this battle?
Yes. Plus I decided to raise an issue with the Corp about this as well.


Quote:
The abextract program is generated by abf.
Guessed that bit.

Quote:
As for add_cr, I assume your program is generating that link need?
Is this for a crypto function?
It must be. But add_cr is not a crypto function, its actually taking a
report and making sure there are carriage returns at the end of the
lines. I'm not sure why its necessary, it might be something peculiar to
VMS, but given that its part of the application I'm hesitant to try and
unpick it at this point.

Marty




Reply With Quote
  #8  
Old   
OldSchool
 
Posts: n/a

Default Re: abf problems on fortran program - 01-29-2009 , 10:37 AM



On Jan 28, 10:31*am, "Martin Bowes" <martin.bo... (AT) ctsu (DOT) ox.ac.uk>
wrote:
Quote:
Hi Mike,

Still fighting this battle?

Yes. Plus I decided to raise an issue with the Corp about this as well.

The abextract program is generated by abf.

Guessed that bit.

As for add_cr, I assume your program is generating that link need?
Is this for a crypto function?

It must be. But add_cr is not a crypto function, its actually taking a
report and making sure there are carriage returns at the end of the
lines. I'm not sure why its necessary, it might be something peculiar to
VMS, but given that its part of the application I'm hesitant to try and
unpick it at this point.

Marty
this may have been asked elsewhere, if so apologies....

so add_cr has been defined in the abf app as a procedure, with the
correct return type?


Reply With Quote
  #9  
Old   
Martin Bowes
 
Posts: n/a

Default Re: [Info-Ingres] abf problems on fortran program - 01-30-2009 , 05:13 AM



Hi Scott et al,

Well done to Kristoff Picard in Tech support, who pointed out that due to a quirk in the g77 compiler the object was defined with a trailing underscore! So all I had to do was edit the procedure definition and alter the 'Symbol' field to inclde the trailing underscrore.

But, g77 wasn't quite done with us...the name add_cr already has an underscore, so g77 defines a symbol with TWO trailing underscores!!

A quick edit of the Symbol field to 'add_cr__' and now the blasted thing links beautifully!

Yay Team! Now that's why I pay for support!

Marty

-----Original Message-----
From: info-ingres-bounces (AT) kettleriver...ting (DOT) com [mailto:info-ingres-bounces (AT) kettleriverconsulting (DOT) com] On Behalf Of OldSchool
Sent: 29 January 2009 16:38
To: info-ingres (AT) kettleriverconsulting (DOT) com
Subject: Re: [Info-Ingres] abf problems on fortran program

On Jan 28, 10:31*am, "Martin Bowes" <martin.bo... (AT) ctsu (DOT) ox.ac.uk>
wrote:
Quote:
Hi Mike,

Still fighting this battle?

Yes. Plus I decided to raise an issue with the Corp about this as well.

The abextract program is generated by abf.

Guessed that bit.

As for add_cr, I assume your program is generating that link need?
Is this for a crypto function?

It must be. But add_cr is not a crypto function, its actually taking a
report and making sure there are carriage returns at the end of the
lines. I'm not sure why its necessary, it might be something peculiar to
VMS, but given that its part of the application I'm hesitant to try and
unpick it at this point.

Marty
this may have been asked elsewhere, if so apologies....

so add_cr has been defined in the abf app as a procedure, with the
correct return type?
_______________________________________________
Info-Ingres mailing list
Info-Ingres (AT) kettleriverconsulting (DOT) com
http://www.kettleriverconsulting.com...fo/info-ingres



Reply With Quote
  #10  
Old   
nikosv
 
Posts: n/a

Default Re: abf problems on fortran program - 01-30-2009 , 05:52 AM



On 30 Ιαν, 13:13, "Martin Bowes" <martin.bo... (AT) ctsu (DOT) ox.ac.uk> wrote:
Quote:
Hi Scott et al,

Well done to Kristoff Picard in Tech support, who pointed out that due toa quirk in the g77 compiler the object was defined with a trailing underscore! So all I had to do was edit the procedure definition and alter the 'Symbol' field to inclde the trailing underscrore.

But, g77 wasn't quite done with us...the name add_cr already has an underscore, so g77 defines a symbol with TWO trailing underscores!!

A quick edit of the Symbol field to 'add_cr__' and now the blasted thing links beautifully!

Yay Team! Now that's why I pay for support!

Marty

-----Original Message-----
From: info-ingres-boun... (AT) kettleriverconsulting (DOT) com [mailto:info-ingres-boun... (AT) kettleriverconsulting (DOT) com] On Behalf Of OldSchool
Sent: 29 January 2009 16:38
To: info-ing... (AT) kettleriverconsulting (DOT) com
Subject: Re: [Info-Ingres] abf problems on fortran program

On Jan 28, 10:31Â*am, "Martin Bowes" <martin.bo... (AT) ctsu (DOT) ox.ac.uk
wrote:
Hi Mike,

Still fighting this battle?

Yes. Plus I decided to raise an issue with the Corp about this as well.

The abextract program is generated by abf.

Guessed that bit.

As for add_cr, I assume your program is generating that link need?
Is this for a crypto function?

It must be. But add_cr is not a crypto function, its actually taking a
report and making sure there are carriage returns at the end of the
lines. I'm not sure why its necessary, it might be something peculiar to
VMS, but given that its part of the application I'm hesitant to try and
unpick it at this point.

Marty

this may have been asked elsewhere, if so apologies....

so add_cr has been defined in the abf app as a procedure, with the
correct return type?
_______________________________________________
Info-Ingres mailing list
Info-Ing... (AT) kettleriverconsulting (DOT) comhttp://www.kettleriverconsulting.com/mailman/listinfo/info-ingres
great!!
it seems that it was a naming conflict like the IIseterr and iiseterr
case.
Thanks for replying as I got more insight on it;I will check the
compilers on the machines that the problem occurred


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.