1825787 Members
2134 Online
109687 Solutions
New Discussion

Re: gettext

 
SOLVED
Go to solution
Deepa Duvvuru
Occasional Advisor

gettext

I am trying to install gettext (to use with php). I build it with the following options:

CC="/usr/local/bin/gcc" ./configure --prefix=/opt/apache/htdocs/webmail/gettext

and it works fine. But when I do make, it exits with the following error:

/usr/ccs/bin/ld: Can't find library: "gcc_s"
collect2: ld returned 1 exit status
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

******

I am using version 3.3.2 of gcc. I have tried giving:

--libdir=/usr/local/lib

option to gcc, but make still fails.

Any ideas on how I can fix this?

Thanks,
Deepa

14 REPLIES 14
Elmar P. Kolkman
Honored Contributor

Re: gettext

Check your environment for variables like LIBPATH, LD_LIBRARY_PATH, etc.
Can you compile other programs (from the command line, for instance) using gcc ?
You can test it with something simple like hello world...
Every problem has at least one solution. Only some solutions are harder to find.
T G Manikandan
Honored Contributor

Re: gettext

Can you try using the GNU version of make

http://hpux.cs.utah.edu/hppd/hpux/Gnu/make-3.80/
T G Manikandan
Honored Contributor
Solution

Re: gettext

Also there is a depot available for gettext

http://hpux.cs.utah.edu/hppd/hpux/Gnu/gettext-0.12/

check the dependencies too.
Deepa Duvvuru
Occasional Advisor

Re: gettext

I was able to compile Hello World program with gcc without any problem.

Do you check the environment variables LIBPATH, LD_LIBRARY_PATH by doing echo $LIBPATH, and echo $LD_LIBRARY_PATH?

If so, they are empty.

Thanks,
Deepa
Deepa Duvvuru
Occasional Advisor

Re: gettext

I used gmake and still get the same error:

