# Changing the soname of libphp4.so

- Thread: https://externals.io/message/9389
- Original archive: https://news-web.php.net/php.internals/9389
- Started by Brian J. France on 2004-04-19T18:29:33+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #9389 — Brian J. France — 2004-04-19T18:29:33+00:00

URL: https://externals.io/message/9389#9389

Is there a easy way to change the internal soname?

I need to build the embeded sapi with a different internal soname.  
Yes, I can rename libphp4.so (the embeded version) to libphp4-embed.so, 
but things that link with libphp4-embed.so will have a dependency of 
libphp.so because that is what the internal soname is.  This is causing 
problems because it will then load the wrong shared library (wrong 
sapi) if we have libphp4-embed.so and libphp4.so (apache sapi).

If there is no easy way, can you give me pointers on what I need to 
patch/hack to get it to work.  I will just maintain another company 
specific patch.

Thanks,

Brian

---

## #9395 — Wez Furlong — 2004-04-19T19:29:13+00:00

URL: https://externals.io/message/9389#9395 · In reply to: #9389

Hey Brian,

Would something as simple as this:

LDFLAGS="-soname=libphp4-embed.so" ./configure ...

work ?

--Wez.

----- Original Message ----- 
From: "Brian J. France" <list@firehawksystems.com>
To: <internals@lists.php.net>
Sent: Monday, April 19, 2004 7:29 PM
Subject: [PHP-DEV] Changing the soname of libphp4.so


> Is there a easy way to change the internal soname?
> 
> I need to build the embeded sapi with a different internal soname.  
> Yes, I can rename libphp4.so (the embeded version) to libphp4-embed.so, 
> but things that link with libphp4-embed.so will have a dependency of 
> libphp.so because that is what the internal soname is.  This is causing 
> problems because it will then load the wrong shared library (wrong 
> sapi) if we have libphp4-embed.so and libphp4.so (apache sapi).
> 
> If there is no easy way, can you give me pointers on what I need to 
> patch/hack to get it to work.  I will just maintain another company 
> specific patch.
> 
> Thanks,
> 
> Brian

---

## #9397 — Brian J. France — 2004-04-19T20:15:57+00:00

URL: https://externals.io/message/9389#9397 · In reply to: #9395

Nothing seemed to work, I tried adding that (and a few variations) 
before ./configure line and also tried editing the config.m4 for the 
sapi and adding it there.

I did get it to work by hand editing the Makefile and changing the 
libphp4.la action.  I changed:

   -o $@
to
   -o libphp4-embed.la

and on the second line I changed:

   libphp4.la
to
   libphp4-embed.la

and it worked, so at least I have a way to do it.  If there is an 
easier way to do it I would like to know, but at least I have a work 
around.

Thanks,

Brian



> Hey Brian,
>
> Would something as simple as this:
>
> LDFLAGS="-soname=libphp4-embed.so" ./configure ...
>
> work ?
>
> --Wez.
>
> ----- Original Message -----
> From: "Brian J. France" <list@firehawksystems.com>
> To: <internals@lists.php.net>
> Sent: Monday, April 19, 2004 7:29 PM
> Subject: [PHP-DEV] Changing the soname of libphp4.so
>
>
> > […]
