Opened 9 years ago
Last modified 8 years ago
#47755 closed defect
Broken symlink left by select code when selected port is deactivated causes poppler and other ports using aclocal to fail during configuration. — at Version 10
Reported by: | lukasz@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | base | Version: | 2.3.3 |
Keywords: | Cc: | cal@…, jwa@…, mojca@…, devans@… | |
Port: |
Description (last modified by dbevans (David B. Evans))
I cannot execute port upgrade outdated
because of error while upgrading poppler.
This is my error:
sudo port upgrade outdated Password: ---> Computing dependencies for poppler ---> Configuring poppler Error: org.macports.configure for port poppler returned: autoreconf failure: command execution failed Please see the log file for port poppler for details: /opt/local/var/macports/logs/_opt_local_var_macports_sources_sea.us.rsync.macports.org_release_tarballs_ports_graphics_poppler/poppler/main.log Error: Unable to upgrade port: 1 To report a bug, follow the instructions in the guide: http://guide.macports.org/#project.tickets
Please see attached log file.
Unfortunately I was not able to execute port uninstall poppler
, as it would remove all dependencies, and I wanted to avoid it. I did not find the "force" way.
Change History (11)
Changed 9 years ago by lukasz@…
comment:1 Changed 9 years ago by neverpanic (Clemens Lang)
What does port provides /opt/local/share/aclocal/wxwin.m4
print? Is /opt/local/share/aclocal/wxwin.m4
a symlink, and if it is, is it broken (i.e. dangling, pointing to a non-existant file)?
I think some port used to provide this file, but did not register it, and now it's a leftover remnant that should just be deleted. I remember at least one previous instance where the same problem occured and was solved this way.
comment:2 Changed 9 years ago by neverpanic (Clemens Lang)
Cc: | cal@… added |
---|---|
Owner: | changed from macports-tickets@… to devans@… |
Port: | poppler added |
Also, when reporting tickets against ports, please set the port field and Cc the maintainer, if any.
comment:3 Changed 9 years ago by lukasz@…
Hello,
Result of port provides /opt/local/share/aclocal/wxwin.m4
:
/opt/local/share/aclocal/wxwin.m4 is not provided by a MacPorts port.
Result of ls -l /opt/local/share/aclocal/wxwin.m4
:
/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/share/aclocal/wxwin.m4
Which is a broken link.
I removed /opt/local/share/aclocal/wxwin.m4
and all went fine.
Thank you for such fast response.
comment:4 Changed 9 years ago by neverpanic (Clemens Lang)
Cc: | jwa@… mojca@… added |
---|
So the port that used to install /opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/share/aclocal/wxwin.m4
is at fault here, because it didn't register the symlink.
Since this sounds like the wxWidgets-3.0
port, I'm Cc'ing their maintainers.
comment:5 follow-up: 9 Changed 9 years ago by mojca (Mojca Miklavec)
The symlink /opt/local/share/aclocal/wxwin.m4
comes from port select wxWidgets wxWidgets-3.0
. Compare with:
> ll /opt/local/bin/python lrwxr-xr-x 1 root admin 24B 21 jan 2012 /opt/local/bin/python -> /opt/local/bin/python2.7 > port provides /opt/local/bin/python /opt/local/bin/python is not provided by a MacPorts port. > sudo port -f deactivate python27 > ll /opt/local/bin/python lrwxr-xr-x 1 root admin 24B 21 jan 2012 /opt/local/bin/python -> /opt/local/bin/python2.7 > /opt/local/bin/python --version -bash: /opt/local/bin/python: No such file or directory
This is the second error report with exactly the same symptoms I've heard about recently.
Maybe someone should "revisit" the "port select
" code.
Port select aside, it might be helpful to install that single file (/opt/local/share/aclocal/wxwin.m4
) unconditionally (by some standalone port which would then be a dependency of all wxWidgets-based ports), but it seems like a tiny bit of an overkill to me if a port would install just that single file.
comment:8 Changed 9 years ago by dbevans (David B. Evans)
I was a bit confused at first by the discussion here but after some experimentation I was able to reproduce the error.
Restating the situation:
The configuration error here is due to the fact that, at the point of failure, a broken symlink is installed in /opt/local/share/aclocal which aclocal will not tolerate. The result is that any port, not just poppler, that uses aclocal (typically invoked by autoreconf) in the configuration process will fail.
In this case, the symlink in question is
$ ls -l /opt/local/share/aclocal/wxwin.m4 lrwxr-xr-x 1 root admin 95 May 18 06:15 /opt/local/share/aclocal/wxwin.m4 -> /opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/share/aclocal/wxwin.m4
which is typically created by the commands
$ sudo port install wxWidgets-3.0 $ sudo port select wxWidgets wxWidgets-3.0
or
$ sudo port install wxWidgets-2.8 $ sudo port select wxWidgets wxWidgets-2.8
At this point deactivating the target port will break the symlink.
The following command sequence will recreate the reported issue
$ sudo port install wxWidgets-3.0 $ sudo port select wxWidgets wxWidgets-3.0 $ sudo port deactivate wxWidgets-3.0 $ sudo port install poppler
As reported removing the broken symlink will heal the problem. Rather than doing this manually I would suggest just deselecting the deactivated port.
$ sudo port select wxWidgets none
It's interesting to note that this command will now appear to fail as follows
Selecting 'none' for 'wxWidgets' failed: symlink: /opt/local/etc/select/wxWidgets/current -> none: file already exists
but the symlink is, in fact, removed. It appears that the 'port select' code is smart enough to set its selection to none when the selected port is deactivated but not smart enough to actually remove the symlinks associated with the old selection.
comment:9 Changed 9 years ago by dbevans (David B. Evans)
Replying to mojca@…:
Port select aside, it might be helpful to install that single file (
/opt/local/share/aclocal/wxwin.m4
) unconditionally (by some standalone port which would then be a dependency of all wxWidgets-based ports), but it seems like a tiny bit of an overkill to me if a port would install just that single file.
This won't work because wxwin.m4 is produced by both wxWidgets-2.8 and wxWidgets-3.0 and the two versions are quite different. This is apparently why wxwin.m4 was added to the wxWidget-select base file. It's a point of conflict between the two versions.
If legacy wxWidgets-2.8 could be removed, wxWidgets-3.0 could just install wxwin.m4 in /opt/local/share/aclocal and be done with it.
comment:10 Changed 9 years ago by dbevans (David B. Evans)
Cc: | devans@… added |
---|---|
Component: | ports → base |
Description: | modified (diff) |
Owner: | changed from devans@… to macports-tickets@… |
Port: | poppler removed |
Summary: | poppler @0.32.0_0 Configure error → Broken symlink left by select code when selected port is deactivated causes poppler and other ports using aclocal to fail during configuration. |
Log file.