- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Error: ld: Duplicate symbol "sqlca" in files
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2007 03:59 AM
тАО02-25-2007 03:59 AM
Error: ld: Duplicate symbol "sqlca" in files
I am running into the exact same issue that was discussed earlier in the forum. However, the options specified and solutions suggested does not seem to work for me.
Here is my aCC environment:
/opt/aCC/bin/aCC:
$Revision: 92453-07 linker linker crt0.o B.11.37 040218 $
HP aC++ B3910B A.03.65
HP aC++ B3910B A.03.52 Language Support Library
and ld environment:
/opt/aCC/bin/aCC:
$Revision: 92453-07 linker linker crt0.o B.11.37 040218 $
HP aC++ B3910B A.03.65
HP aC++ B3910B A.03.52 Language Support Library
I tried the options of passing -Wl,-hsqlca
--> No change. Keep getting the Duplicate symbol error.
Tried passing +allowdups
--> that option is not recognized.
As Peter Gordon had mentioned in his first posting at http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=72147&admit=-682735245+1172421739710+28353475
These are coming in from two files that are written in ProC and have to use sqlca.
Anyone who has run into this issue and resolved this, if they could post the resolution will be VERY helpful.. :-)
Thanks in advance....
-RK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2007 08:36 AM
тАО02-26-2007 08:36 AM
Re: Error: ld: Duplicate symbol "sqlca" in files
>and ld environment:
Why repeat the aCC version twice, just say you use aCC to link.
>I tried the options of passing -Wl,-hsqlca
--> No change. Keep getting the Duplicate symbol error.
The only way this will work is if you use ld -r and that -h option on one of the objects. And that sqlca are really separate objects and shouldn't have the same address. This doesn't seem correct because Pro*C would have made them static. So perhaps a better solution is to change all but one into extern.
>Tried passing +allowdups
--> that option is not recognized.
This is a ld option, so you need: -Wl,+allowdups
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2007 01:39 PM
тАО02-26-2007 01:39 PM
Re: Error: ld: Duplicate symbol "sqlca" in files
Agreed! would have been enough to say I use aCC :-)
I tried passing it down to the linker using the -Wl option (before posting this originally) but that did not seem to work
and it was ill complaining about unrecognized option.
<
That would make sense but I think the way Oracle has designed it is not that way.. (my understanding)....
<
sqlca is defined in a header file provided by Oracle. You either include it or do not. If I take that header file and hack it in, it is not going to be portable going forward.... and we could run into issues migrating to future releases. Any ideas on how I can cirumvent that?
This dups issue does not happen if I use the Ae option of aCC. I cannot use just Ae, since we are migrating from 32 to 64-bit and BEA-Tuxedo is involved in the mix.
Thank you,
-RK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2007 02:16 PM
тАО02-26-2007 02:16 PM
Re: Error: ld: Duplicate symbol "sqlca" in files
http://forums1.itrc.hp.com/service/forums/helptips.do?#33
>That would make sense but I think the way Oracle has designed it is not that way.. (my understanding)....
So you think they should be separate or not? In C they would be shared.
>Any ideas on how I can cirumvent that?
Change the header to make it extern. Create another file that defines it and use a different header?? Is this an array? Is it initialized in multiple files? Or just assigned in each? Or better yet, compile one C source that includes the header.
You could use conditional compilation to add the "extern" for just C++. I probably would make sense to talk to Oracle to see what they say. You can't be the first with this problem.
>This dups issue does not happen if I use the -Ae option of aCC. I cannot use just -Ae, since we are migrating from 32 to 64-bit and BEA-Tuxedo is involved in the mix.
-Ae says to use C vs C++. I'm not sure what the change from +DD32 to +DD64 has to do with what language you use.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-26-2007 02:45 PM
тАО02-26-2007 02:45 PM
Re: Error: ld: Duplicate symbol "sqlca" in files
Oracle has provided the include file and they have everything inside it to handle these issues. It was really dumb or me not to look at and try to understand what it was doing.
All you got to do is to use Oracle's:
EXEC SQL INCLUDE SQLCA everywhere instead of the #include
That way, you leave it to Oracle's Preprocessor to generate the correct C code for you...
Dennis... thanks much for the reply and helping me re-think and look. Appreciate it :-)
-RK