Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missed 'ltmain.sh' - 1.1.2 / 1.1.3 / master #255

Closed
necromant2005 opened this issue Mar 8, 2016 · 9 comments
Closed

Missed 'ltmain.sh' - 1.1.2 / 1.1.3 / master #255

necromant2005 opened this issue Mar 8, 2016 · 9 comments

Comments

@necromant2005
Copy link

There's a missed file ltmain.sh

OS: ubuntu 16.04 beta1
PHP: 7.0.3-3 (cli)

Installed libraries:

sudo apt-get install -y autoconf g++ make openssl libssl-dev libcurl4-openssl-dev
sudo apt-get install -y libcurl4-openssl-dev pkg-config
sudo apt-get install -y libsasl2-dev

Steps to reproduce

git clone https://github.com/mongodb/mongo-php-driver.git /tmp/mongo-php-driver
cd /tmp/mongo-php-driver && git submodule update --init
cd /tmp/mongo-php-driver && phpize

phpize output

Configuring for:
PHP Api Version:         20151012
Zend Module Api No:      20151012
Zend Extension Api No:   320151012
cp: cannot stat 'ltmain.sh': No such file or directory

./configure output

checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating ./config.status

mongodb was configured with the following options:

Build configuration:
  CFLAGS                                           : -g -O2
  Extra CFLAGS                                     :  -pthread
  Developers flags (slow)                          :
  Code Coverage flags (extra slow)                 :
  System mongoc                                    : no
  System libbson                                   : no
  LDFLAGS                                          :
  EXTRA_LDFLAGS                                    :
  MONGODB_SHARED_LIBADD                            : -lsasl2  -lssl -lcrypto -lrt

Please submit bugreports at:
  https://jira.mongodb.org/browse/PHPC


config.status: creating ./src/libmongoc/src/mongoc/mongoc-config.h
config.status: creating ./src/libmongoc/src/mongoc/mongoc-version.h
config.status: creating ./src/libbson/src/bson/bson-config.h
config.status: creating ./src/libbson/src/bson/bson-version.h
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing libtool commands
sed: can't read ./ltmain.sh: No such file or directory
mv: cannot stat 'libtoolT': No such file or directory
cp: cannot stat 'libtoolT': No such file or directory
chmod: cannot access 'libtool': No such file or directory

Make output

/bin/bash /tmp/mongo-php-driver/libtool --mode=compile cc    -I. -I/tmp/mongo-php-driver -DPHP_ATOM_INC -I/tmp/mongo-php-driver/include -I/tmp/mongo-php-driver/main -I/tmp/mongo-php-driver -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib -I/usr -I/tmp/mongo-php-driver/src/BSON/ -I/tmp/mongo-php-driver/src/MongoDB/ -I/tmp/mongo-php-driver/src/MongoDB/Exception/ -I/tmp/mongo-php-driver/src/contrib/ -I/tmp/mongo-php-driver/src/libmongoc/src/mongoc/ -I/tmp/mongo-php-driver/src/libbson/src/ -I/tmp/mongo-php-driver/src/libbson/src/yajl/ -I/tmp/mongo-php-driver/src/libbson/src/bson/  -DBSON_COMPILATION -DMONGOC_COMPILATION -DMONGOC_TRACE -DHAVE_CONFIG_H  -g -O2 -pthread  -c /tmp/mongo-php-driver/src/bson.c -o src/bson.lo
/bin/bash: /tmp/mongo-php-driver/libtool: No such file or directory
Makefile:351: recipe for target 'src/bson.lo' failed
make: *** [src/bson.lo] Error 127
@jmikola
Copy link
Member

jmikola commented Mar 8, 2016

http://api.mongodb.org/c/current/installing.html lists some additional dependencies for Debian/Ubuntu:

sudo apt-get install git gcc automake autoconf libtool

Offhand, where did you get the package dependencies? I realize we don't have anything listed on the manual install directions on PHP.net, so we should probably update that to include share deps for libmongoc, libbson, and the extension.

