AIX relink warning
I've just relinked Oracle Instant Client 12.1's libclntsh.so, it seems working, but I get annoying warnings I'd like not to get.
before Code:
# dump -H -X64 libclntsh.so.orig Code:
# dump -H -X64 libclntsh.so Code:
# make libclntsh.so |
since there was no answer:
version mismatch problem, among libs/headers. Probably one (a few) of those libs were compiled with different flags/headers.. |
It went worse
I've just found out, that my instantclient!libclntsh.so contains BIO_* entries that should exist in openssl!libcrypto.so
It's quite disturbing. Here is what's happened to poor PHP: Code:
$ grep BIO libphp7.so.imports |
A possible fix (part of the Makefile):
Code:
DONT_EXPORT_THESE := ^(BIO_|ERR_|SSLv23_|SSLv3_|TLSv1_|ssl23_|ssl3_|ssl_|tls1_|BZ2_|inflate|deflate) |
This problem might be related with this: aix6 / 64-bit / Apache / libphp5 / dlopen problem
|
I think I should create the export-list this-way:
Code:
dump -Tv -X64 libclntsh.so.orig | |
that is better with an awk:
Code:
dump | awk '/ EXP / { print $6 }' | sort |
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:
libclntsh.so, libons.so and libclntshcore.so in the directory Quote:
|
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. |
Since then, I improved the export-list creating command to cover EXP, wEXP, ImpExp and wImpExp: http://web.axelero.hu/lzsiga/explist_so
|
|
Thanks for the update. Always a hassle when links "move".
|
All times are GMT -5. The time now is 03:31 AM. |