Меню

Dpkg buildpackage ошибка debian rules binary subprocess returned exit status 2

I have tried to build the package using the command

sudo fakeroot dpkg-buildpackage -F.

And encountered these result in the ternimal.

dpkg-buildpackage: source package calender
dpkg-buildpackage: source version 1.5-1
dpkg-buildpackage: source distribution unstable
dpkg-buildpackage: source changed by Nandaraj <nandaraj.ks@marlabs.com>
dpkg-buildpackage: host architecture amd64
dpkg-source --before-build calender-1.5
debian/rules clean
debian/rules:18: *** missing separator.  Stop.
dpkg-buildpackage: error: debian/rules clean gave error exit status 2

My rules file is:

#!/usr/bin/make -f

icon=$(CURDIR)/calender.png
script=$(CURDIR)/calender.py
launcher=$(CURDIR)/calender.desktop
links=$(CURDIR)/links.txt

DEST1=$(CURDIR)/debian/calender/usr/share/calender
DEST2=$(CURDIR)/debian/calender/usr/share/applications

build: build-stamp

build-stamp:
    dh_testdir
    touch build-stamp

clean:
    dh_testdir
    dh_testroot
    rm -f build-stamp
    dh_clean


install: build clean $(icon) $(script) $(links) $(launcher)
    dh_testdir
    dh_testroot
    dh_prep
    dh_installdirs


    mkdir -m 755 -p $(DEST1)
    mkdir -m 755 -p $(DEST2)


    install -m 666 $(icon) $(DEST1) 
    install -m 777 $(script) $(DEST1)
    install -m 666 $(links) $(DEST1)
    install -m 777 $(launcher) $(DEST2)

binary-indep: build install
    dh_testdir
    dh_testroot
    dh_installchangelogs
    dh_installdocs
    dh_installexamples
    dh_installman
    dh_link
    dh_compress
    dh_fixperms
    dh_installdeb
    dh_gencontrol
    dh_md5sums
    dh_builddeb

# Build architecture-dependent files here.
binary-arch: build install
# We have nothing to do by default.

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install

And my .desktop file is:

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[en_IN]=/
Name[en_IN]=calender
Exec=/usr/share/applications/calender.py
Comment[en_IN]=program prints calender
Name=calender
Comment=program prints calender
Icon=/usr/share/calender/cal.png
Categories=Network;GTK;GNOME

Not able to build the package issue is

debian/rules:18: *** missing separator.  Stop.
dpkg-buildpackage: error: debian/rules clean gave error exit status 2

I’m just trying an mtrack installation of Linux-Magic-Trackpad-2 because the libinput with dkms was a total flop (I couldn’t move, only click and drag).

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic

$ uname -r
4.18.5-041805-generic

$ sudo apt install libmtdev-dev
Reading package lists… Done
Building dependency tree
Reading state information… Done
libmtdev-dev is already the newest version (1.1.5-1ubuntu3).

