# --enable-memory-limit, compilation errors

- Thread: https://externals.io/message/13897
- Original archive: https://news-web.php.net/php.internals/13897
- Started by Cyprien Nicolas on 2004-11-20T12:35:51+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

---

## #13897 — Cyprien Nicolas — 2004-11-20T12:35:51+00:00

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

Hi,

I've tried to compile PHP with --enable-memory-limit, and it works well 
with PHP 4.3.9, PHP_4_3 Branch, PHP 5.0.2, but not with PHP_5_1 branch, 
I've tried with freebsd and gentoo, it fails when making the cgi or cli 
executable. I get this error :

On FreeBSD 5.1, gcc version 3.2.2 [FreeBSD] 20030205 (release)
ext/standard/basic_functions.o: In function `zif_getopt':
/usr/src/php/php-5.1-cgi/ext/standard/basic_functions.c:1700: undefined 
reference to `zif_memory_get_usage'
*** Error code 1

Stop in /usr/src/php/php-5.1-cgi.

And on Gentoo 2004.1, gcc version 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, 
ssp-3.3.2-2, pie-8.7.6)
ext/standard/basic_functions.lo(.data.rel+0x11ac): In function 
`zif_ip2long':
/home/cvs/php/PHP_5_1/ext/standard/basic_functions.c:1366: undefined 
reference to `zif_memory_get_usage'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

Can someone fix it ?
Thanks in advance,

Cyprien Fulax Nicolas
fulax@naedev.org

---

## #13898 — Derick Rethans — 2004-11-20T13:02:38+00:00

URL: https://externals.io/message/13897#13898 · In reply to: #13897

> And on Gentoo 2004.1, gcc version 3.3.4 20040623 (Gentoo Linux 3.3.4-r1,
> ssp-3.3.2-2, pie-8.7.6)
> ext/standard/basic_functions.lo(.data.rel+0x11ac): In function
> `zif_ip2long':
> /home/cvs/php/PHP_5_1/ext/standard/basic_functions.c:1366: undefined
> reference to `zif_memory_get_usage'
> collect2: ld returned 1 exit status
> make: *** [sapi/cli/php] Error 1

Those mentioned lines make no sense (there is no call to
memory_get_usage at all), there is no PHP_5_1 branch so I've
no clue what you mean here. Check with the CVS branch HEAD and provide
the actual lines too.

Derick

-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org

---

## #13901 — Cyprien Nicolas — 2004-11-20T13:46:54+00:00

URL: https://externals.io/message/13897#13901 · In reply to: #13898

Derick Rethans wrote:

>
>Those mentioned lines make no sense (there is no call to
>memory_get_usage at all), there is no PHP_5_1 branch so I've
>no clue what you mean here. Check with the CVS branch HEAD and provide
>the actual lines too.
>
>Derick
>
>  
>
Actually, by PHP_5_1 branch, I mean the HEAD branch. I know there is any 
reference to memory_get_usage at the lines mentioned by gcc...
The lines pointed by gcc contain a call to convert_to_string_ex(), which 
allocates memory for the new converted variable I think. I've looked at 
the sources and I don't really understand why I get that error, but I 
get it...

Cyprien

---

## #13911 — Curt Zirzow — 2004-11-20T19:17:05+00:00

URL: https://externals.io/message/13897#13911 · In reply to: #13901

* Thus wrote Cyprien Nicolas:
> Derick Rethans wrote:
> 
> > […]
> Actually, by PHP_5_1 branch, I mean the HEAD branch. I know there is any 
> reference to memory_get_usage at the lines mentioned by gcc...
> The lines pointed by gcc contain a call to convert_to_string_ex(), which 
> allocates memory for the new converted variable I think. I've looked at 
> the sources and I don't really understand why I get that error, but I 
> get it...

HEAD compiled fine for me on Nov 11 with --enable-memory-limit.

Try cleaning up your cvs envrionment and rebuild:

  ./cvsclean
  ./buildconf
  ./configure ...
  make


Curt
-- 
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about.  No, sir.  Our model is the trapezoid!

---

## #13912 — Cyprien Nicolas — 2004-11-21T15:45:55+00:00

URL: https://externals.io/message/13897#13912 · In reply to: #13911

Actually, it does work now...

Thank you Curt, I will think about ./cvsclean next time.


Cyprien




Curt Zirzow wrote:

>
>HEAD compiled fine for me on Nov 11 with --enable-memory-limit.
>
>Try cleaning up your cvs envrionment and rebuild:
>
>  ./cvsclean
>  ./buildconf
>  ./configure ...
>  make
>
>
>Curt
