php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6583 libmcrypt: undefined reference...
Submitted: 2000-09-06 15:40 UTC Modified: 2000-09-06 17:15 UTC
From: cerri at libero dot it Assigned:
Status: Closed Package: Compile Warning
PHP Version: 4.0.2 OS: Linux pc2unitim.rm.tim.it 2.2.17
Private report: No CVE-ID: None
 [2000-09-06 15:40 UTC] cerri at libero dot it
I'm trying to compile PHP 4.0.2 on TurboLinux 6.0.4 (kernel recompiled to 2.2.17).

I've configured apache and other apache modules (modssl / modauth) and now I'm trying to configure PHP.

The configure (cmd line is in debug.log, just few lines down) return exit code 0, but last lines...

===quote
+--------------------------------------------------------------------+
|                       *** ATTENTION ***                            |
|                                                                    |
| Something is likely to be messed up here, because the configure    |
| script was not able to detect a simple feature on your platform.   |
| This is often caused by incorrect configuration parameters. Please |
| see the file debug.log for error messages.                         |
|                                                                    |
| If you are unable to fix this, send the file debug.log to the      |
| php-install@lists.php.net mailing list and include appropiate      |
| information about your setup.                                      |
+--------------------------------------------------------------------+
===end quote

The problem is libmcrypt.
I installed it correctly (./configure --disable-posix-thread --prefix=/usr ; make ; make check ; make install) and I choose version 2.4.4 (as a user note on http://www.php.net/manual/ref.mcrypt.php):

===quote
Use libmcrypt-2.2.7 with PHP <= 4.0.1pl2; or else it wouldn't compile. The reason is API of the lib has been changed. 
For libmcrypt-2.4.4 you need PHP >= 4.0.2.
===end quote

And I found this note by rasmus@php.net on Bug id #5967 "Can't compile with mcrypt"

===quote
This is a known issue.  Only mcrypt 2.2.x is supported currently [4.0.1pl2].  4.0.2 will have support
for the latest versions of mcrypt.
===end quote

So, I think I made the right thing. ;)

But debug.log reports:

===quote
CONFIGURE:   './configure' '--with-apache=/usr/local/src/apache_1.3.12/' '--with-mysql=/usr/local/mysql/' '--disable-unified-odbc' '--with-mcrypt' '--enable-sysvsem' '--enable-sysvshm' '--enable-safe-mode'
CC:         gcc
CFLAGS:     -g -O2
CPPFLAGS:   
CXX:        
CXXFLAGS:   
INCLUDES:    -I/usr/local/src/apache_1.3.12//src/include -I/usr/local/src/apache_1.3.12//src/os/unix  -I$(top_builddir)/Zend -I$(top_srcdir)  -I/usr/local/mysql//include/mysql
LDFLAGS:     -Wl,-rpath,/usr/local/mysql//lib/mysql -L/usr/local/mysql//lib/mysql
LIBS:       -lmysqlclient -lmcrypt -lresolv -lm -ldl -lcrypt -lnsl  -lresolv
DLIBS:      
SAPI:       apache
PHP_RPATHS:  /usr/local/mysql//lib/mysql
uname -a:   Linux pc2unitim.rm.tim.it 2.2.17 #1 mar set 5 15:11:38 GMT+1 2000 i586 unknown

