Add shared members from library to same library in a different directory
I'm trying to install libiconv to AIX 7.1 from an rpm off of the perzl site. The rpm appears to install but I get this error message.
How do I go about adding these shared members to the /opt/freeware/lib/libiconv.a?
Edit: my first thought is to link the two using ln as below, but I would appreciate anyone's input.
Thanks!
Moderator's Comments:
Please view this code tag video for how to use code tags when posting code and data.
Last edited by kneemoe; 06-29-2012 at 11:17 AM..
Reason: code tags
I'm trying to install libiconv to AIX 7.1 from an rpm off of the perzl site. The rpm appears to install but I get this error message.
How do I go about adding these shared members to the /opt/freeware/lib/libiconv.a?
Edit: my first thought is to link the two using ln as below, but I would appreciate anyone's input.
Thanks!
Adding that link didn't work. I get the following error when I try to do a make of php 5.3.14
I then did a 'make clean' (specifying the full path of make again, so as to not use AIX's make) and then removed the link and reinstalled the libiconv rpm.
I then used the same configure args above and run into the following
I've also tried building it just using AIX's compiler, contrary to all the write-ups I've seen, but that always fails with the following:
Any suggestions?
EDIT: the basic instructions I've been going off of are here - ibm.com/developerworks/wikis/display/WikiPtype/aixopen
Last edited by kneemoe; 07-09-2012 at 11:19 AM..
Reason: adding the ibm.com AMP instructions
I wonder why it doesn't suffice to add the library and its path to the "LIBPATH" (or similar) environment variable, so that it is found when needed. I don't know if using softlinks instead has any chance of working, but it "feels wrong" from the start IMHO.
Use the ar command to extract the mentioned objects from the library /usr/lib/libiconv.a, then put them into the library /opt/freeware/lib/libiconv.a. If this library doesn't exist create it from scratch. This should work.
See the man page of ar for details and the AIX compiler reference manual for details about the linkage editor of the Xlc compiler.
I wonder why it doesn't suffice to add the library and its path to the "LIBPATH" (or similar) environment variable, so that it is found when needed. I don't know if using softlinks instead has any chance of working, but it "feels wrong" from the start IMHO.
...
bakunin
After digging into this a little further it is (now) my understanding that the libraries are slightly different, so linking or pointing to the /usr/lib by updating the variable creates a mess when I try to get something to compile using the GNU libiconv.
I'll try your suggestion using ar shortly and update the thread accordingly. Thank you for your help,
Dan
I am running into the exact same problem when trying to compile PHP 2.4.3.
Quote:
Generating phar.php
exec(): 0509-036 Cannot load program /softwarelocal/apache/SQL_and_PHP/php-5.3.14/sapi/cli/php because of the following errors:
0509-022 Cannot load module /opt/freeware/lib/libfreetype.a(libfreetype.so.6).
0509-150 Dependent module /usr/local/mysql/lib/libz.a(libz.so.1) could not be loaded.
0509-152 Member libz.so.1 is not found in archive
0509-022 Cannot load module php.
0509-150 Dependent module /opt/freeware/lib/libfreetype.a(libfreetype.so.6) could not be loaded.
0509-022 Cannot load module .
make: *** [ext/phar/phar.php] Error 255
Have you had any luck fixing this problem? What steps did you take to get it to work? I am running the latest AIX RPM of libiconv. I do not appear to have a /usr/lib/libiconv.a on my system. I do have one in /opt/freeware/lib.
Have you set the variables "LD_LIBRARY_PATH" and "LIBPATH" both to the respective locations?
Some programs from the Solaris/Linux world expect $LD_LIBRARY_PATH to evaluate to the library location and don't care for the AIX pendant $LIBPATH, which is why it is a good safety measure to set both.
Hi All,
i am facing shared library error, below is the output of the command I am executing on my client
# /usr/software/bin/sudo
/usr/software/bin/sudo: error while loading shared libraries: libaudit.so.1: cannot open shared object file: No such file or directory
#
I tried install... (4 Replies)
Hello.
I am new to this forum and I would like to ask for advice about low level POSIX programming.
I have to implement a POSIX compliant C shared library.
A file will have some variables and the shared library will have some functions which need those variables.
There is one special... (5 Replies)
I'm trying to get Valgrind to work with an openmpi application in OS X. However I want to hardcode the path to a shared library called libmpiwrap-amd64-darwin.so into my application so that it is available at runtime. In Linux this is relatively simple, I would just add the option... (0 Replies)
Hi:
I have a library that it only offers Makefile for building static library. It built libxxx.a file. How do I in any way build a shared library? (either changin the Makefile or direct script or command to build shared library)
Thanks. (1 Reply)
I have never seen this issue before, but here is what is happening. I link an executable against two dynamic mlib libraries veclib and lapack. We place a newer version of these libraries in a write only directory and point the shlib_path at that directory. When the executable runs, it gets a... (3 Replies)
I am writing a shared library in Linux (but compatible with other UNIXes) and I want to allow multiple instances to share a piece of memory -- 1 byte is enough. What's the "best" way to do this? I want to optimize for speed and portability.
Obviously, I'll have to worry about mutual exclusion. (0 Replies)
Hello,
On a Centos 5.0 box, I have two versions of a library (sqlite):
(1) in /usr/lib that was installed using yum (maybe from php but I am not really sure)
(2) in /usr/local/lib that I installed myself by compiling from the source code.
My C++ program contains the following lines:
... (12 Replies)
I need to create a shared library to access an in memory DB. The DB is not huge, but big enough to make it cumbersome to carry around in every single process using the shared library. Luckily, it is pretty static information, so I don't need to worry much about synchronizing the data between... (12 Replies)