AIXThis forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
# make libclntsh.so
ld -b64 -r -o libclntsh.o -bnso ../lib/libclntsh.so.orig
explist ../lib/libclntsh.so.orig >libclntsh.exp
ld -b64 -G -bernotok -bnoentry -brtl -bbigtoc -bE:libclntsh.exp -o libclntsh.so \
libclntsh.o \
/orabin/instantclient/lib64/libons.so \
/orabin/instantclient/lib64/libclntshcore.so \
/usr/lib/libperfstat.a \
/usr/lib/libpthreads.a \
/usr/lib/libdl.a \
/usr/lib/libc.a \
-bI:/usr/lib/iocp.exp
ld: 0711-224 WARNING: Duplicate symbol: .bcopy
ld: 0711-224 WARNING: Duplicate symbol: .fsav
ld: 0711-224 WARNING: Duplicate symbol: .fres
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
ld: 0711-773 WARNING: Object libclntsh.o, imported symbol slts_runmode
Symbol was expected to be local. Extra instructions
are being generated to reference the symbol.
ld: 0711-773 WARNING: Object libclntsh.o, imported symbol lxdobl
Symbol was expected to be local. Extra instructions
are being generated to reference the symbol.
ld: 0711-773 WARNING: Object libclntsh.o, imported symbol slfitcl
Symbol was expected to be local. Extra instructions
are being generated to reference the symbol.
ld: 0711-773 WARNING: Object libclntsh.o, imported symbol slfitlb
Symbol was expected to be local. Extra instructions
are being generated to reference the symbol.
ld: 0711-773 WARNING: Object libclntsh.o, imported symbol timezone
Symbol was expected to be local. Extra instructions
are being generated to reference the symbol.
echo 'If you are brave enough, you might copy libclntsh.so into ../lib'
If you are brave enough, you might copy libclntsh.so into ../lib
The 0711-773 warnings bug me; google proves than many people got those, but I couldn't find the solution.
since there was no answer:
version mismatch problem, among libs/headers. Probably one (a few) of those libs were compiled with different flags/headers..
I worked at a company than ran AIX for about a year and I had never-ending problems trying to get things to compile correctly on it. The fact that I didn't have root access and the people that did worked in an office like 2,000 miles away didn't help either!
relinking - better - dealing with two types of warnings:
ld: 0711-224 WARNING: Duplicate symbol: .fres
ld: 0711-773 WARNING: Object libclntsh.o, imported symbol slts_runmode
Symbol was expected to be local. Extra instructions
are being generated to reference the symbol.
And first - I highly recommend using the hint given to understand what may be the root cause of the warning:
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
First of all, "Duplicate symbol" means that there are multiple objects (shared/static) that could resolve a symbol. If you know the code is equal (same code but in multiple archives aka .a files), not pretty, but harmless. If I recall correctly (irrc), -bloadmap will tell you which one is actually expected to be used.
Personally, I see these messages as a way to track down embedded library code that I actually want to not be embedded. So, as long as you are aware this is not an AIX problem - this is a packaging or build problem because the files offered as "resolvers" have multiple definitions and/or the expectation is that the symbol is supposed to be local (or static) but has been set to exported.
In any case, to get an idea of what your target "libclntsh.so" use the command
dump -Tv libclntsh.so
There is more that I am going to research - and I shall add, later, roughly, an explanation of what the commands are doing, and why, additional research, imho, is a necessity when warnings such as these appear.
Quick question: where did you get the files (source files) to create the "object" libclntsh.o ?
Anyway, seeing that the original poster was from 2015 - modifying how I move forward.
Basically, my guess that the "relink" was needed was because the directory
Quote:
/ade/b/1630515813/oracle/lib
did not exist, or was not generally available AND the poster wanted to have the libraries
libclntsh.so, libons.so and libclntshcore.so in the directory
Quote:
/orabin/instantclient/lib64
The warning messages are not being caused by the AIX files in /usr/lib or /unix. The warnings are coming from information in the files: libclntsh.so, libons.so and libclntshcore.so
Well, the core of the problems is that AIX is an exotic platform with many unique features. Anyways, I tried to write something about these questions: http://web.axelero.hu/lzsiga/aix-linking.html
Well, I see you have done some homework. I'll remember it when I try to explain what it means to support the GNU ecosystem on your own (perhaps the main reason I use xlc rather than gcc, and when I cannot use gcc - I pass).
PHP is special. No idea why, but it has required a lot of manual intervention since the first time I worked on a build for AIX with php-4.0.4.
re: the loader flags - many of them that you quote are automatic aka default. Several of the ones you mention are extremely useful when you are doing something non-standard. These days, imho, anything in /usr/local is, read: should be treated as, an exception.
And to get back to exotic - good exotic or bad exotic (as in (poorly translated?) Dutch saying, the farmer does not eat what he does not know/grow).
I like to think of AIX as forgiving. When you are doing something dangerous: it warns and goes on if it can, and gives an error when it cannot. I prefer the warnings to no message (as in, he I got it done - not going to mention any potential conflicts) - ah, yes, there is the non-default -q flag for gcc to report all errors (-qerror=all, or something like that. I see it hardwired in many Makefiles.)
Every platform has it's idiosyncrasies - it is what makes them identifiable. Linux is fine, GNU is fine - but you have to learn to "think": Linix, GNU, POSIX, UNIX, HP-UX, Solaris, Tru64 and even AIX. AIX is the "one of those" I know best - but I try to respect all of them. "Smarter people than I" made decisions on all of these. That I do not agree all the time (or understand them immediately) does not make the wrong.
I'll re-read your post and maybe do a re-write more to my style. I normally do not refer to my portal - but you can see how I write at http://www.rootvg.net
Thanks for the conversation! You are helping me to improve on what I know! I appreciate that.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.