Paste full logs, what exact commands you run, system info, etc
2018-04-22 10:33 GMT+01:00 Tweetvito <notifications@github.com>:
> on 1.7.0-rc makefile have error about : gtest and gmock
> there are no rules to generate
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/znc/znc/issues/1517>, or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AAT15OFZmpfgP0hBEC0Z-GfawN4k4kAdks5trE5cgaJpZM4Tey14>
> .
>
<!-- github-comment-id:383373134 -->
i try to create deb package with command : debuild -us -uc -b
system : debian 8 and 9
Building core object Message...
Building core object Translation...
Linking znc...
ZNC was successfully compiled.
Use 'make install' to install ZNC to '/usr'.
make[1]: uscita dalla directory "/home/vito/Scaricati/znc-1.7.0-rc1"
dh_auto_test
make -j1 test VERBOSE=1
make[1]: ingresso nella directory "/home/vito/Scaricati/znc-1.7.0-rc1"
make[1]: *** Nessuna regola per generare l'obiettivo "third_party/googletest/googletest/src/gtest-all.cc", necessario per "test/gtest-all.o". Arresto.
make[1]: uscita dalla directory "/home/vito/Scaricati/znc-1.7.0-rc1"
dh_auto_test: make -j1 test VERBOSE=1 returned exit code 2
debian/rules:18: set di istruzioni per l'obiettivo "build" non riuscito
make: *** [build] Errore 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
debuild: fatal error at line 1116:
dpkg-buildpackage -rfakeroot -us -uc -b failed
i try to create deb package with command : debuild -us -uc -b
system : debian 8 and 9
----------------------------------------------------------------
Building core object Message...
Building core object Translation...
Linking znc...
ZNC was successfully compiled.
Use 'make install' to install ZNC to '/usr'.
make[1]: uscita dalla directory "/home/vito/Scaricati/znc-1.7.0-rc1"
dh_auto_test
make -j1 test VERBOSE=1
make[1]: ingresso nella directory "/home/vito/Scaricati/znc-1.7.0-rc1"
make[1]: *** Nessuna regola per generare l'obiettivo "third_party/googletest/googletest/src/gtest-all.cc", necessario per "test/gtest-all.o". Arresto.
make[1]: uscita dalla directory "/home/vito/Scaricati/znc-1.7.0-rc1"
dh_auto_test: make -j1 test VERBOSE=1 returned exit code 2
debian/rules:18: set di istruzioni per l'obiettivo "build" non riuscito
make: *** [build] Errore 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
debuild: fatal error at line 1116:
dpkg-buildpackage -rfakeroot -us -uc -b failed
<!-- github-comment-id:383419352 -->
I've been able to replicate your build failure, but only when I am not using the 1.6.6-1 packages from Debian Sid as a base. The specific issue you have is not necessarily a makefile rule, but the fact your system is calling make -j1 test VERBOSE=1. I should make a note that I can't prove that that test is being run under the packaging from the Debian maintainer of the ZNC package.
I'd need to see the complete debuild logs you have, it sounds like your build is running a test it doesn't really need to. But it also sounds like you're trying to run this outside a chroot, which can introduce evils like this, and without any prebuilt debian/rules that is known to work.
Normally I would urge you to build the packages in an sbuild schroot or a pbuilder chroot rather than building on your system directly, and to start with Patrick Matthäi's 1.6.6-1 packaging from Debian Sid as a 'baseline' for a package build. (This is what I did when I ran the third-party Debian repositories that used to be listed on the Installation wiki page.)
I've successfully built without errors direct-from-source compiles and successfully built Stretch packages of ZNC 1.7.0-rc1 using Patrick's 1.6.6-1 packaging's debian/ folder as a base (and then upping the version string).
Note that the standard compile-from-source instructions don't say anything about doing a make test call. At all. That may be why it's erroring on your environment - it's running the make test while the standard ZNC package builds don't actually indicate you need to run make test at all.
I've been able to replicate your build failure, but *only* when I am not using the 1.6.6-1 packages from Debian Sid as a base. The specific issue you have is not necessarily a makefile rule, but the fact your system is calling `make -j1 test VERBOSE=1`. I should make a note that I can't prove that that test is being run under the packaging from the Debian maintainer of the ZNC package.
I'd need to see the complete debuild logs you have, it sounds like your build is running a test it doesn't really need to. But it also sounds like you're trying to run this *outside* a chroot, which can introduce evils like this, and without any prebuilt `debian/rules` that is known to work.
Normally I would urge you to build the packages in an `sbuild` schroot or a `pbuilder` chroot rather than building on your system directly, and to start with Patrick Matthäi's 1.6.6-1 packaging from Debian Sid as a 'baseline' for a package build. (This is what I did when I ran the third-party Debian repositories that used to be listed on the Installation wiki page.)
I've successfully built without errors direct-from-source compiles and successfully built Stretch packages of ZNC 1.7.0-rc1 using Patrick's 1.6.6-1 packaging's `debian/` folder as a base (and then upping the version string).
Note that the **standard** compile-from-source instructions don't say anything about doing a `make test` call. At all. That may be why it's erroring on your environment - it's running the `make test` while the *standard* ZNC package builds don't actually indicate you need to run `make test` at all.
<!-- github-comment-id:383429289 -->
Tarballs don't provide GTest and GMock, which are needed to run make test. If you're building from git checkout, they are available as git submodule, so by default make test expects to find those files in third_party/googletest/
You can also install gtest in some other way, e.g. via googletest Debian package, and call ./configure --with-gtest=/usr/src/googletest/googletest --with-gmock=/usr/src/googletest/googlemock or env GTEST_ROOT=/usr/src/googletest/googletest GMOCK_ROOT=/usr/src/googletest/googlemock cmake ...
Note that in CMake build you can call the same test suite with make unittest instead of make test.
Tarballs don't provide GTest and GMock, which are needed to run `make test`. If you're building from git checkout, they are available as git submodule, so by default `make test` expects to find those files in `third_party/googletest/`
You can also install gtest in some other way, e.g. via googletest Debian package, and call `./configure --with-gtest=/usr/src/googletest/googletest --with-gmock=/usr/src/googletest/googlemock` or `env GTEST_ROOT=/usr/src/googletest/googletest GMOCK_ROOT=/usr/src/googletest/googlemock cmake ...`
Note that in CMake build you can call the same test suite with `make unittest` instead of `make test`.
<!-- github-comment-id:383486106 -->
Problem solved
first solution : ./configure --with-gtest=/usr/src/googletest/googletest --with-gmock=/usr/src/googletest/googlemock
second solution : change the lines in Makefile
GTEST_DIR := $(srcdir)/third_party/googletest/googletest
to
GTEST_DIR := /usr/src/googletest/googletest
and
GMOCK_DIR := $(srcdir)/third_party/googletest/googlemock
to
GMOCK_DIR := /usr/src/googletest/googlemock
result ...
dpkg-deb: building package 'znc-dbgsym' in '../znc-dbgsym_1.7.0-rc1-1_amd64.deb'.
dpkg-deb: building package 'znc' in '../znc_1.7.0-rc1-1_amd64.deb'.
Thank You all
Problem solved
first solution : ./configure --with-gtest=/usr/src/googletest/googletest --with-gmock=/usr/src/googletest/googlemock
second solution : change the lines in Makefile
GTEST_DIR := $(srcdir)/third_party/googletest/googletest
to
GTEST_DIR := /usr/src/googletest/googletest
and
GMOCK_DIR := $(srcdir)/third_party/googletest/googlemock
to
GMOCK_DIR := /usr/src/googletest/googlemock
result ...
dpkg-deb: building package 'znc-dbgsym' in '../znc-dbgsym_1.7.0-rc1-1_amd64.deb'.
dpkg-deb: building package 'znc' in '../znc_1.7.0-rc1-1_amd64.deb'.
Thank You all
<!-- github-comment-id:383505629 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
on 1.7.0-rc makefile have error about : gtest and gmock
there are no rules to generate
Paste full logs, what exact commands you run, system info, etc
2018-04-22 10:33 GMT+01:00 Tweetvito notifications@github.com:
i try to create deb package with command : debuild -us -uc -b
system : debian 8 and 9
Building core object Message...
Building core object Translation...
Linking znc...
ZNC was successfully compiled.
Use 'make install' to install ZNC to '/usr'.
make[1]: uscita dalla directory "/home/vito/Scaricati/znc-1.7.0-rc1"
dh_auto_test
make -j1 test VERBOSE=1
make[1]: ingresso nella directory "/home/vito/Scaricati/znc-1.7.0-rc1"
make[1]: *** Nessuna regola per generare l'obiettivo "third_party/googletest/googletest/src/gtest-all.cc", necessario per "test/gtest-all.o". Arresto.
make[1]: uscita dalla directory "/home/vito/Scaricati/znc-1.7.0-rc1"
dh_auto_test: make -j1 test VERBOSE=1 returned exit code 2
debian/rules:18: set di istruzioni per l'obiettivo "build" non riuscito
make: *** [build] Errore 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
debuild: fatal error at line 1116:
dpkg-buildpackage -rfakeroot -us -uc -b failed
I've been able to replicate your build failure, but only when I am not using the 1.6.6-1 packages from Debian Sid as a base. The specific issue you have is not necessarily a makefile rule, but the fact your system is calling
make -j1 test VERBOSE=1. I should make a note that I can't prove that that test is being run under the packaging from the Debian maintainer of the ZNC package.I'd need to see the complete debuild logs you have, it sounds like your build is running a test it doesn't really need to. But it also sounds like you're trying to run this outside a chroot, which can introduce evils like this, and without any prebuilt
debian/rulesthat is known to work.Normally I would urge you to build the packages in an
sbuildschroot or apbuilderchroot rather than building on your system directly, and to start with Patrick Matthäi's 1.6.6-1 packaging from Debian Sid as a 'baseline' for a package build. (This is what I did when I ran the third-party Debian repositories that used to be listed on the Installation wiki page.)I've successfully built without errors direct-from-source compiles and successfully built Stretch packages of ZNC 1.7.0-rc1 using Patrick's 1.6.6-1 packaging's
debian/folder as a base (and then upping the version string).Note that the standard compile-from-source instructions don't say anything about doing a
make testcall. At all. That may be why it's erroring on your environment - it's running themake testwhile the standard ZNC package builds don't actually indicate you need to runmake testat all.Tarballs don't provide GTest and GMock, which are needed to run
make test. If you're building from git checkout, they are available as git submodule, so by defaultmake testexpects to find those files inthird_party/googletest/You can also install gtest in some other way, e.g. via googletest Debian package, and call
./configure --with-gtest=/usr/src/googletest/googletest --with-gmock=/usr/src/googletest/googlemockorenv GTEST_ROOT=/usr/src/googletest/googletest GMOCK_ROOT=/usr/src/googletest/googlemock cmake ...Note that in CMake build you can call the same test suite with
make unittestinstead ofmake test.Problem solved
first solution : ./configure --with-gtest=/usr/src/googletest/googletest --with-gmock=/usr/src/googletest/googlemock
second solution : change the lines in Makefile
GTEST_DIR := $(srcdir)/third_party/googletest/googletest
to
GTEST_DIR := /usr/src/googletest/googletest
and
GMOCK_DIR := $(srcdir)/third_party/googletest/googlemock
to
GMOCK_DIR := /usr/src/googletest/googlemock
result ...
dpkg-deb: building package 'znc-dbgsym' in '../znc-dbgsym_1.7.0-rc1-1_amd64.deb'.
dpkg-deb: building package 'znc' in '../znc_1.7.0-rc1-1_amd64.deb'.
Thank You all