/usr/ccs/bin/ld: Can't find library: "gcc_s"
collect2: ld returned 1 exit status
gmake[3]: *** [libintl.la] Error 1
gmake[3]: Leaving directory `/opt/gettext-0.12.1/gettext-runtime/intl'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/opt/gettext-0.12.1/gettext-runtime'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/opt/gettext-0.12.1/gettext-runtime'
gmake: *** [all-recursive] Error 1
Mehdi_1
Regular Advisor

Re: gettext

Hi

Can you post the actual line that caused this problem please. This could be caused by other libraries in the link line. The best ay to solve this is to use "chatr" command on gcc and all other libraries that is gettext is trying to link to.
Are you linking to libiconv.sl also?

for example:

chatr gcc
chatr libicnv.sl


Basically I need some more info to track the problem.


Mehdi
Deepa Duvvuru
Occasional Advisor

Re: gettext

Here is my configure line ...

edison-new:/opt/gettext-0.12.1:8>CC="/usr/gcc/gcc/usr/local/bin/gcc" ./configure --prefix=/opt/gettext2


And then make ...
edison-new:/opt/gettext-0.12.1:8>make



Here's the line during make which gives the error:

/usr/gcc/gcc/usr/local/bin/gcc -shared -fPIC -Wl,+h -Wl,libintl.sl.5 -Wl,+b -Wl,/opt/gettext2/lib -o .libs/libintl.sl.5.0 .libs/bindtextdom.o .libs/dcgettext.o .libs/dgettext.o .libs/gettext.o .libs/finddomain.o .libs/loadmsgcat.o .libs/localealias.o .libs/textdomain.o .libs/l10nflist.o .libs/explodename.o .libs/dcigettext.o .libs/dcngettext.o .libs/dngettext.o .libs/ngettext.o .libs/plural.o .libs/plural-exp.o .libs/localcharset.o .libs/relocatable.o .libs/localename.o .libs/log.o .libs/osdep.o .libs/intl-compat.o -lc -lc
/usr/ccs/bin/ld: Can't find library: "gcc_s"
collect2: ld returned 1 exit status
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.


**************

I copied libgcc_s to /usr/local/lib. But it still says it can't find it.
Deepa Duvvuru
Occasional Advisor

Re: gettext

Not sure what options I have to give to chatr, but when I do chatr gcc, here's what I get:

edison-new:/opt/gettext-0.12.1:24>chatr /usr/gcc/gcc/usr/local/bin/gcc
/usr/gcc/gcc/usr/local/bin/gcc:
shared executable
shared library dynamic path search:
SHLIB_PATH disabled second
embedded path disabled first Not Defined
shared library list:
dynamic /usr/lib/libc.2
shared library binding:
deferred
global hash table disabled
plabel caching disabled
global hash array size:1103
global hash array nbuckets:3
shared vtable support disabled
static branch prediction disabled
executable from stack: D (default)
kernel assisted branch prediction enabled
lazy swap allocation disabled
text segment locking disabled
data segment locking disabled
third quadrant private data space disabled
fourth quadrant private data space disabled
third quadrant global data space disabled
data page size: D (default)
instruction page size: D (default)
nulptr references enabled
shared library private mapping disabled
shared library text merging disabled
edison-new:/opt/gettext-0.12.1:25>


I don't have libicnv.sl in /usr/local/lib or /usr/gcc/gcc/usr/local/lib.

Thanks,
Deepa
Mehdi_1
Regular Advisor

Re: gettext

Hi

I am sorry, It was a typing mistake. I ment to write "libiconv.sl" not "libicnv.sl".

It seems your gcc is ok. (where did you get your gcc from? did you compile it yourself?).


In gettext source tree can you find "libintl.sl.5.0" and run the "chatr" on that please.

chatr libintl.sl.5.0

and post the result in here please.


Thanks

Mehdi
Deepa Duvvuru
Occasional Advisor

Re: gettext

I didn't compile gcc. I downloaded the precompiled binary from HP site.

I don't have "libicnv.sl" in the lib directory.

Here's the output from chatr libintl.sl.5.0:

edison-new:/opt/gettext-0.12.1/gettext-tools/intl/.libs:48>chatr libintl.sl.5.0
libintl.sl.5.0:
shared library
shared library dynamic path search:
SHLIB_PATH disabled second
embedded path enabled first /opt/gettext/lib
internal name:
libintl.sl.5
shared library list:
dynamic /usr/lib/libc.2
shared vtable support disabled
static branch prediction disabled
executable from stack: D (default)
kernel assisted branch prediction enabled
lazy swap allocation disabled
text segment locking disabled
data segment locking disabled
third quadrant private data space disabled
fourth quadrant private data space disabled
third quadrant global data space disabled
data page size: D (default)
instruction page size: D (default)
nulptr references disabled
edison-new:/opt/gettext-0.12.1/gettext-tools/intl/.libs:49>
Geoff Wild
Honored Contributor

Re: gettext

As TG pointed out, download a pre-compiled version - that's what I did:

http://hpux.ee.ualberta.ca/hppd/hpux/Gnu/gettext-0.12/

You may also need:
libiconv-1.9

http://hpux.ee.ualberta.ca/hppd/hpux/Development/Libraries/libiconv-1.9/


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Deepa Duvvuru
Occasional Advisor

Re: gettext

I was able to compile it with cc. I would like to know why it doesn't work with gcc. I will try downloading libiconv and see whether that fixes it.

Thanks,
Deepa
Mehdi_1
Regular Advisor

Re: gettext

Hi

The line that failed, was tha line that trying to build libintl.sl.5.0. Where did you find libintl.sl.5.0 to run the chatr on that??

Mehdi
Deepa Duvvuru
Occasional Advisor

Re: gettext

I did a find in the gettext source dir and I found it in this dir:

/opt/gettext-0.12.1/gettext-tools/intl/.libs