×
UNIX.COM Login
Username:
Password:  
Show Password






👤


AIX

AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace.

Add shared members from library to same library in a different directory

aix, unix

👤 Login to reply
 
Thread Tools Search this Thread Display Modes
    #1  
Old 06-28-2012
kneemoe kneemoe is offline
Registered User
 
Join Date: Jun 2012
Last Activity: 25 April 2014, 9:54 AM EDT
Posts: 12
Thanks: 0
Thanked 1 Time in 1 Post
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.

Code:
add shr4.o shared members from /usr/lib/libiconv.a to  /opt/freeware/lib/libiconv.a
add shr.o shared members from /usr/lib/libiconv.a to  /opt/freeware/lib/libiconv.a
add shr4_64.o shared members from /usr/lib/libiconv.a to  /opt/freeware/lib/libiconv.a

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.
Code:
ln -sf /usr/lib/libiconv.a /opt/freeware/lib/libiconv.a

Thanks!

Moderator's Comments:
Add shared members from library to same library in a different directory 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 10:17 AM.. Reason: code tags
Sponsored Links
    #2  
Old 07-09-2012
kneemoe kneemoe is offline
Registered User
 
Join Date: Jun 2012
Last Activity: 25 April 2014, 9:54 AM EDT
Posts: 12
Thanks: 0
Thanked 1 Time in 1 Post
Quote:
Originally Posted by kneemoe View Post
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.

Code:
add shr4.o shared members from /usr/lib/libiconv.a to  /opt/freeware/lib/libiconv.a
add shr.o shared members from /usr/lib/libiconv.a to  /opt/freeware/lib/libiconv.a
add shr4_64.o shared members from /usr/lib/libiconv.a to  /opt/freeware/lib/libiconv.a

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.
Code:
ln -sf /usr/lib/libiconv.a /opt/freeware/lib/libiconv.a

Thanks!

Adding that link didn't work. I get the following error when I try to do a make of php 5.3.14
Code:
/softwarelocal/apache/SQL_and_PHP/php-5.3.14# ./configure --prefix=/opt/freeware/php --with-apxs2=/opt/freeware/sbin/apxs --with-config-file-path=/opt/freeware/etc/httpd/conf --with-gd --with-zlib-dir=/opt/freeware/lib --enable-shared --disable-static --with-png-dir=/opt/freeware/lib --with-zlib --with-bz2=/opt/freeware/bin  --with-libxml-dir=/opt/freeware/lib --with-jpeg-dir=/opt/freeware/lib --with-png-dir=/opt/freeware/lib --with-xpm-dir=/opt/freeware/lib --with-freetype-dir=/opt/freeware/lib --with-mysql=/opt/freeware/mysql/mysql5.1 --host=powerpc-ibm-aix7.1.0.0

Code:
/softwarelocal/apache/SQL_and_PHP/php-5.3.14#/opt/freeware/bin/make
~
ld: 0711-317 ERROR: Undefined symbol: .libiconv_open
ld: 0711-317 ERROR: Undefined symbol: .libiconv
ld: 0711-317 ERROR: Undefined symbol: .libiconv_close
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: ld returned 8 exit status
make: *** [sapi/cli/php] Error 1

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
Code:
/softwarelocal/apache/SQL_and_PHP/php-5.3.14#/opt/freeware/bin/make
~
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

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:
Code:
/bin/sh /softwarelocal/apache/SQL_and_PHP/php-5.3.14/libtool --silent --preserve-dup-deps --mode=compile /softwarelocal/apache/SQL_and_PHP/php-5.3.14/meta_ccld  -Imain/ -I/softwarelocal/apache/SQL_and_PHP/php-5.3.14/main/ -DPHP_ATOM_INC -I/softwarelocal/apache/SQL_and_PHP/php-5.3.14/include -I/softwarelocal/apache/SQL_and_PHP/php-5.3.14/main -I/softwarelocal/apache/SQL_and_PHP/php-5.3.14 -I/softwarelocal/apache/SQL_and_PHP/php-5.3.14/ext/date/lib -I/softwarelocal/apache/SQL_and_PHP/php-5.3.14/ext/ereg/regex -I/opt/freeware/include/libxml2 -I/usr/include/freetype2 -I/opt/freeware/mysql/mysql5.1/include -I/softwarelocal/apache/SQL_and_PHP/php-5.3.14/ext/sqlite3/libsqlite -I/softwarelocal/apache/SQL_and_PHP/php-5.3.14/TSRM -I/softwarelocal/apache/SQL_and_PHP/php-5.3.14/Zend  -D_THREAD_SAFE  -I/usr/include -g -O2 -fvisibility=hidden -pthread -DZTS   -c main/internal_functions_cli.c -o main/internal_functions_cli.lo
        echo '\
\
Generating phar.php
/bin/sh[14]: /softwarelocal/apache/SQL_and_PHP/php-5.3.14/sapi/cli/php:  not found.
make: 1254-004 The error code from the last command is 127.


Stop.

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 10:19 AM.. Reason: adding the ibm.com AMP instructions
Sponsored Links
    #3  
Old 07-10-2012
bakunin bakunin is offline Forum Staff  
Bughunter Extraordinaire
 
Join Date: May 2005
Last Activity: 3 July 2018, 11:43 PM EDT
Location: In the leftmost byte of /dev/kmem
Posts: 5,786
Thanks: 112
Thanked 1,698 Times in 1,248 Posts
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 hope this helps.

bakunin
    #4  
Old 07-11-2012
kneemoe kneemoe is offline
Registered User
 
Join Date: Jun 2012
Last Activity: 25 April 2014, 9:54 AM EDT
Posts: 12
Thanks: 0
Thanked 1 Time in 1 Post
Quote:
Originally Posted by bakunin View Post
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
The Following User Says Thank You to kneemoe For This Useful Post:
Koomazaz (08-23-2012)
Sponsored Links
    #5  
Old 08-23-2012
Koomazaz Koomazaz is offline
Registered User
 
Join Date: Aug 2012
Last Activity: 24 August 2012, 9:11 AM EDT
Posts: 1
Thanks: 1
Thanked 0 Times in 0 Posts
Solution to your problem?

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.

Thanks!
Sponsored Links
    #6  
Old 08-25-2012
bakunin bakunin is offline Forum Staff  
Bughunter Extraordinaire
 
Join Date: May 2005
Last Activity: 3 July 2018, 11:43 PM EDT
Location: In the leftmost byte of /dev/kmem
Posts: 5,786
Thanks: 112
Thanked 1,698 Times in 1,248 Posts
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.

I hope this helps.

bakunin
Sponsored Links
👤 Login to reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Shared library with acces to shared memory. iamjag Programming 5 06-18-2012 02:52 PM
How to change a Makefile from building static library to shared library? cpthk Shell Programming and Scripting 1 08-26-2009 02:23 AM
shared library on QNX ReeV UNIX for Advanced & Expert Users 1 05-06-2009 05:30 AM
Shared memory for shared library otheus Programming 0 09-03-2008 03:55 AM
Shared memory in shared library DreamWarrior Programming 12 05-30-2007 04:33 PM



All times are GMT -4. The time now is 05:35 AM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.