$ dkg-buildpackage
dpkg-buildpackage: info: source package xserver-xorg-input-mtrack
dpkg-buildpackage: info: source version 0.5.0
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Paweł Turkowski p2rkw0@gmail.com
dpkg-buildpackage: info: host architecture amd64
dpkg-source —before-build xf86-input-mtrack
fakeroot debian/rules clean
dh_testdir
dh_testroot
/usr/bin/make clean
make[1]: Entering directory ‘/home/azatar/Engineering/ubuntu/touchpad/xf86-input-mtrack’
test -z «mtrack_drv.la» || rm -f mtrack_drv.la
rm -f ./so_locations
rm -rf .libs _libs
rm -rf driver/.libs driver/_libs
rm -rf src/.libs src/_libs
rm -f mtrack-test
rm -f .o
rm -f driver/
.o
rm -f driver/.lo
rm -f src/
.o
rm -f src/.lo
rm -f tools/
.o
rm -f *.lo
make[1]: Leaving directory ‘/home/azatar/Engineering/ubuntu/touchpad/xf86-input-mtrack’
dh_clean
dh_clean: Compatibility levels before 9 are deprecated (level 5 in use)
dpkg-source -b xf86-input-mtrack
dpkg-source: warning: no source format specified in debian/source/format, see dpkg-source(1)
dpkg-source: info: using source format ‘1.0’
dpkg-source: warning: source directory ‘xf86-input-mtrack’ is not — ‘xserver-xorg-input-mtrack-0.5.0’
dpkg-source: info: building xserver-xorg-input-mtrack in xserver-xorg-input-mtrack_0.5.0.tar.gz
dpkg-source: info: building xserver-xorg-input-mtrack in xserver-xorg-input-mtrack_0.5.0.dsc
debian/rules build
dh_testdir
/usr/bin/make
make[1]: Entering directory ‘/home/azatar/Engineering/ubuntu/touchpad/xf86-input-mtrack’
/usr/bin/make all-am
make[2]: Entering directory ‘/home/azatar/Engineering/ubuntu/touchpad/xf86-input-mtrack’
CC src/capabilities.lo
CC src/gestures.lo
CC src/hwstate.lo
CC src/mconfig.lo
CC src/mtouch.lo
CC src/mtstate.lo
CC src/trig.lo
CC driver/mtrack.lo
CC driver/mprops.lo
CCLD mtrack_drv.la
CC src/mtrack_test-capabilities.o
CC src/mtrack_test-gestures.o
CC src/mtrack_test-hwstate.o
CC src/mtrack_test-mconfig.o
CC src/mtrack_test-mtouch.o
CC src/mtrack_test-mtstate.o
CC src/mtrack_test-trig.o
CC tools/mtrack_test-mtrack-test.o
CCLD mtrack-test
src/mtrack_test-hwstate.o: In function hwstate_modify': /home/azatar/Engineering/ubuntu/touchpad/xf86-input-mtrack/src/hwstate.c:126: undefined reference to mtdev_get’
src/mtrack_test-mtouch.o: In function mtouch_open': /home/azatar/Engineering/ubuntu/touchpad/xf86-input-mtrack/src/mtouch.c:42: undefined reference to mtdev_open’
src/mtrack_test-mtouch.o: In function mtouch_close': /home/azatar/Engineering/ubuntu/touchpad/xf86-input-mtrack/src/mtouch.c:70: undefined reference to mtdev_close’
collect2: error: ld returned 1 exit status
Makefile:565: recipe for target ‘mtrack-test’ failed
make[2]: *** [mtrack-test] Error 1
make[2]: Leaving directory ‘/home/azatar/Engineering/ubuntu/touchpad/xf86-input-mtrack’
Makefile:419: recipe for target ‘all’ failed
make[1]: *** [all] Error 2
make[1]: Leaving directory ‘/home/azatar/Engineering/ubuntu/touchpad/xf86-input-mtrack’
debian/rules:8: recipe for target ‘build-arch’ failed
make: *** [build-arch] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2

What’s the problem, I wonder?

Не собирается пакет

Модераторы: Warderer, Модераторы разделов

bluesman

Сообщения: 2137
Статус: Блюзмен
ОС: Ubuntu 9.10

Не собирается пакет

Пробую собрать .deb пакет
После ввода команды

идет сборка но в конце логов выдает вот такое:

Код: Выделить всё

