# iconv, OS X and .dylib

- Thread: https://externals.io/message/22644
- Original archive: https://news-web.php.net/php.internals/22644
- Started by Christian Stocker on 2006-04-02T13:00:10+00:00
- Messages: 5
- 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

---

## #22644 — Christian Stocker — 2006-04-02T13:00:10+00:00

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

Hi

currently, iconv detection doesnt work on OS X (with 5_1), as it looks 
for iconv.so instead of iconv.dylib.

The patch by andrei from last week broke that.

http://cvs.php.net/viewcvs.cgi/php-src/acinclude.m4?r1=1.332.2.10&r2=1.332.2.11&pathrev=PHP_5_1

reverting it does help, but AFAICT andrei had his reasons to remove that 
part.


chregu

-- 
christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich
phone +41 44 240 56 70 | mobile +41 76 561 88 60 | fax +41 1 240 56 71
http://www.bitflux.ch | christian.stocker@bitflux.ch |  GPG 0x5CE1DECB

---

## #22658 — Andrei Zmievski — 2006-04-04T01:40:54+00:00

URL: https://externals.io/message/22644#22658 · In reply to: #22644

The problem is that SHLIB_SUFFIX_NAME is used for both bundles (.so)  
and dynamic libraries (.dylib) on Mac OS X. These are separate  
entities and need to be treated separately. We could probably set  
SHLIB_SUFFIX_NAME to .dylib on OSX and introduce an additional  
variable, something like BUNDLE_SUFFIX_NAME and set it to .so. The  
problem is in main.c where it registers PHP_SHLIB_SUFFIX: which  
define should it use?

-Andrei




> Hi
>
> currently, iconv detection doesnt work on OS X (with 5_1), as it  
> looks for iconv.so instead of iconv.dylib.
>
> The patch by andrei from last week broke that.
>
> http://cvs.php.net/viewcvs.cgi/php-src/acinclude.m4? 
> r1=1.332.2.10&r2=1.332.2.11&pathrev=PHP_5_1
>
> reverting it does help, but AFAICT andrei had his reasons to remove  
> that part.
>
>
> chregu
>
> -- 
> christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich
> phone +41 44 240 56 70 | mobile +41 76 561 88 60 | fax +41 1 240 56 71
> http://www.bitflux.ch | christian.stocker@bitflux.ch |  GPG 0x5CE1DECB

---

## #22659 — Christian Stocker — 2006-04-04T04:26:43+00:00

URL: https://externals.io/message/22644#22659 · In reply to: #22658

> The problem is that SHLIB_SUFFIX_NAME is used for both bundles (.so) and 
> dynamic libraries (.dylib) on Mac OS X. These are separate entities and 
> need to be treated separately. We could probably set SHLIB_SUFFIX_NAME 
> to .dylib on OSX and introduce an additional variable, something like 
> BUNDLE_SUFFIX_NAME and set it to .so. The problem is in main.c where it 
> registers PHP_SHLIB_SUFFIX: which define should it use?

BUNDLE_SUFFIX_NAME sounds fine to me. But can we please revert your 
patch for 5.1.3? (Or introduce the proposed new variable). It doesn't 
configure at all right now on OS X.

chregu


> 
> -Andrei
> 
> 
> 
> 
> > […]

-- 
christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich
phone +41 44 240 56 70 | mobile +41 76 561 88 60 | fax +41 1 240 56 71
http://www.bitflux.ch | christian.stocker@bitflux.ch |  GPG 0x5CE1DECB

---

## #22662 — Andrei Zmievski — 2006-04-04T06:37:27+00:00

URL: https://externals.io/message/22644#22662 · In reply to: #22659

> 
> > […]
>
> BUNDLE_SUFFIX_NAME sounds fine to me. But can we please revert your  
> patch for 5.1.3? (Or introduce the proposed new variable). It  
> doesn't configure at all right now on OS X.

Can people please try this patch:

http://www.php.net/~andrei/shlib.diff

It works on my Mac but we need to make sure it doesn't break build/dl 
() process for shared extensions on other platforms.

-Andrei

---

## #22663 — Christian Stocker — 2006-04-04T08:20:23+00:00

URL: https://externals.io/message/22644#22663 · In reply to: #22662

> 
> 
> > […]
> 
> Can people please try this patch:
> 
> http://www.php.net/~andrei/shlib.diff

If I change

PHP_SHLIB_BUILD_SUFFIX_NAME
to
PHP_BUILD_SHLIB_SUFFIX_NAME

in acinclude.m4 line 1885

it works for me too (on OS X)

chregu

> 
> It works on my Mac but we need to make sure it doesn't break build/dl() 
> process for shared extensions on other platforms.
> 
> -Andrei

-- 
christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich
phone +41 44 240 56 70 | mobile +41 76 561 88 60 | fax +41 1 240 56 71
http://www.bitflux.ch | christian.stocker@bitflux.ch |  GPG 0x5CE1DECB
