The ltmain.sh file is a dangling symlink

Bug #1555057 reported by Derick Rethans
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
php7.0 (Ubuntu)
Fix Released
Undecided
Nish Aravamudan

Bug Description

I am the maintainer of several (non packaged) PHP extensions. A user reported through https://github.com/mongodb/mongo-php-driver/issues/255 that "phpize" now throws a warning about a missing ltmain.sh (details about that in the previously mentioned GitHub issue).

This is on (beta1):

derick@ubuntu-desktop-16:/tmp/xdebug$ lsb_release -rd
Description: Ubuntu Xenial Xerus (development branch)
Release: 16.04

After some research, I found out that the problem was caused by a dangling symlink:

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.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: php7.0-dev 7.0.3-3
ProcVersionSignature: Ubuntu 4.4.0-7.22-generic 4.4.2
Uname: Linux 4.4.0-7-generic x86_64
ApportVersion: 2.20-0ubuntu3
Architecture: amd64
CurrentDesktop: GNOME
Date: Wed Mar 9 12:02:13 2016
InstallationDate: Installed on 2016-03-09 (0 days ago)
InstallationMedia: Ubuntu-GNOME 16.04 LTS "Xenial Xerus" - Alpha amd64 (20160225.1)
ProcEnviron:
 LANGUAGE=en_GB:en
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
SourcePackage: php7.0
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Derick Rethans (ubuntu-v0) wrote :
Revision history for this message
Nish Aravamudan (nacc) wrote :

Thanks for this report. I've seen it as well. Will make sure it gets fixed! It has to do with our current package coming from Debian which has both php5 & php7 support, I think.

Changed in php7.0 (Ubuntu):
assignee: nobody → Nish Aravamudan (nacc)
Revision history for this message
Ondřej Surý (ondrej) wrote :

Already fixed in 7.0.3-4 and higher.

Revision history for this message
Nish Aravamudan (nacc) wrote :

Ondřej,

Is this line right?

LIBTOOL_VERSION := $(shell dpkg-query -f'$${Version}' -W libtool)

Running that here, I get:

$2.4.6-0.1

?

Revision history for this message
Ondřej Surý (ondrej) wrote :

make replaces $$ with $, so it should be correct.

don't run it by hand, but you can use

$(error $(LIBTOOL_VERSION))

at the next line in d/rules to print the value that's set into $(LIBTOOL_VERSION)

Revision history for this message
Nish Aravamudan (nacc) wrote :

Ondřej,

Ah ok, thanks! Given the fix is already in and we've merged up to 7.0.3-9 (it's in proposed), I'll mark as fix committed.

Changed in php7.0 (Ubuntu):
status: New → Fix Committed
Revision history for this message
Matthias Klose (doko) wrote :

this looks related (also seen in Ubuntu):
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815765

Revision history for this message
Nish Aravamudan (nacc) wrote :

From an uptodate (php7.0=7.0.3-9ubuntu1) xenial environment:

(xenial-amd64)root@pitfall:/root# ls -ahl /usr/lib/php/20151012/build/ltmain.sh
lrwxrwxrwx 1 root root 45 Feb 26 00:01 /usr/lib/php/20151012/build/ltmain.sh -> ../../../../share/libtool/build-aux/ltmain.sh

Changed in php7.0 (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Derick Rethans (ubuntu-v0) wrote :

I can confirm that this is fixed now.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.