Operating System - HP-UX
1752666 Members
5572 Online
108788 Solutions
New Discussion юеВ

Re: gettext and sybase both have libintl.sl. I need both.

 
SOLVED
Go to solution
Steve Post
Trusted Contributor

gettext and sybase both have libintl.sl. I need both.

Fast question I hope. I don't want to spend too much time providing tons of details.

Trying to build apache2 with php5 and sybase-12_5 using gcc with flex and gettext.
The gettext part of gcc has /usr/local/lib/libintl.sl.
This is interfering with sybase's /usr/sybase-12_5/lib/libintl.sl.
...and also with mysql-5.0.26.

Isn't there a way to let gcc know to use the contents of both libraries??

Here's an even more general question:
How do compile stuff if two different library files have the same name? (in this case libintl.sl)

steve
8 REPLIES 8
Peter Godron
Honored Contributor

Re: gettext and sybase both have libintl.sl. I need both.

Steve,
the order in which you list your libs in PATh and SHLIB_PATH would decide.
You may get duplicate symbol warnings if multiple libs are included.
Steve Post
Trusted Contributor

Re: gettext and sybase both have libintl.sl. I need both.

Well yeah, it will tell which ONE to grab, the first in the PATH, or SHLIB_PATH, or LD_PATH, or whatever. But I don't wan't want the first occurence of libintl.sl. I want BOTH of them.
Peter Godron
Honored Contributor

Re: gettext and sybase both have libintl.sl. I need both.

Steve,
in that case use the -L option of gcc to add your libs.
If you do this, unsure how you are going to handle duplicate entries in the libs. If you have an identical function name in two libs the compile is going to complain.
Steve Post
Trusted Contributor

Re: gettext and sybase both have libintl.sl. I need both.

I won't handle duplicate function names. I can't see Sybase wanting itself incompatible with with gcc. That's like being imcompatible with Earth.

Meanwhile......
This -L looks like it overrides the search path. Once the first libintl.sl file is found I DON'T want it to stop. I was hoping you would tell me something like....

ln -s sybase/ASE-12_5/lib/libintl.sl libintlSYB.sl

Then gcc would see it as a separate library?
Steve Post
Trusted Contributor

Re: gettext and sybase both have libintl.sl. I need both.

I'm just making a comment on my own question.
I see spending days on digging for the answer can make a guy grumpy.

I see the -L will add a directory to the search path. But it will still not allow a duplicate file name like libintl.sl.

Also as stated above, if the two files are allowed, there is a good possiblity their contents would interfere with each other (i.e. have the same symbols defined in them).

The actual solution to this should be covered somewhere on the internet. Sybase exists. Gcc exists. You'd think someone might have used these two products together. (ah. but on HPUX?).

I have. But it was earlier versions of gcc and sybase.
OldSchool
Honored Contributor
Solution

Re: gettext and sybase both have libintl.sl. I need both.

Steve,

A *real* long shot, but couldn't you make 3 passes at this, like this:

1) link those things that need /usr/local/lib/libintl.sl to ojb1.o
2) link those things that need /usr/sybase/sybase-12/5/lib/libintl.sl to obj2.o
3) link those ojb1.o and obj2.o together to create the real executable.

note: chatr should show you which is linked where. also, you *might* try *statically* linking one (or both) before the third step

really out there, but might work. on the other hand, you might simply try using only one version of the library and see what gives.
OldSchool
Honored Contributor

Re: gettext and sybase both have libintl.sl. I need both.

Steve

Also check the first "user contributed note" at http://us3.php.net/sybase.

Sounds like he resolved a similar situation
Steve Post
Trusted Contributor

Re: gettext and sybase both have libintl.sl. I need both.

Thanks. It will take me a while to get back to it. But you gave me plenty to work with.