gcc -o conftest -g -O2   -Wl,-rpath,/usr/local/mysql//lib/mysql -L/usr/local/mysql//lib/mysql conftest.c -lmysqlclient -lmcrypt -lresolv -lm -ldl -lcrypt -lnsl  -lresolv 1>&5
/usr/lib/libmcrypt.so: undefined reference to `lt_dlerror'
/usr/lib/libmcrypt.so: undefined reference to `lt_dlclose'
/usr/lib/libmcrypt.so: undefined reference to `lt_dladdsearchdir'
/usr/lib/libmcrypt.so: undefined reference to `lt_dlexit'
/usr/lib/libmcrypt.so: undefined reference to `lt_dlopen'
/usr/lib/libmcrypt.so: undefined reference to `lt_dlsetsearchpath'
/usr/lib/libmcrypt.so: undefined reference to `lt_dlopenext'
/usr/lib/libmcrypt.so: undefined reference to `lt_dlsym'
/usr/lib/libmcrypt.so: undefined reference to `lt_dlinit'
collect2: ld returned 1 exit status
===end quote

I also modified ldconfig...
===quote
(snip)
/usr/lib/libmcrypt:
/usr/lib:
	libmcrypt.so.4 => libmcrypt.so.4.0.2
(snip)
===end quote

And here are my /usr/lib and /usr/lib/libmcrypt dirs:

/usr/lib
lrwxrwxrwx   1 root     root           18 Sep  6 18:38 libmcrypt.so -> libmcrypt.so.4.0.2*
lrwxrwxrwx   1 root     root           18 Sep  6 19:56 libmcrypt.so.2 -> libmcrypt.so.4.0.2*
lrwxrwxrwx   1 root     root           18 Sep  6 18:38 libmcrypt.so.4 -> libmcrypt.so.4.0.2*
-rwxr-xr-x   1 root     root        51809 Sep  6 18:38 libmcrypt.so.4.0.2*

/usr/lib/libmcrypt
drwxr-xr-x   2 root     root         4096 Sep  6 18:38 ./
drwxr-xr-x  19 root     root         8192 Sep  6 20:05 ../
-rw-r--r--   1 root     root        20606 Sep  6 18:38 arcfour-iv.a
-rwxr-xr-x   1 root     root          669 Sep  6 18:38 arcfour-iv.la*
-rwxr-xr-x   1 root     root        24705 Sep  6 18:38 arcfour-iv.so*
-rw-r--r--   1 root     root        20338 Sep  6 18:38 arcfour.a
-rwxr-xr-x   1 root     root          648 Sep  6 18:38 arcfour.la*
-rwxr-xr-x   1 root     root        24418 Sep  6 18:38 arcfour.so*
-rw-r--r--   1 root     root        26740 Sep  6 18:38 blowfish.a
-rwxr-xr-x   1 root     root          655 Sep  6 18:38 blowfish.la*
-rwxr-xr-x   1 root     root        30704 Sep  6 18:38 blowfish.so*
-rw-r--r--   1 root     root        35812 Sep  6 18:38 cast-128.a
-rwxr-xr-x   1 root     root          655 Sep  6 18:38 cast-128.la*
-rwxr-xr-x   1 root     root        38893 Sep  6 18:38 cast-128.so*
-rw-r--r--   1 root     root        38450 Sep  6 18:37 cast-256.a
-rwxr-xr-x   1 root     root          655 Sep  6 18:37 cast-256.la*
-rwxr-xr-x   1 root     root        43078 Sep  6 18:37 cast-256.so*
-rw-r--r--   1 root     root        17974 Sep  6 18:38 cbc.a
-rwxr-xr-x   1 root     root          620 Sep  6 18:38 cbc.la*
-rwxr-xr-x   1 root     root        21777 Sep  6 18:38 cbc.so*
-rw-r--r--   1 root     root        17986 Sep  6 18:38 cfb.a
-rwxr-xr-x   1 root     root          620 Sep  6 18:38 cfb.la*
-rwxr-xr-x   1 root     root        21729 Sep  6 18:38 cfb.so*
-rw-r--r--   1 root     root        28070 Sep  6 18:38 des.a
-rwxr-xr-x   1 root     root          620 Sep  6 18:38 des.la*
-rwxr-xr-x   1 root     root        32671 Sep  6 18:38 des.so*
-rw-r--r--   1 root     root        16958 Sep  6 18:38 ecb.a
-rwxr-xr-x   1 root     root          620 Sep  6 18:38 ecb.la*
-rwxr-xr-x   1 root     root        20698 Sep  6 18:38 ecb.so*
-rw-r--r--   1 root     root        22446 Sep  6 18:38 enigma.a
-rwxr-xr-x   1 root     root          641 Sep  6 18:38 enigma.la*
-rwxr-xr-x   1 root     root        26826 Sep  6 18:38 enigma.so*
-rw-r--r--   1 root     root        22782 Sep  6 18:37 gost.a
-rwxr-xr-x   1 root     root          627 Sep  6 18:37 gost.la*
-rwxr-xr-x   1 root     root        28800 Sep  6 18:37 gost.so*
-rw-r--r--   1 root     root        27336 Sep  6 18:37 loki97.a
-rwxr-xr-x   1 root     root          641 Sep  6 18:37 loki97.la*
-rwxr-xr-x   1 root     root        32807 Sep  6 18:37 loki97.so*
-rw-r--r--   1 root     root        18200 Sep  6 18:38 nofb.a
-rwxr-xr-x   1 root     root          627 Sep  6 18:38 nofb.la*
-rwxr-xr-x   1 root     root        21864 Sep  6 18:38 nofb.so*
-rw-r--r--   1 root     root        17982 Sep  6 18:38 ofb.a
-rwxr-xr-x   1 root     root          620 Sep  6 18:38 ofb.la*
-rwxr-xr-x   1 root     root        21701 Sep  6 18:38 ofb.so*
-rw-r--r--   1 root     root        27354 Sep  6 18:38 panama.a
-rwxr-xr-x   1 root     root          641 Sep  6 18:38 panama.la*
-rwxr-xr-x   1 root     root        31377 Sep  6 18:38 panama.so*
-rw-r--r--   1 root     root        20746 Sep  6 18:37 rc2.a
-rwxr-xr-x   1 root     root          620 Sep  6 18:37 rc2.la*
-rwxr-xr-x   1 root     root        25197 Sep  6 18:37 rc2.so*
-rw-r--r--   1 root     root        28016 Sep  6 18:37 rijndael-128.a
-rwxr-xr-x   1 root     root          683 Sep  6 18:37 rijndael-128.la*
-rwxr-xr-x   1 root     root        31748 Sep  6 18:37 rijndael-128.so*
-rw-r--r--   1 root     root        28000 Sep  6 18:37 rijndael-192.a
-rwxr-xr-x   1 root     root          683 Sep  6 18:37 rijndael-192.la*
-rwxr-xr-x   1 root     root        31736 Sep  6 18:37 rijndael-192.so*
-rw-r--r--   1 root     root        28528 Sep  6 18:37 rijndael-256.a
-rwxr-xr-x   1 root     root          683 Sep  6 18:37 rijndael-256.la*
-rwxr-xr-x   1 root     root        32248 Sep  6 18:37 rijndael-256.so*
-rw-r--r--   1 root     root        24284 Sep  6 18:37 safer-sk128.a
-rwxr-xr-x   1 root     root          676 Sep  6 18:37 safer-sk128.la*
-rwxr-xr-x   1 root     root        28272 Sep  6 18:37 safer-sk128.so*
-rw-r--r--   1 root     root        24176 Sep  6 18:37 safer-sk64.a
-rwxr-xr-x   1 root     root          669 Sep  6 18:37 safer-sk64.la*
-rwxr-xr-x   1 root     root        28124 Sep  6 18:37 safer-sk64.so*
-rw-r--r--   1 root     root        28190 Sep  6 18:37 saferplus.a
-rwxr-xr-x   1 root     root          662 Sep  6 18:37 saferplus.la*
-rwxr-xr-x   1 root     root        32283 Sep  6 18:37 saferplus.so*
-rw-r--r--   1 root     root        45870 Sep  6 18:37 serpent.a
-rwxr-xr-x   1 root     root          648 Sep  6 18:37 serpent.la*
-rwxr-xr-x   1 root     root        52689 Sep  6 18:37 serpent.so*
-rw-r--r--   1 root     root        16912 Sep  6 18:38 stream.a
-rwxr-xr-x   1 root     root          641 Sep  6 18:38 stream.la*
-rwxr-xr-x   1 root     root        20571 Sep  6 18:38 stream.so*
-rw-r--r--   1 root     root        23216 Sep  6 18:37 threeway.a
-rwxr-xr-x   1 root     root          655 Sep  6 18:37 threeway.la*
-rwxr-xr-x   1 root     root        27845 Sep  6 18:37 threeway.so*
-rw-r--r--   1 root     root        32348 Sep  6 18:38 tripledes.a
-rwxr-xr-x   1 root     root          662 Sep  6 18:38 tripledes.la*
-rwxr-xr-x   1 root     root        37521 Sep  6 18:38 tripledes.so*
-rw-r--r--   1 root     root        32656 Sep  6 18:37 twofish.a
-rwxr-xr-x   1 root     root          648 Sep  6 18:37 twofish.la*
-rwxr-xr-x   1 root     root        37835 Sep  6 18:37 twofish.so*
-rw-r--r--   1 root     root        21946 Sep  6 18:37 wake.a
-rwxr-xr-x   1 root     root          627 Sep  6 18:37 wake.la*
-rwxr-xr-x   1 root     root        26202 Sep  6 18:37 wake.so*
-rw-r--r--   1 root     root        19388 Sep  6 18:37 xtea.a
-rwxr-xr-x   1 root     root          627 Sep  6 18:37 xtea.la*
-rwxr-xr-x   1 root     root        23708 Sep  6 18:37 xtea.so*

I hope it helps! :)

Regards,
Andrea Cerrito

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-09-06 15:53 UTC] derick@php.net
It helped, can you locate libltdl on your system? It is installed when you do a make install of the mcrypt module, so it should be in /usr/lib or something. Please check if you have it installed and report back.
 [2000-09-06 16:06 UTC] cerri at libero dot it
Oh, I forgot: with libmcrypt-2.2.7 all it's ok.
 [2000-09-06 16:11 UTC] derick@php.net
libmcrypt 2.2.7 does not need libltdl. Do you have libltdl on your system?
 [2000-09-06 16:35 UTC] cerri at libero dot it
Sorry, I posted it before reading your post (window not refreshed).

Anyway, this is the result.

===quote
/usr/local/lib/libltdl.so.0
/usr/local/lib/libltdl.so.0.1.2
/usr/local/lib/libltdl.so
/usr/local/lib/libltdl.la
/usr/local/lib/libltdl.a
/usr/local/src/libmcrypt-2.4.4/libltdl
/usr/share/libtool/libltdl
/usr/share/libtool/libltdl/libltdl
===end quote

A question:
before submitting the bug, I configured mcrypt to install /usr/local/lib (without --prefix). And php configure fails.
Then, I make clean mcrypt and reconfigured it with --prefix=/usr , but nothing changes.
I also included / exlcluded /usr/local/lib from ld.so.conf, but nothing.
So: libltdl is installed by mcrypt, isnt't it? And why make clean didn't deleted it? And why I only found it in /usr/local/lib and not in /usr/lib?

Thank you
 [2000-09-06 16:39 UTC] cerri at libero dot it
Sorry, I posted it before reading your post (window not refreshed).

Anyway, this is the result.

===quote
/usr/local/lib/libltdl.so.0
/usr/local/lib/libltdl.so.0.1.2
/usr/local/lib/libltdl.so
/usr/local/lib/libltdl.la
/usr/local/lib/libltdl.a
/usr/local/src/libmcrypt-2.4.4/libltdl
/usr/share/libtool/libltdl
/usr/share/libtool/libltdl/libltdl
===end quote

A question:
before submitting the bug, I configured mcrypt to install /usr/local/lib (without --prefix). And php configure fails.
Then, I make clean mcrypt and reconfigured it with --prefix=/usr , but nothing changes.
I also included / exlcluded /usr/local/lib from ld.so.conf, but nothing.
So: libltdl is installed by mcrypt, isnt't it? And why make clean didn't deleted it? And why I only found it in /usr/local/lib and not in /usr/lib?

Thank you
 [2000-09-06 16:41 UTC] cerri at libero dot it
Sorry, I posted it before reading your post (window not refreshed).

Anyway, this is the result.

===quote
/usr/local/lib/libltdl.so.0
/usr/local/lib/libltdl.so.0.1.2
/usr/local/lib/libltdl.so
/usr/local/lib/libltdl.la
/usr/local/lib/libltdl.a
/usr/local/src/libmcrypt-2.4.4/libltdl
/usr/share/libtool/libltdl
/usr/share/libtool/libltdl/libltdl
===end quote

A question:
before submitting the bug, I configured mcrypt to install /usr/local/lib (without --prefix). And php configure fails.
Then, I make clean mcrypt and reconfigured it with --prefix=/usr , but nothing changes.
I also included / exlcluded /usr/local/lib from ld.so.conf, but nothing.
So: libltdl is installed by mcrypt, isnt't it? And why make clean didn't deleted it? And why I only found it in /usr/local/lib and not in /usr/lib?

Thank you
 [2000-09-06 16:43 UTC] cerri at libero dot it
Sorry, I posted it before reading your post (window not refreshed).

Anyway, this is the result.

===quote
/usr/local/lib/libltdl.so.0
/usr/local/lib/libltdl.so.0.1.2
/usr/local/lib/libltdl.so
/usr/local/lib/libltdl.la
/usr/local/lib/libltdl.a
/usr/local/src/libmcrypt-2.4.4/libltdl
/usr/share/libtool/libltdl
/usr/share/libtool/libltdl/libltdl
===end quote

A question:
before submitting the bug, I configured mcrypt to install /usr/local/lib (without --prefix). And php configure fails.
Then, I make clean mcrypt and reconfigured it with --prefix=/usr , but nothing changes.
I also included / exlcluded /usr/local/lib from ld.so.conf, but nothing.
So: libltdl is installed by mcrypt, isnt't it? And why make clean didn't deleted it? And why I only found it in /usr/local/lib and not in /usr/lib?

Thank you
 [2000-09-06 16:44 UTC] derick@php.net
> before submitting the bug, I configured mcrypt to install /usr/local/lib (without
> --prefix). And php configure fails.

On which does it fail then? I had never any problem with libmcrypt being in that directory. Actually it has been
developped with that directory.

> So: libltdl is installed by mcrypt, isnt't it? And why make clean didn't deleted it? And
> why I only found it in /usr/local/lib and not in /usr/lib?

Because make clean only deletes opject files from the build dir. Use make uninstall to uninstall the installation.
This works fine for almost every package/library.

Just add /usr/lib/local to your ld.so.conf file and run "ldconfig", now configure must be able to find both
libmcrypt en libltdl.


 [2000-09-06 16:49 UTC] cerri at libero dot it
Sorry, I posted it before reading your post (window not refreshed).

Anyway, this is the result.

===quote
/usr/local/lib/libltdl.so.0
/usr/local/lib/libltdl.so.0.1.2
/usr/local/lib/libltdl.so
/usr/local/lib/libltdl.la
/usr/local/lib/libltdl.a
/usr/local/src/libmcrypt-2.4.4/libltdl
/usr/share/libtool/libltdl
/usr/share/libtool/libltdl/libltdl
===end quote

A question:
before submitting the bug, I configured mcrypt to install /usr/local/lib (without --prefix). And php configure fails.
Then, I make clean mcrypt and reconfigured it with --prefix=/usr , but nothing changes.
I also included / exlcluded /usr/local/lib from ld.so.conf, but nothing.
So: libltdl is installed by mcrypt, isnt't it? And why make clean didn't deleted it? And why I only found it in /usr/local/lib and not in /usr/lib?

Thank you
 [2000-09-06 17:09 UTC] cerri at libero dot it
Sorry for the double post: my connection isn't so good today... :(

Anyway:

>> before submitting the bug, I configured mcrypt to install /usr/local/lib (without
>> --prefix). And php configure fails.

>On which does it fail then? I had never any problem with libmcrypt being in that
>directory. Actually it has been developped with that directory.

The debug.log was the same even I configure mcrypt with --prefix or even without (= libltdl in /usr/lib or in /usr/local/lib).

>> So: libltdl is installed by mcrypt, isnt't it? And why make clean didn't deleted it?
And
>> why I only found it in /usr/local/lib and not in /usr/lib?

>Because make clean only deletes opject files from the build dir. Use make uninstall to
> uninstall the installation. This works fine for almost every package/library.

Sorry: I wrote clean instead of make uninstall / make clean .

> Just add /usr/lib/local to your ld.so.conf file and run "ldconfig", now configure must be able to find both
libmcrypt en libltdl.

As I said before, I did it, and I tried to remove /usr/local/lib in ld.so.conf too, without any changes.

Anyway, I'm retrying: this is the output (snipped, of course) of ldconfig -v

===quote
/usr/local/lib:
	libltdl.so.0 => libltdl.so.0.1.2
	libmm.so.11 => libmm.so.11.0.23
===end quote

Nothing: same errors.

I found the error: I downloaded an older version, even the gz was called php-4.0.2 (in NEWS there is still PHP 4.0.1).

I'm redownloading a correct version, and I'm making a test.
Of course, no problem.

Really sorry: the next time I'll download from a reliable server... 

Thank you for your support.

Andrea Cerrito
 [2000-09-06 17:15 UTC] derick@php.net
No big deal.

So close it.
User was using a version before 4.0.2. where libmcrypt 2.4.x was not supported.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 01 18:01:29 2024 UTC