Opened 11 years ago

Closed 11 years ago

#41196 closed defect (fixed)

py27-keybinder @0.3.0_1: No rule to make target `/opt/local/lib/libkeybinder.la', needed by `_keybinder.la'

Reported by: marc.cortinas@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: mavericks x86_64 Cc: tim@…, jean-daniel.pauget@…, randria.work@…
Port: py27-keybinder

Description (last modified by ci42)

Everytime i've tried:

# port clean py27-keybinder
# port install py27-keybinder

I see this error message:

:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_gnome_keybinder/py27-keybinder/work/keybinder-0.3.0/python-keybinder" && /usr/bin/make -j4 -w all
:info:build Exit code: 2
:error:build org.macports.build for port py27-keybinder returned: command execution failed
:debug:build Error code: CHILDSTATUS 2849 2
:debug:build Backtrace: command execution failed
    while executing
"system -nice 0 $fullcmdstring"
    ("eval" body line 1)
    invoked from within
"eval system $notty $nice \$fullcmdstring"
    invoked from within
"command_exec build"
    (procedure "portbuild::build_main" line 8)
    invoked from within
"$procedure $targetname"
:info:build Warning: targets not executed for py27-keybinder: org.macports.activate org.macports.build org.macports.destroot org.macports.install

Attachments (1)

main.log (107.2 KB) - added by marc.cortinas@… 11 years ago.

Download all attachments as: .zip

Change History (16)

comment:1 Changed 11 years ago by ci42

Cc: maintainer@… removed
Owner: changed from macports-tickets@… to ryandesign@…

As I said here, please attach the log file. Use:

$ port logfile py27-keybinder

to locate the log file. And

don't forget to Cc the maintainer

means not to literally Cc <maintainer@…> but to Cc the actual port maintainer. You can find out the maintainer(s) with:

$ port info --maintainer py27-keybinder

Exclude <openmaintainer@…> and <nomaintainer@…>, these are special addresses not indicating an actual maintainer.

Last edited 11 years ago by ci42 (previous) (diff)

comment:2 Changed 11 years ago by ci42

Description: modified (diff)

comment:3 Changed 11 years ago by marc.cortinas@…

Cc: marc.cortinas@… added

Cc Me!

Changed 11 years ago by marc.cortinas@…

Attachment: main.log added

comment:4 Changed 11 years ago by marc.cortinas@…

Could you modify this ticket adding CC to maintainer: ryandesign@…, openmaintainer@…? Thanks in advance,

comment:5 in reply to:  4 Changed 11 years ago by ci42

Cc: marc.cortinas@… removed

Replying to marc.cortinas@…:

Could you modify this ticket adding CC to maintainer: ryandesign@…, openmaintainer@…? Thanks in advance,

I've already assigned the ticket to ryandesign (only MacPorts Team members can assign tickets, all others should use Cc), openmaintainer is special address (see my first comment).

You don't need to Cc yourself if your are the ticket reporter.

comment:6 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Status: newassigned
Summary: py27-keybinder @0.3.0_1 (gnome, devel) Error buildingpy27-keybinder @0.3.0_1: No rule to make target `/opt/local/lib/libkeybinder.la', needed by `_keybinder.la'

The error in the log is:

make: *** No rule to make target `/opt/local/lib/libkeybinder.la', needed by `_keybinder.la'.  Stop.

On Mavericks and later, MacPorts by default deletes .la files because they are usually not useful. However the python keybinder module appears to require it. I'll need to either disabuse the python keybinder build system of that requirement, or change the keybinder port to install the .la files even on Mavericks and later.

comment:7 Changed 11 years ago by tim@…

Cc: tim@… added

Cc Me!

comment:8 in reply to:  6 ; Changed 11 years ago by jean-daniel.pauget@…

Replying to ryandesign@…:

The error in the log is:

make: *** No rule to make target `/opt/local/lib/libkeybinder.la', needed by `_keybinder.la'.  Stop.

On Mavericks and later, MacPorts by default deletes .la files because they are usually not useful. However the python keybinder module appears to require it. I'll need to either disabuse the python keybinder build system of that requirement, or change the keybinder port to install the .la files even on Mavericks and later.

I don't know for sure where the modification stands in macports, but it seems related to such kind of bugs : #39598 where the presence of .la files in /opt/local/lib triggers bad path inclusion in DYLD_LIBRARY_PATH

my workaround so far is to keep all build-trees by turning "portautoclean no" in /opt/local/etc/macports/macports.conf right after a fresh (empty !) installation of macports. then to build most things until I reach the troubles (port install py27-keybinder) ... at this point I copied all the .la files from the previous build with the following ugly script :

#!/bin/bash

ls -ctr `find /opt/local/var/macports/build/ -name 'lib*.la' -type f` | while read LIBLA
do
    SHORTNAME=`echo "${LIBLA}" | rev | cut -d/ -f1 | rev | sed 's/\.la$//'`
    sed 's#/opt/local/var/macports/build[_/abcdefghijklmnopqrstuvwxyz\.1234567890+-]*/\(lib[_/abcdefghijklmnopqrstuvwxyz\.1234567890+-]*\.la\)#/opt/local/lib/\1#g'  \
        < "${LIBLA}"  \
        > "/opt/local/lib/${SHORTNAME}.la"
done

then port install py27-keybinder went without troubles ...

later on you'll run into some other bugs due to the presence of .la files (like #39598) simply move the .la files out of the way :

    mkdir /opt/local/la-libs && mv /opt/local/lib/*.la /opt/local/la-libs

some other package may miss the .la files (vte and terminator complains about missing libpng.la) in such cases I copy back with either the above script or from backups ...

for sure, moving back and forth the .la files isn't really convenient ...

Last edited 11 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:9 Changed 11 years ago by jean-daniel.pauget@…

Cc: jean-daniel.pauget@… added

Cc Me!

comment:10 in reply to:  8 ; Changed 11 years ago by randria.work@…

Replying to jean-daniel.pauget@…:

Replying to ryandesign@…:

The error in the log is:

make: *** No rule to make target `/opt/local/lib/libkeybinder.la', needed by `_keybinder.la'.  Stop.

On Mavericks and later, MacPorts by default deletes .la files because they are usually not useful. However the python keybinder module appears to require it. I'll need to either disabuse the python keybinder build system of that requirement, or change the keybinder port to install the .la files even on Mavericks and later.

I don't know for sure where the modification stands in macports, but it seems related to such kind of bugs : https://trac.macports.org/ticket/39598 where the presence of .la files in /opt/local/lib triggers bad path inclusion in DYLD_LIBRARY_PATH

my workaround so far is to keep all build-trees by turning "portautoclean no" in /opt/local/etc/macports/macports.conf right after a fresh (empty !) installation of macports. then to build most things until I reach the troubles (port install py27-keybinder) ... at this point I copied all the .la files from the previous build with the following ugly script :

#!/bin/bash

ls -ctr `find /opt/local/var/macports/build/ -name 'lib*.la' -type f` | while read LIBLA
do
    SHORTNAME=`echo "${LIBLA}" | rev | cut -d/ -f1 | rev | sed 's/\.la$//'`
    sed 's#/opt/local/var/macports/build[_/abcdefghijklmnopqrstuvwxyz\.1234567890+-]*/\(lib[_/abcdefghijklmnopqrstuvwxyz\.1234567890+-]*\.la\)#/opt/local/lib/\1#g'  \
        < "${LIBLA}"  \
        > "/opt/local/lib/${SHORTNAME}.la"
done

then port install py27-keybinder went without troubles ...

This "ugly" solution doesn't work for me because simply the "find" didn't find any .la files in the build directory.

comment:11 in reply to:  10 ; Changed 11 years ago by jean-daniel.pauget@…

Replying to randria.work@…:

Replying to jean-daniel.pauget@…:

.../...

my workaround so far is to keep all build-trees by turning "portautoclean no" in /opt/local/etc/macports/macports.conf right after a fresh (empty !) installation of macports. then to build most things until I reach the troubles (port install py27-keybinder) ... at this point I copied all the .la files from the previous build with the following ugly script :

#!/bin/bash

ls -ctr `find /opt/local/var/macports/build/ -name 'lib*.la' -type f` | while read LIBLA
do
    SHORTNAME=`echo "${LIBLA}" | rev | cut -d/ -f1 | rev | sed 's/\.la$//'`
    sed 's#/opt/local/var/macports/build[_/abcdefghijklmnopqrstuvwxyz\.1234567890+-]*/\(lib[_/abcdefghijklmnopqrstuvwxyz\.1234567890+-]*\.la\)#/opt/local/lib/\1#g'  \
        < "${LIBLA}"  \
        > "/opt/local/lib/${SHORTNAME}.la"
done

then port install py27-keybinder went without troubles ...

This "ugly" solution doesn't work for me because simply the "find" didn't find any .la files in the build directory.

In order to get those *.la I started back from a fresh empty installation and turn the "portautoclean no" before installing and building anything. If it's turned off later, the build-trees are cleaned.

comment:12 in reply to:  11 Changed 11 years ago by randria.work@…

Replying to jean-daniel.pauget@…:

Replying to randria.work@…:

This "ugly" solution doesn't work for me because simply the "find" didn't find any .la files in the build directory.

In order to get those *.la I started back from a fresh empty installation and turn the "portautoclean no" before installing and building anything. If it's turned off later, the build-trees are cleaned.

so you are suggesting me to rebuild all my port libraries (all my installed packages) with the option portautoclean=no ? should I reinstall my port package ?

comment:13 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

I really don't suggest any of this. Let's find the real problem—let's find the reason why py-keybinder is looking for libkeybinder.la and make it not do that anymore.

comment:14 Changed 11 years ago by jean-daniel.pauget@…

You're righ, my workaround is certainly overkill. would it be sane to change the port patchfile for its occurences of libkeybinder.la to libkeybinder.dylib ?

https://trac.macports.org/browser/trunk/dports/gnome/keybinder/files/patch_python-keybinder_Makefile.in.diff

--- python-keybinder/Makefile.in.orig   2012-06-17 11:25:51.000000000 -0500
+++ python-keybinder/Makefile.in        2012-11-22 02:20:15.000000000 -0600
@@ -97,7 +97,7 @@
        "$(DESTDIR)$(_keybinderdir)"
 LTLIBRARIES = $(_keybinder_LTLIBRARIES)
 am__DEPENDENCIES_1 =
-_keybinder_la_DEPENDENCIES = ../libkeybinder/libkeybinder.la \
+_keybinder_la_DEPENDENCIES = $(LIBDIR)/libkeybinder.dylib \
        $(am__DEPENDENCIES_1)
 am__keybinder_la_OBJECTS = _keybinder_la-_keybindermodule.lo
 nodist__keybinder_la_OBJECTS = _keybinder_la-_keybinder.lo
@@ -314,7 +314,7 @@
 _keybinder_LTLIBRARIES = _keybinder.la
 _keybinder_la_CPPFLAGS = $(X_CFLAGS) $(PYEXTRAFLAGS)
 _keybinder_la_LDFLAGS = -module -avoid-version -export-symbols-regex init_keybinder $(X_LDFLAGS)
-_keybinder_la_LIBADD = ../libkeybinder/libkeybinder.la $(PYGTK_LIBS)
+_keybinder_la_LIBADD = $(LIBDIR)/libkeybinder.dylib $(PYGTK_LIBS)
 _keybinder_la_SOURCES = _keybindermodule.c
 nodist__keybinder_la_SOURCES = _keybinder.c
 _keybinder_PYTHON = \

Last edited 11 years ago by jean-daniel.pauget@… (previous) (diff)

comment:15 in reply to:  14 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: randria.work@… added
Resolution: fixed
Status: assignedclosed

Replying to jean-daniel.pauget@…:

would it be sane to change the port patchfile for its occurences of libkeybinder.la to libkeybinder.dylib ?

Yes, that looks good. Committed in r114476. Sorry, I didn't realize my own patch was the cause of the problem. Thanks for finding the solution.

Note: See TracTickets for help on using tickets.