我的笔记本电脑有一个专用的 GPU,它是AMD Radeon HD 6300。我该如何测试它glmark2
?
默认情况下,它使用iGPU。glmark2
手册页没有显示选择dGPU的选项。
Necktwi's questions
我已经打包了一个名为base
并上传到我的ppa:satyagowtham-k-gmail/ferryfair.ppa
. 启动板已成功构建base
包,我通过sudo apt install base-dev
. 现在我正在打包另一个名为的库logger
,它依赖于base
.
我已将我的添加ppa
到pbuilder chroot
$ sudo cp ~/pbuilder/xenial-base.tgz /var/cache/pbuilder/base.tgz
$ pbuilder login --save-after-login
# apt-add-repository ppa:satyagowtham-k-gmail/ferryfair.ppa
# apt-get update
# exit
pbuilder-dist xenial build logger_1.0-0ubuntu1.dsc给出以下错误
...
...
install -d debian/logger-dev/DEBIAN
dpkg-shlibdeps -Tdebian/logger1.substvars -l/build/logger-1.0/lib/x86_64 --ignore-missing-info debian/logger1/usr/lib/x86_64/liblogger.so.1.0
dpkg-shlibdeps: error: couldn't find library libbase.so.1 needed by debian/logger1/usr/lib/x86_64/liblogger.so.1.0 (ELF format: 'elf64-x86-64'; RPATH: '')
dpkg-shlibdeps: error: cannot continue due to the error above
Note: libraries are not searched in other binary packages that do not have any shlibs or symbols file.
To help dpkg-shlibdeps find private libraries, you might need to use -l.
dh_shlibdeps: dpkg-shlibdeps -Tdebian/logger1.substvars -l/build/logger-1.0/lib/x86_64 --ignore-missing-info debian/logger1/usr/lib/x86_64/liblogger.so.1.0 returned exit code 2
debian/rules:10: recipe for target 'override_dh_shlibdeps' failed
make[1]: *** [override_dh_shlibdeps] Error 2
make[1]: Leaving directory '/build/logger-1.0'
debian/rules:13: recipe for target 'binary' failed
make: *** [binary] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
...
...
Debian/规则
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
override_dh_auto_test:
override_dh_usrlocal:
override_dh_shlibdeps:
dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info -l$(shell pwd)/lib/$(shell uname -m)
%:
dh $@ --buildsystem=cmake
Debian/控制
Source: logger
Priority: optional
Maintainer: Satya Gowtham Kudupudi <[email protected]>
Build-Depends: debhelper (>= 9), cmake, base-dev
Standards-Version: 3.9.7
Section: non-free/libs
Homepage: https://github.com/necktwi/logger
Vcs-Git: https://github.com/necktwi/logger.git
Vcs-Browser: https://github.com/necktwi/logger
Package: logger-dev
Section: non-free/libdevel
Architecture: any
Depends: logger1 (= ${binary:Version}), ${misc:Depends}, base1
Description: logger from ferryfair.com
It logs a beautiful and useful format.
Package: logger1
Section: non-free/libs
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, base1
Description: logger from ferryfair.com
It logs a beautiful and useful format.
我正在尝试将我的cmake构建项目发布到我的启动板 ppa。当我在下面进行假构建时,会抛出错误。
gowtham@ubuntu:~/Packages/build-area$ pbuilder-dist xenial build base_1.1-0ubuntu1.dsc
...
...
dh_auto_configure -O--buildsystem=cmake
mkdir -p obj-x86_64-linux-gnu
cd obj-x86_64-linux-gnu
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LOCALSTATEDIR=/var
dh_auto_configure: cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LOCALSTATEDIR=/var failed to to execute: No such file or directory
cd /build/base-1.1
debian/rules:11: recipe for target 'build' failed
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
...
...
错误消息没有说明缺少什么文件。我的项目没有configure
文件要做./configure
。
我的debian/规则文件
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
override_dh_auto_test:
override_dh_usrlocal:
%:
dh $@ --buildsystem=cmake
我能够使用手写的 Makefile 成功发布我的库。但是当我选择cmake时我遇到了麻烦。不幸的是,我没有找到任何适合初学者的指南来打包 cmake 构建的项目。
我的正常构建过程:
cd ~/Packages/base
mkdir build
cd build
cmake ..
make
sudo make install
我遵循打包并发布到我的 ppa 的说明
cd ~/Packages/base
bzr dh-make base 1.1 base-1.1.tar.gz
cd base/debian/
rm *ex *EX
bzr commit -m "Initial commit of Debian packaging."
bzr builddeb -- -us -uc -sd
bzr builddeb -S -- -sd
bzr tag release-1.1
cd ../../build-area
pbuilder-dist xenial build base_1.1-0ubuntu1.dsc
cd ../base
bzr push lp:~satyagowtham-k-gmail/+junk/base-package
cd ../build-area
dput ppa:satyagowtham-k-gmail/ferryfair.ppa base_1.1-0ubuntu1_source.changes
我正在尝试将我的cmake项目发布到启动板上的 ppa。该项目是一个名为“base”的库。
bzr builddeb -- -us -uc -sd
尝试伪造dev
软件包的安装版本时失败并出现以下错误。
...
...
Install the project...
/usr/bin/cmake -P cmake_install.cmake
-- Install configuration: "None"
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/lib/libbase.so.1.0
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/lib/libbase.so.1
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/lib/libbase.so
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/include/ferryfair/base/myxml.h
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/include/ferryfair/base/Socket.h
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/include/ferryfair/base/ClientSocket.h
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/include/ferryfair/base/mycurl.h
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/include/ferryfair/base/mystdlib.h
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/include/ferryfair/base/ServerSocket.h
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/include/ferryfair/base/JPEGImage.h
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/include/ferryfair/base/SocketException.h
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/include/ferryfair/base/FerryTimeStamp.h
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/include/ferryfair/base/myconverters.h
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/include/ferryfair/base/baseConfig.h
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/lib/pkgconfig/libbase.pc
-- Installing: /home/gowtham/Packages/build-area/base-1.1/debian/tmp/usr/share/pkgconfig/libbase.pc
make[1]: Leaving directory '/home/gowtham/Packages/build-area/base-1.1/obj-x86_64-linux-gnu'
dh_install -O--buildsystem=cmake
dh_install: base-dev missing files: usr/lib/*/lib*.so
dh_install: base-dev missing files: usr/lib/*/pkgconfig/*
dh_install: base1 missing files: usr/lib/*/lib*.so.*
dh_install: missing files, aborting
debian/rules:11: recipe for target 'binary' failed
make: *** [binary] Error 20
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
debuild: fatal error at line 1376:
dpkg-buildpackage -rfakeroot -D -us -uc -sd failed
bzr: ERROR: The build failed.
安装时如何区分软件包builddeb
的版本dev
header files
Debian/规则
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
override_dh_auto_test:
override_dh_usrlocal:
%:
dh $@ --buildsystem=cmake
当我上传一个包来存档时
$ dput ppa:mylaunchpadid/myppa.ppa mypackage1.0-0ubuntu2_source.changes
Checking signature on .changes
gpg: Signature made ...
gpg: Good signature from ...
Good signature on ...source.changes
Good signature on ....dsc.
Package includes an .orig.tar.gz file although the debian revision suggests
that it might not be required. Multiple uploads of the .orig.tar.gz may be
rejected by the upload queue management software.
Uploading to ppa (via sftp to ppa.launchpad.net):
如何防止每次上传修订版时都上传orig.tar.gz ?
我在编写 Makefile 以在 Linux FHS 上安装我的库时需要帮助。https://www.debian.org/doc/debian-policy/ch-sharedlibs.html#s-sharedlibs-dev说应该有一个从.so
到.so.$(version).$(minor)
的链接和一个从.so.$(version)
到.so
到的链接.so.$(version).$(minor)
。下面是我的 Makefile 的片段
install -D ${CND_ARTIFACT_PATH_${CONF}} $(DESTDIR)/usr/lib/${CND_ARTIFACT_NAME_${CONF}}.$(version).0.0
ln -s $(DESTDIR)/usr/lib/${CND_ARTIFACT_NAME_${CONF}}.$(version).0.0 $(DESTDIR)/usr/lib/${CND_ARTIFACT_NAME_${CONF}}
ln -s $(DESTDIR)/usr/lib/${CND_ARTIFACT_NAME_${CONF}}.$(version).0.0 $(DESTDIR)/usr/lib/${CND_ARTIFACT_NAME_${CONF}}.$(version)
在打包dpkg-buildpackage -rfakeroot -b
并安装包之后,创建的软链接指向实际的 .so 用于构建包而不是 .so 安装在/usr/lib/
gowtham@VBUbu:~$ ls -la /usr/lib/libbase.so.1*
lrwxrwxrwx 1 root root 67 Aug 25 00:35 /usr/lib/libbase.so.1 -> /home/gowtham/Packages/base-1.0/debian/tmp/usr/lib/libbase.so.1.0.0
-rw-r--r-- 1 root root 170588 Aug 25 00:35 /usr/lib/libbase.so.1.0.0