make[1]: *** [config.status] Ошибка 2
make[1]: Leaving directory `~/src/kosd/0.2.3/kosd-0.2.3'
make: *** [clean] Ошибка 2
dpkg-buildpackage: сбой: fakeroot debian/rules clean возвратил код ошибки 2

В результате .deb пакет не собирается
Собираю вот эту программу — тыц

KernelPanic

Бывший модератор
Сообщения: 2060
Статус: Brain Атаке
ОС: Debian squeeze/sid/exp

bluesman

Сообщения: 2137
Статус: Блюзмен
ОС: Ubuntu 9.10

Re: Не собирается пакет

Сообщение

bluesman » 16.02.2009 14:28

Решено: перед сборкой в пакет, нужно еще до команд

выполнить команду

Тоесть последовательность такая:

А потом уже:

Только вот мне не понятно, для чего нужна команда make -f Makefile.cvs и не знаю правильно ли я все сделал, несмотря на то что пакет собрался. Жду мнения коллег. :)

KernelPanic

Бывший модератор
Сообщения: 2060
Статус: Brain Атаке
ОС: Debian squeeze/sid/exp

Re: Не собирается пакет

Сообщение

KernelPanic » 16.02.2009 14:44

Скачал исходники. Чего-то не пойму, каким образом Вы применяете dpkg-buildpackage над обычными исходниками и для чего?
Последовательность действий описана на самой странице проекта и имеет вид:

Код: Выделить всё

make -f Makefile.cvs
./configure
make
make install (as root)

bluesman

Сообщения: 2137
Статус: Блюзмен
ОС: Ubuntu 9.10

Re: Не собирается пакет

Сообщение

bluesman » 16.02.2009 17:15

KernelPanic
Нет, после

нужно деабинизировать с помощью dh_make

ЗЫ, извиняюсь, думал что указал ссылку на хау-ту, по которому собирал, вот оно — тыц
Вообщем делал все как в хау-ту, только там строчка есть:

Далее конфигурируем, делаем как обычно ./configure –prefix=/usr && make

Вместо этого я конфигурировал вот так:

bluesman

Сообщения: 2137
Статус: Блюзмен
ОС: Ubuntu 9.10

Re: Не собирается пакет

Сообщение

bluesman » 16.02.2009 17:21

KernelPanic
Да я просто хотел в первом посте дать ссылку на инструкцию по сборке, но забыл, и все это время думал что ссылка там есть. Сам запутался :)
Получается что правильно собрал? Кстати, как вам программка? Мне понравилась, как в гноме показывает громкость при изменении.

Could you

Add your debian/rules file as now I’m just guessing:

At here

Minimal debian/rules.

With the Trusty the package building didn’t work as the
dh_auto_clean was executed too early.

changelog at here:

add override_dh_auto_clean to the debian/rules. With the Trusty the
make is executed before the configure step; dh_auto_clean -> make (?)

I have in the debian rules:

override_dh_auto_clean:
    dh_testdir
    dh_clean

——EDIT——

Tested with the Ubuntu 14.10.

With the debian/rules:

#!/usr/bin/make -f                                                                                                                                                                                                                         
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

%:
  dh $@  --with autotools-dev

I get the same error as you.

With the debian/rules:

#!/usr/bin/make -f                                                                                                                                                                                                                         
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

%:
    dh $@  --with autotools-dev

override_dh_auto_clean:

override_dh_auto_configure:
    ./configure --enable-gpl

The building is going on…

The ‘override_dh_auto_configure:’ is there as I do get an error with the dh_auto_configure:

Unknown option "--build=x86_64-linux-gnu".
See ./configure --help for available options.
dh_auto_configure: ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --libexecdir=${prefix}/lib/ffmpeg --disable-maintainer-mode --disable-dependency-tracking returned exit code 1
debian/rules:7: recipe for target 'build' failed

moonss1300

Posts: 12
Joined: Sun Jul 18, 2021 12:21 pm

ffmpeg : How to fix dpkg-buildpackage build errors

This error appears when ffmpeg is built with the dpkg-buildpackage command.
How do I fix this error?

Code: Select all

...
/usr/bin/ld: /usr/local/lib/libvpx.a(onyx_if.c.o): in function `vp8_reverse_trans':
(.text+0x1cc8): dangerous relocation: unsupported relocation
/usr/bin/ld: /usr/local/lib/libvpx.a(onyx_if.c.o): in function `vp8_change_config':
(.text+0x1e94): dangerous relocation: unsupported relocation
/usr/bin/ld: (.text+0x1e98): dangerous relocation: unsupported relocation
/usr/bin/ld: (.text+0x1e9c): dangerous relocation: unsupported relocation
/usr/bin/ld: (.text+0x1ea0): dangerous relocation: unsupported relocation
/usr/bin/ld: (.text+0x1ea4): dangerous relocation: unsupported relocation
/usr/bin/ld: (.text+0x1ea8): dangerous relocation: unsupported relocation
/usr/bin/ld: /usr/local/lib/libvpx.a(onyx_if.c.o)(.text+0x3ae8): unresolvable R_ARM_CALL relocation against symbol `gettimeofday@@GLIBC_2.4'
/usr/bin/ld: final link failed: symbol needs debug section which does not exist
collect2: error: ld returned 1 exit status
make[2]: *** [/home/pi/vvmpeg/ffmpeg-4.1.6/ffbuild/library.mak:103: libavcodec/libavcodec.so.58] Error 1
make[2]: Leaving directory '/home/pi/vvmpeg/ffmpeg-4.1.6/debian/standard'
dh_auto_build: error: cd debian/standard && make -j4 "INSTALL=install --strip-program=true" returned exit code 2
cat: debian/standard/config.log: No such file or directory
make[1]: *** [debian/rules:289: override_dh_auto_build-arch] Error 1
make[1]: Leaving directory '/home/pi/vvmpeg/ffmpeg-4.1.6'
make: *** [debian/rules:265: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
debuild: fatal error at line 1182:
dpkg-buildpackage -us -uc -ui -b failed


Return to “Beginners”

Hello folks …

I’m trying to build some packages from source, and I’m facing trouble that I don’t understand despite lots of googling. This happens with some packages, while others compile and get packed normally. One of the softwares that fail to package is libva.

When I use;

Code: Select all

export DH_VERBOSE=1 && dpkg-buildpackage -uc -us -j4 -d --build=full --host-arch=amd64 --target-arch=amd64

I get this error;

Code: Select all

checking build system type... Invalid configuration `./autogen.sh': machine `./autogen.sh' not recognized
configure: error: /bin/bash ./config.sub ./autogen.sh failed
	find ! -ipath "./debian/*" -a ! ( -path '*/.git/*' -o -path '*/.hg/*' -o -path '*/.bzr/*' -o -path '*/.svn/*' -o -path '*/CVS/*' ) -a  -type f -exec md5sum {} + -o -type l -printf "symlink  %p
" > debian/autoreconf.after
dh_autoreconf: ./autogen.sh ./autogen.sh returned exit code 1
make[1]: *** [debian/rules:12: override_dh_autoreconf] Error 2
make[1]: Leaving directory '/media/deyaa/BBuffer/buildfolder/intel/libva/libva-2.14.0'
make: *** [debian/rules:9: binary] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2

I also have the architecture set up in the control file.

However when I run;

Code: Select all

autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu --enable-drm --enable-x11 --enable-glx --enable-wayland --enable-va-messaging

it compiles normally, but I face another problem trying to install it to the same folder under fakeroot.

Code: Select all

$ fakeroot make install
Making install in va
make[1]: Entering directory '/media/deyaa/BBuffer/buildfolder/intel/libva/build/va'
Making install in drm
make[2]: Entering directory '/media/deyaa/BBuffer/buildfolder/intel/libva/build/va/drm'
make[3]: Entering directory '/media/deyaa/BBuffer/buildfolder/intel/libva/build/va/drm'
make[3]: Nothing to be done for 'install-exec-am'.
 /usr/bin/mkdir -p '/usr/include/va'
 /usr/bin/install -c -m 644 ../../../libva/va/drm/va_drm.h '/usr/include/va'
/usr/bin/install: cannot remove '/usr/include/va/va_drm.h': Permission denied
make[3]: *** [Makefile:502: install-libva_drmincludeHEADERS] Error 1
make[3]: Leaving directory '/media/deyaa/BBuffer/buildfolder/intel/libva/build/va/drm'
make[2]: *** [Makefile:620: install-am] Error 2
make[2]: Leaving directory '/media/deyaa/BBuffer/buildfolder/intel/libva/build/va/drm'
make[1]: *** [Makefile:755: install-recursive] Error 1
make[1]: Leaving directory '/media/deyaa/BBuffer/buildfolder/intel/libva/build/va'
make: *** [Makefile:459: install-recursive] Error 1

I get similar errors while building other packages, like aria2, and intel-media.

Could you offer any help or pointers?

0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии

А вот еще интересные материалы:

  • Яшка сломя голову остановился исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного где ошибка
  • Dpf ошибка митсубиси паджеро спорт
  • Dpc watchdog violation ошибка синий экран