@necromant2005
Copy link
Author

Hi @jmikola the same situation

Configuring for:
PHP Api Version:         20151012
Zend Module Api No:      20151012
Zend Extension Api No:   320151012
cp: cannot stat 'ltmain.sh': No such file or directory

PHP7

sudo apt-get install -y php7.0-cli
sudo apt-get install git gcc automake autoconf libtool 
...

Ubuntu 16.04 is going to release this April

@derickr
Copy link
Contributor

derickr commented Mar 9, 2016

I have just checked this, and can reproduce your problem. However, this is a bug in Ubuntu's packaging of PHP.

In /usr/lib/php/20151012/build, the ltmain.sh "file" is a symlink to ../../../../share/libtool/confg/ltmain.sh. However, the target does not exist. This means that PHP's phpize can not copy it. And that's why you get the error. The correct symlink is to ../../../../share/libtool/build-aux/ltmain.sh, and if I change it to that, it works:

cd /usr/lib/php/20151012/build
sudo rm ltmain.sh
sudo ln -s ../../../../share/libtool/build-aux/ltmain.sh .
cd /tmp/mongo-php-driver
phpize

Which then outputs:

Configuring for:
PHP Api Version:         20151012
Zend Module Api No:      20151012
Zend Extension Api No:   320151012

./configure and make and make install work fine too then.

As this is not a driver issue, but a Ubuntu packaging issue, I am closing this report. I will open a Ubuntu bug as soon as my account is created, and post the link to the issue here.

@derickr derickr closed this as completed Mar 9, 2016
@derickr
Copy link
Contributor

derickr commented Mar 9, 2016

@necromant2005
Copy link
Author

Thank you @derickr !

@derickr
Copy link
Contributor

derickr commented Mar 15, 2016

The issue with ltmain.sh is now fixed in Ubuntu's latest php7 packages

@iaksit
Copy link

iaksit commented Mar 17, 2016

Hello dear friends, I had the same problem while installing Phalcon Framework on Debian Jessie x64.
Thanks to @derickr for his solution. I have just resolved the problem with ltmain.sh as follows;

  • First of all, I listed the php5 build directory contents.
    `ls -saliht /usr/lib/php5/build/`
    `ltmain.sh -> ../../../share/libtool/build-aux/ltmain.sh` 
    `..`
    
  • then, changed directory (cd) to that build directory (/usr/lib/php5/build/) as given below.
    `cd /usr/lib/php5/build/`
  • Tried to make sure the ltmain.sh file information is correct.
    `root@devmachine:/usr/lib/php5/build# file ltmain.sh`
    `ltmain.sh: broken symbolic link to ../../../share/libtool/config/ltmain.sh`
  • As seen, it was a broken symbolic link. Hence, I remove it
    `rm ltmain.sh`
  • After that, I linked the correct ltmain.sh to that directory as;
    `ln -s ../../../share/libtool/build-aux/ltmain.sh **.**`
  • Again tried to get information about the new ln file, ltmain.sh as;
    `file ltmain.sh`
    `ltmain.sh: symbolic link to ../../../share/libtool/build-aux/ltmain.sh`
    
  • Now it shows that it is correct symbolic link anymore.
  • Finally, I installed my Phalcon successfully on Debian Jessie x64 machine.

I hope this will be informative for you.
Thanks so much for your great comments that gave me that knowledge.
Have a great day.
Best wishes and regards.

@stefpe
Copy link

stefpe commented May 10, 2016

Fixed it with this symlink:

sudo ln -s /usr/share/libtool/build-aux/ltmain.sh /usr/lib/php5/build/ltmain.sh

@lpryszcz
Copy link

lpryszcz commented Aug 5, 2016

This also worked for me:
sudo rm /usr/lib/php5/build/ltmain.sh && sudo ln -s /usr/share/libtool/build-aux/ltmain.sh /usr/lib/php5/build/ltmain.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants