1

I have an autotools project (c++) which I build packages for on a launchpad ppa

Recently I've attempted to add a python package to that archive. I've tested it locally with bzr dh-make and also using pbuilder. Both work fantastically. On launchpad though no joy.

One of the builds logs is here

You'll see the problem is with the autogenerated install target. When it goes to install the python module it gives a warning and then re-links the module. I did a quick bit of research and it seemed completely ok

Here is the Makefile.am with the added python module target: The error in the build log on launchpad ends up saying:

/usr/bin/ld: cannot find -lvalhalla
collect2: error: ld returned 1 exit status
libtool:   error: error: relink 'valhalla.la' with the above command before installing it
Makefile:2265: recipe for target 'install-pyexecLTLIBRARIES' failed
make[3]: *** [install-pyexecLTLIBRARIES] Error 1

Whats odd is that not all of them failed. Maybe it is something to do with concurrency.

I noticed that the command it runs is make -j4 install and then when relinking it seems to say can not find -lvalhalla which is the name of the main library the project creates. It seems to be installing multiple things simultaneously perhaps this is the issue. Maybe I can override just the dh_auto_install target in the debian/rules file?

Looks like someone else can confirm the same as what I'm seeing in this list.

1 Answer 1

1

So indeed it did turn out that the problem was to do with parallel builds and in particular at the end when the python module is being re-linked other stuff hasn't been isntalled yet. The fix was also indeed less of a fix and more of a work around and is exactly what i proposed.

Namely I simply added this target to my debian/rules file:

#because python module depends on main library and somehow dependency is not known we must limit parallelism
override_dh_auto_install:
    dh_auto_install --max-parallel=1

The --max-parallel=1 bit will limit it to running make -j1 install which will avoid the race condition where libtool is looking for a lib that isn't there yet (described in the link above) when relinking the python module.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .