我正在尝试libnanomsg-dev
从jessie
向后移植 到squeeze
并遵循本教程。这是我得到的:
$ fakeroot debian/rules binary
...
dh_testroot -O--parallel
dh_prep -O--parallel
dh_installdirs -O--parallel
dh_auto_install -O--parallel
make[1]: Entering directory `/home/yuri/build/nanomsg-0.4~beta+dfsg'
make[2]: Entering directory `/home/yuri/build/nanomsg-0.4~beta+dfsg'
test -z "/usr/lib" || /bin/mkdir -p "/home/yuri/build/nanomsg-0.4~beta+dfsg/debian/tmp/usr/lib"
./doltlibtool --mode=install /usr/bin/install -c libnanomsg.la '/home/yuri/build/nanomsg-0.4~beta+dfsg/debian/tmp/usr/lib'
libtool: install: /usr/bin/install -c .libs/libnanomsg.so.0.2.0 /home/yuri/build/nanomsg-0.4~beta+dfsg/debian/tmp/usr/lib/libnanomsg.so.0.2.0
libtool: install: (cd /home/yuri/build/nanomsg-0.4~beta+dfsg/debian/tmp/usr/lib && { ln -s -f libnanomsg.so.0.2.0 libnanomsg.so.0 || { rm -f libnanomsg.so.0 && ln -s libnanomsg.so.0.2.0 libnanomsg.so.0; }; })
libtool: install: (cd /home/yuri/build/nanomsg-0.4~beta+dfsg/debian/tmp/usr/lib && { ln -s -f libnanomsg.so.0.2.0 libnanomsg.so || { rm -f libnanomsg.so && ln -s libnanomsg.so.0.2.0 libnanomsg.so; }; })
libtool: install: /usr/bin/install -c .libs/libnanomsg.lai /home/yuri/build/nanomsg-0.4~beta+dfsg/debian/tmp/usr/lib/libnanomsg.la
libtool: install: /usr/bin/install -c .libs/libnanomsg.a /home/yuri/build/nanomsg-0.4~beta+dfsg/debian/tmp/usr/lib/libnanomsg.a
libtool: install: chmod 644 /home/yuri/build/nanomsg-0.4~beta+dfsg/debian/tmp/usr/lib/libnanomsg.a
libtool: install: ranlib /home/yuri/build/nanomsg-0.4~beta+dfsg/debian/tmp/usr/lib/libnanomsg.a
libtool: install: warning: remember to run `libtool --finish /usr/lib'
test -z "/usr/bin" || /bin/mkdir -p "/home/yuri/build/nanomsg-0.4~beta+dfsg/debian/tmp/usr/bin"
./doltlibtool --mode=install /usr/bin/install -c nanocat '/home/yuri/build/nanomsg-0.4~beta+dfsg/debian/tmp/usr/bin'
libtool: install: warning: `libnanomsg.la' has not been installed in `/usr/lib'
libtool: install: /usr/bin/install -c .libs/nanocat /home/yuri/build/nanomsg-0.4~beta+dfsg/debian/tmp/usr/bin/nanocat
make install-exec-hook
make[3]: Entering directory `/home/yuri/build/nanomsg-0.4~beta+dfsg'
cd /home/yuri/build/nanomsg-0.4~beta+dfsg/debian/tmp/usr/bin && \
ln -s -f nanocat nn_push && \
ln -s -f nanocat nn_pull && \
ln -s -f nanocat nn_pub && \
ln -s -f nanocat nn_sub && \
ln -s -f nanocat nn_req && \
ln -s -f nanocat nn_rep && \
ln -s -f nanocat nn_surveyor && \
ln -s -f nanocat nn_respondent && \
ln -s -f nanocat nn_bus && \
ln -s -f nanocat nn_pair
make[3]: Leaving directory `/home/yuri/build/nanomsg-0.4~beta+dfsg'
test -z "/usr/share/doc/nanomsg" || /bin/mkdir -p "/home/yuri/build/nanomsg-0.4~beta+dfsg/debian/tmp/usr/share/doc/nanomsg"
test -z "/usr/share/man/man1" || /bin/mkdir -p "/home/yuri/build/nanomsg-0.4~beta+dfsg/debian/tmp/usr/share/man/man1"
test -z "/usr/share/man/man3" || /bin/mkdir -p "/home/yuri/build/nanomsg-0.4~beta+dfsg/debian/tmp/usr/share/man/man3"
test -z "/usr/share/man/man7" || /bin/mkdir -p "/home/yuri/build/nanomsg-0.4~beta+dfsg/debian/tmp/usr/share/man/man7"
test -z "/usr/include/nanomsg" || /bin/mkdir -p "/home/yuri/build/nanomsg-0.4~beta+dfsg/debian/tmp/usr/include/nanomsg"
/usr/bin/install -c -m 644 src/nn.h src/inproc.h src/ipc.h src/tcp.h src/pair.h src/pubsub.h src/reqrep.h src/pipeline.h src/survey.h src/bus.h '/home/yuri/build/nanomsg-0.4~beta+dfsg/debian/tmp/usr/include/nanomsg'
test -z "/usr/lib/pkgconfig" || /bin/mkdir -p "/home/yuri/build/nanomsg-0.4~beta+dfsg/debian/tmp/usr/lib/pkgconfig"
/usr/bin/install -c -m 644 libnanomsg.pc '/home/yuri/build/nanomsg-0.4~beta+dfsg/debian/tmp/usr/lib/pkgconfig'
make[2]: Leaving directory `/home/yuri/build/nanomsg-0.4~beta+dfsg'
make[1]: Leaving directory `/home/yuri/build/nanomsg-0.4~beta+dfsg'
dh_install -O--parallel
dh_install: libnanomsg-dev missing files (usr/lib/*/lib*.a), aborting
make: *** [binary] Error 20
UPD感谢 Stephen Kitt,我能够向后移植该软件包。
我到底做了什么...
debian/libnanomsg-dev.install
:
`usr/lib/*/lib*.a` -> `usr/lib/lib*.a`,<br>
`usr/lib/*/lib*.so` -> `usr/lib/lib*.so`,<br>
`usr/lib/*/pkgconfig/*.pc` -> `usr/lib/pkgconfig/*.pc`
debian/libnanomsg0.install
:
`usr/lib/*/lib*.so.*` -> `usr/lib/lib*.so.*`
之后就fakeroot
成功完成了。但还有其他问题:
我有一个守护进程在5555
端口上运行,所以我不得不改变tests/tcp.c
测试(这是在文件路径问题之前*.install
):
#define SOCKET_ADDRESS "tcp://127.0.0.1:5555"
另外,还dpkg-buildpackage -us -uc
报了以下错误:
dh_autoreconf_clean -O--parallel
dh_clean -O--parallel
dpkg-source -b nanomsg-0.4~beta+dfsg
dpkg-source: info: using source format `3.0 (quilt)'
dpkg-source: info: building nanomsg using existing ./nanomsg_0.4~beta+dfsg.orig.tar.gz
dpkg-source: error: cannot represent change to nanomsg-0.4~beta+dfsg/test.ipc: device or socket is not allowed
dpkg-source: error: cannot represent change to nanomsg-0.4~beta+dfsg/test-separation.ipc: device or socket is not allowed
dpkg-source: error: unrepresentable changes to source
dpkg-buildpackage: error: dpkg-source -b nanomsg-0.4~beta+dfsg gave error exit status 2
因此,我删除了据称由 所创建的文件test.ipc
,并且成功了。test-separation.ipc
fakeroot
答案1
Squeeze 对多架构了解不多,但您正在构建的源包使用多架构路径(usr/lib/*/lib*.a
其中第一个*
最终被您正在构建的架构的多架构三元组替换)。要修复此dh_install
步骤,您需要编辑相应的<package>.install
文件debian
并将路径更改为非多架构路径(在本例中为usr/lib/lib*.a
)。您可能还需要编辑路径lib*.so
并从中删除多架构节debian/control
...